Finish translations for manage part
parent
78abec80fd
commit
b2fa02d4eb
|
@ -3,13 +3,13 @@
|
||||||
<div class="return-button">
|
<div class="return-button">
|
||||||
<button mat-raised-button (click)="backToOverview()">
|
<button mat-raised-button (click)="backToOverview()">
|
||||||
<mat-icon svgIcon="chevron-left"></mat-icon>
|
<mat-icon svgIcon="chevron-left"></mat-icon>
|
||||||
Zurück
|
{{'public.army.member.button.back' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 class="text-center" style="font-weight: 600"
|
<h3 class="text-center" style="font-weight: 600"
|
||||||
[style.color]="user.squadId?.fraction === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
|
[style.color]="user.squadId?.fraction === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
|
||||||
Auszeichnungen von {{user.username}}
|
{{'public.army.member.headline' | translate:{name: user.username} }}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
|
@ -19,7 +19,9 @@
|
||||||
<input type="text" style="background: white;" class="form-control" [(ngModel)]="signatureUrl" readonly>
|
<input type="text" style="background: white;" class="form-control" [(ngModel)]="signatureUrl" readonly>
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-default" [class.btn-success]="isCopied" type="button"
|
<button class="btn btn-default" [class.btn-success]="isCopied" type="button"
|
||||||
ngxClipboard [cbContent]="signatureUrl" (cbOnSuccess)="isCopied = true">kopieren</button>
|
ngxClipboard [cbContent]="signatureUrl" (cbOnSuccess)="isCopied = true">
|
||||||
|
{{'public.army.member.button.copy' | translate}}
|
||||||
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -29,9 +31,11 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="table-head">
|
<tr class="table-head">
|
||||||
<th class="col-sm-1" style="border-radius: 10px 0 0 0;"></th>
|
<th class="col-sm-1" style="border-radius: 10px 0 0 0;"></th>
|
||||||
<th class="col-sm-2">Bezeichnung</th>
|
<th class="col-sm-2">{{'public.army.member.awards.title' | translate}}</th>
|
||||||
<th class="col-sm-2">Begründung</th>
|
<th class="col-sm-2">{{'public.army.member.awards.reason' | translate}}</th>
|
||||||
<th class="col-sm-1 text-right" style="border-radius: 0 10px 0 0;">Verliehen am</th>
|
<th class="col-sm-1 text-right" style="border-radius: 0 10px 0 0;">
|
||||||
|
{{'public.army.member.awards.date' | translate}}
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody *ngFor="let award of awards">
|
<tbody *ngFor="let award of awards">
|
||||||
|
@ -55,7 +59,6 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<br>
|
<br>
|
||||||
<small *ngIf="decoration.fraction == 'OPFOR'">{{fraction.OPFOR}}</small>
|
<small *ngIf="decoration.fraction == 'OPFOR'">{{fraction.OPFOR}}</small>
|
||||||
<small *ngIf="decoration.fraction == 'BLUFOR'">{{fraction.BLUFOR}}</small>
|
<small *ngIf="decoration.fraction == 'BLUFOR'">{{fraction.BLUFOR}}</small>
|
||||||
<small *ngIf="decoration.fraction == 'GLOBAL'">Global</small>
|
<small *ngIf="decoration.fraction == 'GLOBAL'">{{'decorations.list.filter.global' | translate}}</small>
|
||||||
<small> - Sortierung: {{decoration.sortingNumber}}</small>
|
<small>{{'decorations.item.label.sort' | translate:{value: decoration.sortingNumber} }}</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
|
@ -18,7 +18,8 @@
|
||||||
[style.max-width]="imgStyle.width"
|
[style.max-width]="imgStyle.width"
|
||||||
[style.margin-top]="imgStyle.marginTop"
|
[style.margin-top]="imgStyle.marginTop"
|
||||||
class="decoration-list-preview">
|
class="decoration-list-preview">
|
||||||
<span (click)="delete(); $event.stopPropagation()" matTooltip="Löschen" class="glyphicon glyphicon-trash trash"></span>
|
<span (click)="delete(); $event.stopPropagation()" matTooltip="{{'decorations.list.button.delete' | translate}}"
|
||||||
|
class="glyphicon glyphicon-trash trash"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
<cc-list-filter
|
<cc-list-filter
|
||||||
[filterButtons]="[{label: fraction.BLUFOR, value: 'BLUFOR'},
|
[filterButtons]="[{label: fraction.BLUFOR, value: 'BLUFOR'},
|
||||||
{label: fraction.OPFOR, value: 'OPFOR'},
|
{label: fraction.OPFOR, value: 'OPFOR'},
|
||||||
{label: 'Global', value: 'GLOBAL'}]"
|
{label: 'decorations.list.filter.global', value: 'GLOBAL'}]"
|
||||||
[addButton]="{svgIcon: 'add', tooltip: 'Neue Auszeichnung hinzufügen'}"
|
[addButton]="{svgIcon: 'add', tooltip: 'decorations.list.button.add'}"
|
||||||
(executeSearch)="filterDecorations($event)"
|
(executeSearch)="filterDecorations($event)"
|
||||||
(openAddFrom)="openNewDecorationForm()">
|
(openAddFrom)="openNewDecorationForm()">
|
||||||
</cc-list-filter>
|
</cc-list-filter>
|
||||||
|
|
|
@ -8,6 +8,7 @@ import {DecorationService} from '../../services/army-management/decoration.servi
|
||||||
import {Fraction} from '../../utils/fraction.enum';
|
import {Fraction} from '../../utils/fraction.enum';
|
||||||
import {MatButtonToggleGroup} from '@angular/material';
|
import {MatButtonToggleGroup} from '@angular/material';
|
||||||
import {UIHelpers} from '../../utils/global.helpers';
|
import {UIHelpers} from '../../utils/global.helpers';
|
||||||
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'cc-decoration-list',
|
selector: 'cc-decoration-list',
|
||||||
|
@ -28,7 +29,8 @@ export class DecorationListComponent implements OnInit {
|
||||||
|
|
||||||
constructor(private decorationService: DecorationService,
|
constructor(private decorationService: DecorationService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute) {
|
private route: ActivatedRoute,
|
||||||
|
private translate: TranslateService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -60,11 +62,16 @@ export class DecorationListComponent implements OnInit {
|
||||||
fraction = Fraction.OPFOR;
|
fraction = Fraction.OPFOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (confirm('Soll die Auszeichnung "' + decoration.name + '" (' + fraction + ') wirklich gelöscht werden?')) {
|
this.translate.get('decorations.list.delete.confirm', {
|
||||||
this.decorationService.deleteDecoration(decoration)
|
name: decoration.name,
|
||||||
.subscribe((res) => {
|
fraction: fraction
|
||||||
});
|
}).subscribe((confirmQuestion) => {
|
||||||
}
|
if (confirm(confirmQuestion)) {
|
||||||
|
this.decorationService.deleteDecoration(decoration)
|
||||||
|
.subscribe((res) => {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
filterDecorations(group?: MatButtonToggleGroup) {
|
filterDecorations(group?: MatButtonToggleGroup) {
|
||||||
|
|
|
@ -4,11 +4,35 @@ import {CommonModule} from '@angular/common';
|
||||||
import {DecorationStore} from '../services/stores/decoration.store';
|
import {DecorationStore} from '../services/stores/decoration.store';
|
||||||
import {DecorationService} from '../services/army-management/decoration.service';
|
import {DecorationService} from '../services/army-management/decoration.service';
|
||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
|
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
|
||||||
|
import {HttpClient} from '@angular/common/http';
|
||||||
|
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
|
||||||
|
|
||||||
|
export function createTranslateLoader(http: HttpClient) {
|
||||||
|
return new TranslateHttpLoader(http, './assets/i18n/decorations/', '.json');
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: decorationsRoutingComponents,
|
declarations: decorationsRoutingComponents,
|
||||||
imports: [CommonModule, SharedModule, decorationRoutesModule],
|
|
||||||
providers: [DecorationStore, DecorationService]
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
SharedModule,
|
||||||
|
decorationRoutesModule,
|
||||||
|
|
||||||
|
TranslateModule.forChild({
|
||||||
|
loader: {
|
||||||
|
provide: TranslateLoader,
|
||||||
|
useFactory: (createTranslateLoader),
|
||||||
|
deps: [HttpClient]
|
||||||
|
},
|
||||||
|
isolate: true
|
||||||
|
})],
|
||||||
|
|
||||||
|
providers: [
|
||||||
|
DecorationStore,
|
||||||
|
DecorationService
|
||||||
|
]
|
||||||
})
|
})
|
||||||
export class DecorationsModule {
|
export class DecorationsModule {
|
||||||
static routes = decorationRoutesModule;
|
static routes = decorationRoutesModule;
|
||||||
|
|
|
@ -3,8 +3,13 @@ import {DecorationListComponent} from './decoration-list/decoration-list.compone
|
||||||
import {EditDecorationComponent} from './edit-decoration/edit-decoration.component';
|
import {EditDecorationComponent} from './edit-decoration/edit-decoration.component';
|
||||||
import {ModuleWithProviders} from '@angular/core';
|
import {ModuleWithProviders} from '@angular/core';
|
||||||
import {DecorationItemComponent} from './decoration-list/decoration-item.component';
|
import {DecorationItemComponent} from './decoration-list/decoration-item.component';
|
||||||
|
import {DecorationsComponent} from './decorations.component';
|
||||||
|
|
||||||
export const decorationsRoutes: Routes = [
|
export const decorationsRoutes: Routes = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: DecorationsComponent,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: DecorationListComponent,
|
component: DecorationListComponent,
|
||||||
|
@ -23,5 +28,6 @@ export const decorationsRoutes: Routes = [
|
||||||
|
|
||||||
export const decorationRoutesModule: ModuleWithProviders = RouterModule.forChild(decorationsRoutes);
|
export const decorationRoutesModule: ModuleWithProviders = RouterModule.forChild(decorationsRoutes);
|
||||||
|
|
||||||
export const decorationsRoutingComponents = [DecorationItemComponent, DecorationListComponent, EditDecorationComponent];
|
export const decorationsRoutingComponents = [DecorationsComponent, DecorationItemComponent, DecorationListComponent,
|
||||||
|
EditDecorationComponent];
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<router-outlet></router-outlet>
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'cc-decorations-root',
|
||||||
|
templateUrl: './decorations.component.html',
|
||||||
|
styleUrls: ['./decorations.component.scss']
|
||||||
|
})
|
||||||
|
export class DecorationsComponent {
|
||||||
|
|
||||||
|
constructor(private translate: TranslateService) {
|
||||||
|
translate.setDefaultLang('de');
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,63 +1,63 @@
|
||||||
<form #form="ngForm" (keydown.enter)="$event.preventDefault()" class="overview">
|
<form #form="ngForm" (keydown.enter)="$event.preventDefault()" class="overview">
|
||||||
<h3 *ngIf="decoration._id">Auszeichnung editieren</h3>
|
<h3 *ngIf="decoration._id">{{'decorations.submit.headline.edit' | translate}}</h3>
|
||||||
<h3 *ngIf="!decoration._id">Neue Auszeichnung hinzufügen</h3>
|
<h3 *ngIf="!decoration._id">{{'decorations.submit.headline.new' | translate}}</h3>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="title">Name</label>
|
<label for="title">{{'decorations.submit.field.name' | translate}}</label>
|
||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
[(ngModel)]="decoration.name"
|
[(ngModel)]="decoration.name"
|
||||||
name="title"
|
name="title"
|
||||||
id="title"
|
id="title"
|
||||||
required maxlength="50"/>
|
required maxlength="50"/>
|
||||||
<show-error displayName="Name" controlPath="title"></show-error>
|
<show-error displayName="{{'decorations.submit.field.name' | translate}}" controlPath="title"></show-error>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="fraction">Fraktion</label>
|
<label for="fraction">{{'decorations.submit.field.fraction' | translate}}</label>
|
||||||
<select id="fraction" name="fraction" class="form-control btn dropdown-toggle"
|
<select id="fraction" name="fraction" class="form-control btn dropdown-toggle"
|
||||||
required
|
required
|
||||||
[(ngModel)]="decoration.fraction">
|
[(ngModel)]="decoration.fraction">
|
||||||
<option value="OPFOR">{{fraction.OPFOR}}</option>
|
<option value="OPFOR">{{fraction.OPFOR}}</option>
|
||||||
<option value="BLUFOR">{{fraction.BLUFOR}}</option>
|
<option value="BLUFOR">{{fraction.BLUFOR}}</option>
|
||||||
<option value="GLOBAL">Global</option>
|
<option value="GLOBAL">{{'decorations.submit.field.fraction.global' | translate}}</option>
|
||||||
</select>
|
</select>
|
||||||
<show-error displayName="Fraktion" controlPath="fraction"></show-error>
|
<show-error displayName="{{'decorations.submit.field.fraction' | translate}}" controlPath="fraction"></show-error>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="type">Art</label>
|
<label for="type">{{'decorations.submit.field.type' | translate}}</label>
|
||||||
<select id="type" name="type" class="form-control btn dropdown-toggle"
|
<select id="type" name="type" class="form-control btn dropdown-toggle"
|
||||||
required
|
required
|
||||||
[(ngModel)]="decoration.isMedal">
|
[(ngModel)]="decoration.isMedal">
|
||||||
<option value="true">Orden</option>
|
<option value="true">{{'decorations.submit.field.type.medal' | translate}}</option>
|
||||||
<option value="false">Ribbon</option>
|
<option value="false">{{'decorations.submit.field.type.ribbon' | translate}}</option>
|
||||||
</select>
|
</select>
|
||||||
<show-error displayName="Art" controlPath="type"></show-error>
|
<show-error displayName="{{'decorations.submit.field.type' | translate}}" controlPath="type"></show-error>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="sort">Sortierung</label>
|
<label for="sort">{{'decorations.submit.field.sort' | translate}}</label>
|
||||||
<input id="sort" name="sort" type="number" class="form-control btn dropdown-toggle"
|
<input id="sort" name="sort" type="number" class="form-control btn dropdown-toggle"
|
||||||
[(ngModel)]="decoration.sortingNumber">
|
[(ngModel)]="decoration.sortingNumber">
|
||||||
<show-error displayName="Sortierung" controlPath="sort"></show-error>
|
<show-error displayName="{{'decorations.submit.field.sort' | translate}}" controlPath="sort"></show-error>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="description">Beschreibung</label>
|
<label for="description">{{'decorations.submit.field.description' | translate}}</label>
|
||||||
<textarea id="description" name="description" class="form-control" rows="5"
|
<textarea id="description" name="description" class="form-control" rows="5"
|
||||||
required
|
required
|
||||||
[(ngModel)]="decoration.description"></textarea>
|
[(ngModel)]="decoration.description"></textarea>
|
||||||
<show-error displayName="Beschreibung" controlPath="description"></show-error>
|
<show-error displayName="{{'decorations.submit.field.description' | translate}}" controlPath="description"></show-error>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="graphic">Bild</label>
|
<label for="graphic">{{'decorations.submit.field.image' | translate}}</label>
|
||||||
<input id="graphic" name="graphic" class="ui-button form-control" type="file"
|
<input id="graphic" name="graphic" class="ui-button form-control" type="file"
|
||||||
#fileInput
|
#fileInput
|
||||||
accept="image/png"
|
accept="image/png"
|
||||||
(change)="fileChange($event)">
|
(change)="fileChange($event)">
|
||||||
<span class="label label-bg label-danger center-block" style="font-size:small" *ngIf="showImageError">
|
<span class="label label-bg label-danger center-block" style="font-size:small" *ngIf="showImageError">
|
||||||
Bild muss im PNG Format vorliegen
|
{{'decorations.submit.field.image.error.type' | translate}}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<img class="preview-image" src="{{imagePreviewSrc}}">
|
<img class="preview-image" src="{{imagePreviewSrc}}">
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
<button id="cancel"
|
<button id="cancel"
|
||||||
(click)="cancel()"
|
(click)="cancel()"
|
||||||
class="btn btn-default">
|
class="btn btn-default">
|
||||||
Abbrechen
|
{{'decorations.submit,button.cancel' | translate}}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button id="save"
|
<button id="save"
|
||||||
|
@ -74,6 +74,6 @@
|
||||||
(click)="saveDecoration(fileInput)"
|
(click)="saveDecoration(fileInput)"
|
||||||
class="btn btn-default"
|
class="btn btn-default"
|
||||||
[disabled]="!form.valid">
|
[disabled]="!form.valid">
|
||||||
Bestätigen
|
{{'decorations.submit,button.submit' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -7,6 +7,7 @@ import {Subscription} from 'rxjs/Subscription';
|
||||||
import {Fraction} from '../../utils/fraction.enum';
|
import {Fraction} from '../../utils/fraction.enum';
|
||||||
import {SnackBarService} from '../../services/user-interface/snack-bar/snack-bar.service';
|
import {SnackBarService} from '../../services/user-interface/snack-bar/snack-bar.service';
|
||||||
import {Message} from '../../i18n/de.messages';
|
import {Message} from '../../i18n/de.messages';
|
||||||
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './edit-decoration.component.html',
|
templateUrl: './edit-decoration.component.html',
|
||||||
|
@ -31,7 +32,8 @@ export class EditDecorationComponent implements OnInit, OnDestroy {
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private decorationService: DecorationService,
|
private decorationService: DecorationService,
|
||||||
private snackBarService: SnackBarService) {
|
private snackBarService: SnackBarService,
|
||||||
|
private translate: TranslateService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -69,7 +71,12 @@ export class EditDecorationComponent implements OnInit, OnDestroy {
|
||||||
this.router.navigate(['..'], {relativeTo: this.route});
|
this.router.navigate(['..'], {relativeTo: this.route});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return window.alert(`Bild ist ein Pflichtfeld`);
|
this.translate.get('decorations.submit.field.image').subscribe((fieldNameLogo) => {
|
||||||
|
this.translate.get('public.error.message.required',
|
||||||
|
{fieldName: fieldNameLogo}).subscribe((message) => {
|
||||||
|
this.snackBarService.showError(message, 4000);
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.fileList) {
|
if (this.fileList) {
|
||||||
|
|
|
@ -8,6 +8,7 @@ import {RankService} from '../../services/army-management/rank.service';
|
||||||
import {Fraction} from '../../utils/fraction.enum';
|
import {Fraction} from '../../utils/fraction.enum';
|
||||||
import {UIHelpers} from '../../utils/global.helpers';
|
import {UIHelpers} from '../../utils/global.helpers';
|
||||||
import {MatButtonToggleGroup} from '@angular/material';
|
import {MatButtonToggleGroup} from '@angular/material';
|
||||||
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'cc-rank-list',
|
selector: 'cc-rank-list',
|
||||||
|
@ -28,7 +29,8 @@ export class RankListComponent implements OnInit {
|
||||||
|
|
||||||
constructor(private rankService: RankService,
|
constructor(private rankService: RankService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute) {
|
private route: ActivatedRoute,
|
||||||
|
private translate: TranslateService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -60,10 +62,15 @@ export class RankListComponent implements OnInit {
|
||||||
|
|
||||||
deleteRank(rank) {
|
deleteRank(rank) {
|
||||||
const fraction = rank.fraction === 'OPFOR' ? Fraction.OPFOR : Fraction.BLUFOR;
|
const fraction = rank.fraction === 'OPFOR' ? Fraction.OPFOR : Fraction.BLUFOR;
|
||||||
if (confirm('Soll der Rang ' + rank.name + ' (' + fraction + ') wirklich gelöscht werden?')) {
|
this.translate.get('ranks.list.delete.confirm', {
|
||||||
this.rankService.deleteRank(rank)
|
name: rank.name,
|
||||||
.subscribe((res) => {
|
fraction: fraction
|
||||||
});
|
}).subscribe((confirmQuestion) => {
|
||||||
}
|
if (confirm(confirmQuestion)) {
|
||||||
|
this.rankService.deleteRank(rank)
|
||||||
|
.subscribe((res) => {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import {SquadService} from '../../services/army-management/squad.service';
|
||||||
import {Fraction} from '../../utils/fraction.enum';
|
import {Fraction} from '../../utils/fraction.enum';
|
||||||
import {UIHelpers} from '../../utils/global.helpers';
|
import {UIHelpers} from '../../utils/global.helpers';
|
||||||
import {MatButtonToggleGroup} from '@angular/material';
|
import {MatButtonToggleGroup} from '@angular/material';
|
||||||
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'cc-squad-list',
|
selector: 'cc-squad-list',
|
||||||
|
@ -28,7 +29,8 @@ export class SquadListComponent implements OnInit {
|
||||||
|
|
||||||
constructor(private squadService: SquadService,
|
constructor(private squadService: SquadService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute) {
|
private route: ActivatedRoute,
|
||||||
|
private translate: TranslateService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -54,11 +56,16 @@ export class SquadListComponent implements OnInit {
|
||||||
|
|
||||||
deleteSquad(squad) {
|
deleteSquad(squad) {
|
||||||
const fraction = squad.fraction === 'OPFOR' ? Fraction.OPFOR : Fraction.BLUFOR;
|
const fraction = squad.fraction === 'OPFOR' ? Fraction.OPFOR : Fraction.BLUFOR;
|
||||||
if (confirm('Soll das Squad "' + squad.name + '" (' + fraction + ') wirklich gelöscht werden?')) {
|
this.translate.get('squad.list.delete.confirm', {
|
||||||
this.squadService.deleteSquad(squad)
|
name: squad.name,
|
||||||
.subscribe((res) => {
|
fraction: fraction
|
||||||
});
|
}).subscribe((confirmQuestion) => {
|
||||||
}
|
if (confirm(confirmQuestion)) {
|
||||||
|
this.squadService.deleteSquad(squad)
|
||||||
|
.subscribe((res) => {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
filterSquads(group?: MatButtonToggleGroup) {
|
filterSquads(group?: MatButtonToggleGroup) {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import {PlayerUtils} from '../../../utils/player-utils';
|
||||||
import {saveAs} from 'file-saver/FileSaver';
|
import {saveAs} from 'file-saver/FileSaver';
|
||||||
import {MatSort} from '@angular/material';
|
import {MatSort} from '@angular/material';
|
||||||
import {SortUtils} from '../../../utils/sort-utils';
|
import {SortUtils} from '../../../utils/sort-utils';
|
||||||
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'cc-scoreboard',
|
selector: 'cc-scoreboard',
|
||||||
|
@ -37,7 +38,8 @@ export class ScoreboardComponent implements OnChanges {
|
||||||
|
|
||||||
displayedColumns = this.tableHead.map(head => head.prop);
|
displayedColumns = this.tableHead.map(head => head.prop);
|
||||||
|
|
||||||
constructor(private elRef: ElementRef) {
|
constructor(private elRef: ElementRef,
|
||||||
|
private translate: TranslateService) {
|
||||||
this.displayedColumns.push('interact');
|
this.displayedColumns.push('interact');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,12 +95,13 @@ export class ScoreboardComponent implements OnChanges {
|
||||||
exportCSV() {
|
exportCSV() {
|
||||||
let csvOut = '';
|
let csvOut = '';
|
||||||
for (let i = 0; i < this.tableHead.length; i++) {
|
for (let i = 0; i < this.tableHead.length; i++) {
|
||||||
csvOut += this.tableHead[i].head;
|
this.translate.get(this.tableHead[i].head).subscribe((translated) => {
|
||||||
if (i !== this.tableHead.length - 1) {
|
csvOut += translated;
|
||||||
csvOut += ',';
|
if (i !== this.tableHead.length - 1) {
|
||||||
}
|
csvOut += ',';
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let j = 0; j < this.war.players.length; j++) {
|
for (let j = 0; j < this.war.players.length; j++) {
|
||||||
const player = this.war.players[j];
|
const player = this.war.players[j];
|
||||||
csvOut += '\r\n';
|
csvOut += '\r\n';
|
||||||
|
|
|
@ -9,6 +9,7 @@ import {ADD, LOAD} from '../../services/stores/user.store';
|
||||||
import {Fraction} from '../../utils/fraction.enum';
|
import {Fraction} from '../../utils/fraction.enum';
|
||||||
import {MatButtonToggleGroup} from '@angular/material';
|
import {MatButtonToggleGroup} from '@angular/material';
|
||||||
import {UIHelpers} from '../../utils/global.helpers';
|
import {UIHelpers} from '../../utils/global.helpers';
|
||||||
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'cc-user-list',
|
selector: 'cc-user-list',
|
||||||
|
@ -37,7 +38,8 @@ export class UserListComponent implements OnInit {
|
||||||
|
|
||||||
constructor(private userService: UserService,
|
constructor(private userService: UserService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute) {
|
private route: ActivatedRoute,
|
||||||
|
private translate: TranslateService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -67,11 +69,13 @@ export class UserListComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteUser(user: User) {
|
deleteUser(user: User) {
|
||||||
if (confirm('Soll der Teilnehmer "' + user.username + '" wirklich gelöscht werden?')) {
|
this.translate.get('squad.list.delete.confirm', {name: user.username}).subscribe((confirmQuestion) => {
|
||||||
this.userService.deleteUser(user)
|
if (confirm(confirmQuestion)) {
|
||||||
.subscribe((res) => {
|
this.userService.deleteUser(user)
|
||||||
});
|
.subscribe((res) => {
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
filterUsers(action?, group?: MatButtonToggleGroup) {
|
filterUsers(action?, group?: MatButtonToggleGroup) {
|
||||||
|
|
|
@ -42,5 +42,12 @@
|
||||||
|
|
||||||
"public.army.headline": "Übersicht über alle Spieler, Squads und Armeen",
|
"public.army.headline": "Übersicht über alle Spieler, Squads und Armeen",
|
||||||
"public army.squad.members": "Mitglieder:",
|
"public army.squad.members": "Mitglieder:",
|
||||||
"public.army.members": "Armeemitglieder:"
|
"public.army.members": "Armeemitglieder:",
|
||||||
|
|
||||||
|
"public.army.member.button.back": "Zurück",
|
||||||
|
"public.army.member.button.copy": "kopieren",
|
||||||
|
"public.army.member.headline": "Auszeichnungen von {{name}}",
|
||||||
|
"public.army.member.awards.title": "Bezeichnung",
|
||||||
|
"public.army.member.awards.reason": "Begründung",
|
||||||
|
"public.army.member.awards.date": "Verliehen am"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
"public.error.message.required": "{{fieldName}} ist ein Pflichtfeld",
|
||||||
|
"public.error.message.min.length": "{{fieldName}} muss mindestens {{boundary}} Zeichen enthalten",
|
||||||
|
"public.error.message.max.length": "{{fieldName}} darf maximal {{boundary}} Zeichen enthalten",
|
||||||
|
"public.error.message.email": "Bitte geben Sie eine gültige E-Mail Adresse an",
|
||||||
|
"public.error.message.no.user": "Der eingetragene Benutzer existiert nicht.",
|
||||||
|
"public.error.message.default": "{{fieldName}} ist nicht valide",
|
||||||
|
"public.common.search.button": "Suchen",
|
||||||
|
|
||||||
|
"decorations.list.button.add": "Neue Auszeichnung hinzufügen",
|
||||||
|
"decorations.list.button.delete": "Löschen",
|
||||||
|
"decorations.list.filter.global": "Global",
|
||||||
|
"decorations.list.delete.confirm": "Soll die Auszeichnung '{{name}}' ({{fraction}}) wirklich gelöscht werden?",
|
||||||
|
|
||||||
|
"decorations.item.label.sort": " - Sortierung {{value}}",
|
||||||
|
|
||||||
|
"decorations.submit.headline.edit": "Auszeichnung bearbeiten",
|
||||||
|
"decorations.submit.headline.new": "Neue Auszeichnung hinzufügen",
|
||||||
|
"decorations.submit.field.name": "Name",
|
||||||
|
"decorations.submit.field.fraction": "Fraktion",
|
||||||
|
"decorations.submit.field.fraction.global": "Global",
|
||||||
|
"decorations.submit.field.type": "Art",
|
||||||
|
"decorations.submit.field.type.ribbon": "Ordensband",
|
||||||
|
"decorations.submit.field.type.medal": "Orden",
|
||||||
|
"decorations.submit.field.sort": "Sortierung",
|
||||||
|
"decorations.submit.field.description": "Beschreibung",
|
||||||
|
"decorations.submit.field.image": "Bild",
|
||||||
|
"decorations.submit.field.image.error.type": "Bild muss im PNG Format vorliegen",
|
||||||
|
"decorations.submit,button.submit": "Bestätigen",
|
||||||
|
"decorations.submit,button.cancel": "Abbrechen"
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
"ranks.list.button.add": "Neuen Rank hinzufügen",
|
"ranks.list.button.add": "Neuen Rank hinzufügen",
|
||||||
"ranks.list.button.delete": "Löschen",
|
"ranks.list.button.delete": "Löschen",
|
||||||
|
"ranks.list.delete.confirm": "Soll der Rang '{{name}}' ({{fraction}}) wirklich gelöscht werden?",
|
||||||
"ranks.list.item.label.level": " - Stufe {{level}}",
|
"ranks.list.item.label.level": " - Stufe {{level}}",
|
||||||
|
|
||||||
"ranks.submit.headline.new": "Neuen Rang hinzufügen",
|
"ranks.submit.headline.new": "Neuen Rang hinzufügen",
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
"public.common.search.button": "Suchen",
|
"public.common.search.button": "Suchen",
|
||||||
|
|
||||||
"squad.list.tooltip.delete": "Löschen",
|
"squad.list.tooltip.delete": "Löschen",
|
||||||
|
"squad.list.delete.confirm": "Soll das Squad '{{name}}' ({{fraction}}) wirklich gelöscht werden?",
|
||||||
"squad.list.tooltip.new": "Neues Squad hinzufügen",
|
"squad.list.tooltip.new": "Neues Squad hinzufügen",
|
||||||
"squad.submit.new.headline": "Neues Squad hinzufügen",
|
"squad.submit.new.headline": "Neues Squad hinzufügen",
|
||||||
"squad.submit.edit.headline": "Squad bearbeiten",
|
"squad.submit.edit.headline": "Squad bearbeiten",
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
"users.list.tooltip.awards": "Auszeichnungen",
|
"users.list.tooltip.awards": "Auszeichnungen",
|
||||||
"users.list.filter.no.squad": "Ohne Squad",
|
"users.list.filter.no.squad": "Ohne Squad",
|
||||||
"users.list.item.label.no.squad": "ohne Squad/Fraktion",
|
"users.list.item.label.no.squad": "ohne Squad/Fraktion",
|
||||||
|
"ranks.list.delete.confirm": "Soll der Teilnehmer '{{name}}' wirklich gelöscht werden?",
|
||||||
|
|
||||||
"users.award.headline": "Teilnehmer auszeichnen",
|
"users.award.headline": "Teilnehmer auszeichnen",
|
||||||
"users.award.field.decoration": "Auszeichnung",
|
"users.award.field.decoration": "Auszeichnung",
|
||||||
|
|
Loading…
Reference in New Issue