Compare commits

..

No commits in common. "36e213bbbfbff6a97b837c799965805455bfa082" and "0adb9b7cf90042279e6129dfd5b7deeb1e7b2525" have entirely different histories.

73 changed files with 290 additions and 849 deletions

View File

@ -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>
{{'public.army.member.button.back' | translate}} Zurück
</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">
{{'public.army.member.headline' | translate:{name: user.username} }} Auszeichnungen von {{user.username}}
</h3> </h3>
<div class="text-center"> <div class="text-center">
@ -19,9 +19,7 @@
<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"> ngxClipboard [cbContent]="signatureUrl" (cbOnSuccess)="isCopied = true">kopieren</button>
{{'public.army.member.button.copy' | translate}}
</button>
</span> </span>
</div> </div>
@ -31,11 +29,9 @@
<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">{{'public.army.member.awards.title' | translate}}</th> <th class="col-sm-2">Bezeichnung</th>
<th class="col-sm-2">{{'public.army.member.awards.reason' | translate}}</th> <th class="col-sm-2">Begründung</th>
<th class="col-sm-1 text-right" style="border-radius: 0 10px 0 0;"> <th class="col-sm-1 text-right" style="border-radius: 0 10px 0 0;">Verliehen am</th>
{{'public.army.member.awards.date' | translate}}
</th>
</tr> </tr>
</thead> </thead>
<tbody *ngFor="let award of awards"> <tbody *ngFor="let award of awards">
@ -59,6 +55,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,6 +1,5 @@
import {Component, Input, OnInit} from '@angular/core'; import {Component, Input} from '@angular/core';
import {FormGroup, NgForm} from '@angular/forms'; import {FormGroup, NgForm} from '@angular/forms';
import {TranslateService} from '@ngx-translate/core';
@Component({ @Component({
selector: 'show-error', selector: 'show-error',
@ -11,7 +10,7 @@ import {TranslateService} from '@ngx-translate/core';
</div> </div>
</div>` </div>`
}) })
export class ShowErrorComponent implements OnInit { export class ShowErrorComponent {
// tslint:disable-next-line:no-input-rename // tslint:disable-next-line:no-input-rename
@Input('controlPath') controlPath; @Input('controlPath') controlPath;
@ -21,15 +20,10 @@ export class ShowErrorComponent implements OnInit {
private form: FormGroup; private form: FormGroup;
constructor(ngForm: NgForm, constructor(ngForm: NgForm) {
private translate: TranslateService) {
this.form = ngForm.form; this.form = ngForm.form;
} }
ngOnInit() {
this.translate.setDefaultLang('de');
}
get errorMessages(): string[] { get errorMessages(): string[] {
const control = this.form.get(this.controlPath); const control = this.form.get(this.controlPath);
const messages = []; const messages = [];
@ -43,43 +37,22 @@ export class ShowErrorComponent implements OnInit {
let message = ''; let message = '';
switch (code) { switch (code) {
case 'required': case 'required':
this.translate.get('public.error.message.required', {fieldName: this.displayName}) message = `${this.displayName} ist ein Pflichtfeld`;
.subscribe((res: string) => {
message = res;
});
break; break;
case 'minlength': case 'minlength':
this.translate.get('public.error.message.min.length', { message = `${this.displayName} muss mindestens ${error.requiredLength} Zeichen enthalten`;
fieldName: this.displayName,
boundary: error.requiredLength
})
.subscribe((res: string) => {
message = res;
});
break; break;
case 'maxlength': case 'maxlength':
this.translate.get('public.error.message.max.length', { message = `${this.displayName} darf maximal ${error.requiredLength} Zeichen enthalten`;
fieldName: this.displayName,
boundary: error.requiredLength
})
.subscribe((res: string) => {
message = res;
});
break; break;
case 'invalidEMail': case 'invalidEMail':
this.translate.get('public.error.message.email').subscribe((res: string) => { message = `Bitte geben Sie eine gültige E-Mail Adresse an`;
message = res;
});
break; break;
case 'userNotFound': case 'userNotFound':
this.translate.get('public.error.message.no.user').subscribe((res: string) => { message = `Der eingetragene Benutzer existiert nicht.`;
message = res;
});
break; break;
default: default:
this.translate.get('public.error.message.default', {fieldName: name}).subscribe((res: string) => { message = `${name} ist nicht valide`;
message = res;
});
} }
messages.push(message); messages.push(message);
} }

View File

@ -1,13 +1,12 @@
<div class="input-group list-header pull-left"> <div class="input-group list-header pull-left">
<mat-button-toggle-group #group="matButtonToggleGroup"> <mat-button-toggle-group #group="matButtonToggleGroup">
<mat-button-toggle *ngFor="let button of filterButtons" value="{{button.value}}" (change)="execute(group)"> <mat-button-toggle *ngFor="let button of filterButtons" value="{{button.value}}" (change)="execute(group)">
<span *ngIf="button.label !== fraction.BLUFOR && button.label !== fraction.OPFOR">{{button.label | translate}}</span> {{button.label}}
<span *ngIf="button.label === fraction.BLUFOR || button.label === fraction.OPFOR">{{button.label}}</span>
</mat-button-toggle> </mat-button-toggle>
</mat-button-toggle-group> </mat-button-toggle-group>
<button mat-icon-button <button mat-icon-button
class="add-btn" class="add-btn"
matTooltip="{{addButton.tooltip | translate}}" matTooltip="{{addButton.tooltip}}"
(click)="add()"> (click)="add()">
<mat-icon svgIcon="{{addButton.svgIcon}}"> <mat-icon svgIcon="{{addButton.svgIcon}}">
</mat-icon> </mat-icon>

View File

@ -1,5 +1,4 @@
import {Component, EventEmitter, Input, Output} from '@angular/core'; import {Component, EventEmitter, Input, Output} from '@angular/core';
import {Fraction} from '../../../utils/fraction.enum';
@Component({ @Component({
selector: 'cc-list-filter', selector: 'cc-list-filter',
@ -16,8 +15,6 @@ export class ListFilterComponent {
@Output() openAddFrom = new EventEmitter(); @Output() openAddFrom = new EventEmitter();
readonly fraction = Fraction;
constructor() { constructor() {
} }

View File

@ -6,7 +6,7 @@
<span class="input-group-btn"> <span class="input-group-btn">
<button class="btn btn-default" type="button" <button class="btn btn-default" type="button"
(click)="emitSearch()"> (click)="emitSearch()">
{{'public.common.search.button' | translate}} Suchen
</button> </button>
</span> </span>
</div> </div>

View File

@ -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'">{{'decorations.list.filter.global' | translate}}</small> <small *ngIf="decoration.fraction == 'GLOBAL'">Global</small>
<small>{{'decorations.item.label.sort' | translate:{value: decoration.sortingNumber} }}</small> <small> - Sortierung: {{decoration.sortingNumber}}</small>
</div> </div>
<div class="col-xs-4"> <div class="col-xs-4">
@ -18,8 +18,7 @@
[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="{{'decorations.list.button.delete' | translate}}" <span (click)="delete(); $event.stopPropagation()" matTooltip="Löschen" class="glyphicon glyphicon-trash trash"></span>
class="glyphicon glyphicon-trash trash"></span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -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: 'decorations.list.filter.global', value: 'GLOBAL'}]" {label: 'Global', value: 'GLOBAL'}]"
[addButton]="{svgIcon: 'add', tooltip: 'decorations.list.button.add'}" [addButton]="{svgIcon: 'add', tooltip: 'Neue Auszeichnung hinzufügen'}"
(executeSearch)="filterDecorations($event)" (executeSearch)="filterDecorations($event)"
(openAddFrom)="openNewDecorationForm()"> (openAddFrom)="openNewDecorationForm()">
</cc-list-filter> </cc-list-filter>

View File

@ -8,7 +8,6 @@ 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',
@ -29,8 +28,7 @@ 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() {
@ -62,16 +60,11 @@ export class DecorationListComponent implements OnInit {
fraction = Fraction.OPFOR; fraction = Fraction.OPFOR;
} }
this.translate.get('decorations.list.delete.confirm', { if (confirm('Soll die Auszeichnung "' + decoration.name + '" (' + fraction + ') wirklich gelöscht werden?')) {
name: decoration.name,
fraction: fraction
}).subscribe((confirmQuestion) => {
if (confirm(confirmQuestion)) {
this.decorationService.deleteDecoration(decoration) this.decorationService.deleteDecoration(decoration)
.subscribe((res) => { .subscribe((res) => {
}); });
} }
})
} }
filterDecorations(group?: MatButtonToggleGroup) { filterDecorations(group?: MatButtonToggleGroup) {

View File

@ -4,35 +4,11 @@ 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],
imports: [ providers: [DecorationStore, DecorationService]
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;

View File

@ -3,13 +3,8 @@ 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,
@ -28,6 +23,5 @@ export const decorationsRoutes: Routes = [
export const decorationRoutesModule: ModuleWithProviders = RouterModule.forChild(decorationsRoutes); export const decorationRoutesModule: ModuleWithProviders = RouterModule.forChild(decorationsRoutes);
export const decorationsRoutingComponents = [DecorationsComponent, DecorationItemComponent, DecorationListComponent, export const decorationsRoutingComponents = [DecorationItemComponent, DecorationListComponent, EditDecorationComponent];
EditDecorationComponent];

View File

@ -1 +0,0 @@
<router-outlet></router-outlet>

View File

@ -1,14 +0,0 @@
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');
}
}

View File

@ -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">{{'decorations.submit.headline.edit' | translate}}</h3> <h3 *ngIf="decoration._id">Auszeichnung editieren</h3>
<h3 *ngIf="!decoration._id">{{'decorations.submit.headline.new' | translate}}</h3> <h3 *ngIf="!decoration._id">Neue Auszeichnung hinzufügen</h3>
<div class="form-group"> <div class="form-group">
<label for="title">{{'decorations.submit.field.name' | translate}}</label> <label for="title">Name</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="{{'decorations.submit.field.name' | translate}}" controlPath="title"></show-error> <show-error displayName="Name" controlPath="title"></show-error>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="fraction">{{'decorations.submit.field.fraction' | translate}}</label> <label for="fraction">Fraktion</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">{{'decorations.submit.field.fraction.global' | translate}}</option> <option value="GLOBAL">Global</option>
</select> </select>
<show-error displayName="{{'decorations.submit.field.fraction' | translate}}" controlPath="fraction"></show-error> <show-error displayName="Fraktion" controlPath="fraction"></show-error>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="type">{{'decorations.submit.field.type' | translate}}</label> <label for="type">Art</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">{{'decorations.submit.field.type.medal' | translate}}</option> <option value="true">Orden</option>
<option value="false">{{'decorations.submit.field.type.ribbon' | translate}}</option> <option value="false">Ribbon</option>
</select> </select>
<show-error displayName="{{'decorations.submit.field.type' | translate}}" controlPath="type"></show-error> <show-error displayName="Art" controlPath="type"></show-error>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="sort">{{'decorations.submit.field.sort' | translate}}</label> <label for="sort">Sortierung</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="{{'decorations.submit.field.sort' | translate}}" controlPath="sort"></show-error> <show-error displayName="Sortierung" controlPath="sort"></show-error>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="description">{{'decorations.submit.field.description' | translate}}</label> <label for="description">Beschreibung</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="{{'decorations.submit.field.description' | translate}}" controlPath="description"></show-error> <show-error displayName="Beschreibung" controlPath="description"></show-error>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="graphic">{{'decorations.submit.field.image' | translate}}</label> <label for="graphic">Bild</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">
{{'decorations.submit.field.image.error.type' | translate}} Bild muss im PNG Format vorliegen
</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">
{{'decorations.submit,button.cancel' | translate}} Abbrechen
</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">
{{'decorations.submit,button.submit' | translate}} Bestätigen
</button> </button>
</form> </form>

View File

@ -7,7 +7,6 @@ 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',
@ -32,8 +31,7 @@ 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() {
@ -71,12 +69,7 @@ export class EditDecorationComponent implements OnInit, OnDestroy {
this.router.navigate(['..'], {relativeTo: this.route}); this.router.navigate(['..'], {relativeTo: this.route});
}); });
} else { } else {
this.translate.get('decorations.submit.field.image').subscribe((fieldNameLogo) => { return window.alert(`Bild ist ein Pflichtfeld`);
this.translate.get('public.error.message.required',
{fieldName: fieldNameLogo}).subscribe((message) => {
this.snackBarService.showError(message, 4000);
})
});
} }
} else { } else {
if (this.fileList) { if (this.fileList) {

View File

@ -6,6 +6,7 @@ import {DecorationPanelComponent} from './decoration-overview/decoration-panel/d
import {RankPanelComponent} from './rank-overview/rank-panel/rank-panel.component'; import {RankPanelComponent} from './rank-overview/rank-panel/rank-panel.component';
import {UserListSheetComponent} from './user-list-sheet/user-list-sheet.component'; import {UserListSheetComponent} from './user-list-sheet/user-list-sheet.component';
import {PublicComponent} from './public.component'; import {PublicComponent} from './public.component';
import {StatisticComponent} from '../statistic/stats.component';
export const publicRoutes: Routes = [ export const publicRoutes: Routes = [
{ {

View File

@ -1,43 +1,44 @@
<form #form="ngForm" (keydown.enter)="$event.preventDefault()" class="overview"> <form #form="ngForm" (keydown.enter)="$event.preventDefault()" class="overview">
<h3 *ngIf="rank._id">{{'ranks.submit.headline.edit' | translate}}</h3> <h3 *ngIf="rank._id">Rang editieren</h3>
<h3 *ngIf="!rank._id">{{'ranks.submit.headline.new' | translate}}</h3> <h3 *ngIf="!rank._id">Neuen Rang hinzufügen</h3>
<div class="form-group"> <div class="form-group">
<label for="title">{{'ranks.submit.field.name' | translate}}</label> <label for="title">Name</label>
<input type="text" class="form-control" <input type="text" class="form-control"
[(ngModel)]="rank.name" [(ngModel)]="rank.name"
name="title" name="title"
id="title" id="title"
required maxlength="50"/> required maxlength="50"/>
<show-error displayName="{{'ranks.submit.field.name' | translate}}" controlPath="title"></show-error>
<show-error displayName="Name" controlPath="title"></show-error>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="fraction">{{'ranks.submit.field.fraction' | translate}}</label> <label for="fraction">Fraktion</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)]="rank.fraction"> [(ngModel)]="rank.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>
</select> </select>
<show-error displayName="{{'ranks.submit.field.fraction' | translate}}" controlPath="fraction"></show-error> <show-error displayName="Fraktion" controlPath="fraction"></show-error>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="level">{{'ranks.submit.field.level' | translate}}</label> <label for="level">Stufe</label>
<input id="level" name="level" type="number" class="form-control btn dropdown-toggle" <input id="level" name="level" type="number" class="form-control btn dropdown-toggle"
[(ngModel)]="rank.level"> [(ngModel)]="rank.level">
<show-error displayName="{{'ranks.submit.field.level' | translate}}" controlPath="level"></show-error> <show-error displayName="Stufe" controlPath="level"></show-error>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="logo">{{'ranks.submit.field.image' | translate}}</label> <label for="logo">Bild</label>
<input id="logo" name="logo" class="ui-button form-control" type="file" <input id="logo" name="logo" class="ui-button form-control" type="file"
accept="image/png" accept="image/png"
#fileInput #fileInput
(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">
{{'ranks.submit.field.image.error.format' | translate}} Bild muss im PNG Format vorliegen
</span> </span>
<img class="preview-image" src="{{imagePreviewSrc}}"> <img class="preview-image" src="{{imagePreviewSrc}}">
@ -46,7 +47,7 @@
<button id="cancel" <button id="cancel"
(click)="cancel()" (click)="cancel()"
class="btn btn-default"> class="btn btn-default">
{{'ranks.submit.button.cancel' | translate}} Abbrechen
</button> </button>
<button id="save" <button id="save"
@ -54,6 +55,6 @@
(click)="saveRank(fileInput)" (click)="saveRank(fileInput)"
class="btn btn-default" class="btn btn-default"
[disabled]="!form.valid"> [disabled]="!form.valid">
{{'ranks.submit.button.submit' | translate}} Bestätigen
</button> </button>
</form> </form>

View File

@ -7,7 +7,6 @@ import {Subscription} from 'rxjs/Subscription';
import {Fraction} from '../../utils/fraction.enum'; import {Fraction} from '../../utils/fraction.enum';
import {Message} from '../../i18n/de.messages'; import {Message} from '../../i18n/de.messages';
import {SnackBarService} from '../../services/user-interface/snack-bar/snack-bar.service'; import {SnackBarService} from '../../services/user-interface/snack-bar/snack-bar.service';
import {TranslateService} from '@ngx-translate/core';
@Component({ @Component({
@ -35,8 +34,7 @@ export class EditRankComponent implements OnInit, OnDestroy {
constructor(private route: ActivatedRoute, constructor(private route: ActivatedRoute,
private router: Router, private router: Router,
private rankService: RankService, private rankService: RankService,
private snackBarService: SnackBarService, private snackBarService: SnackBarService) {
private translate: TranslateService) {
} }
ngOnInit() { ngOnInit() {
@ -75,12 +73,7 @@ export class EditRankComponent implements OnInit, OnDestroy {
this.router.navigate(['..'], {relativeTo: this.route}); this.router.navigate(['..'], {relativeTo: this.route});
}); });
} else { } else {
this.translate.get('ranks.submit.field.image').subscribe((fieldNameIMage) => { return window.alert(`Bild ist ein Pflichtfeld`);
this.translate.get('public.error.message.required',
{fieldName: fieldNameIMage}).subscribe((message) => {
this.snackBarService.showError(message, 4000);
})
});
} }
} else { } else {
if (this.fileList) { if (this.fileList) {
@ -102,4 +95,12 @@ export class EditRankComponent implements OnInit, OnDestroy {
this.router.navigate([this.rank._id ? '../..' : '..'], {relativeTo: this.route}); this.router.navigate([this.rank._id ? '../..' : '..'], {relativeTo: this.route});
return false; return false;
} }
canDeactivate(): boolean {
if (this.saved || !this.form.dirty) {
return true;
}
return window.confirm(`Ihr Formular besitzt ungespeicherte Änderungen, möchten Sie die Seite wirklich verlassen?`);
}
} }

View File

@ -8,13 +8,12 @@
<br> <br>
<small *ngIf="rank.fraction == 'OPFOR'">{{fraction.OPFOR}}</small> <small *ngIf="rank.fraction == 'OPFOR'">{{fraction.OPFOR}}</small>
<small *ngIf="rank.fraction == 'BLUFOR'">{{fraction.BLUFOR}}</small> <small *ngIf="rank.fraction == 'BLUFOR'">{{fraction.BLUFOR}}</small>
<small>{{'ranks.list.item.label.level' | translate:{level: rank.level} }}</small> <small> - Stufe {{rank.level}}</small>
</div> </div>
<div class="col-xs-4"> <div class="col-xs-4">
<img src="{{imageSrc}}" class="rank-list-preview"> <img src="{{imageSrc}}" class="rank-list-preview">
<span (click)="delete(); $event.stopPropagation()" matTooltip="{{'ranks.list.button.delete' | translate}}" <span (click)="delete(); $event.stopPropagation()" matTooltip="Löschen" class="glyphicon glyphicon-trash trash"></span>
class="glyphicon glyphicon-trash trash"></span>
</div> </div>
</div> </div>

View File

@ -2,7 +2,7 @@
<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'}]"
[addButton]="{svgIcon: 'add', tooltip: 'ranks.list.button.add'}" [addButton]="{svgIcon: 'add', tooltip: 'Neuen Rang hinzufügen'}"
(executeSearch)="filterRanks($event)" (executeSearch)="filterRanks($event)"
(openAddFrom)="openNewRankForm()"> (openAddFrom)="openNewRankForm()">
</cc-list-filter> </cc-list-filter>

View File

@ -8,7 +8,6 @@ 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',
@ -29,8 +28,7 @@ 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() {
@ -62,15 +60,10 @@ 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;
this.translate.get('ranks.list.delete.confirm', { if (confirm('Soll der Rang ' + rank.name + ' (' + fraction + ') wirklich gelöscht werden?')) {
name: rank.name,
fraction: fraction
}).subscribe((confirmQuestion) => {
if (confirm(confirmQuestion)) {
this.rankService.deleteRank(rank) this.rankService.deleteRank(rank)
.subscribe((res) => { .subscribe((res) => {
}); });
} }
});
} }
} }

View File

@ -1 +0,0 @@
<router-outlet></router-outlet>

View File

@ -1,14 +0,0 @@
import { Component } from '@angular/core';
import {TranslateService} from '@ngx-translate/core';
@Component({
selector: 'cc-ranks-root',
templateUrl: './ranks.component.html',
styleUrls: ['./ranks.component.scss']
})
export class RanksComponent {
constructor(private translate: TranslateService) {
translate.setDefaultLang('de');
}
}

View File

@ -4,34 +4,11 @@ import {SharedModule} from '../shared.module';
import {CommonModule} from '@angular/common'; import {CommonModule} from '@angular/common';
import {RankService} from '../services/army-management/rank.service'; import {RankService} from '../services/army-management/rank.service';
import {RankStore} from '../services/stores/rank.store'; import {RankStore} from '../services/stores/rank.store';
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/ranks/', '.json');
}
@NgModule({ @NgModule({
declarations: ranksRoutingComponents, declarations: ranksRoutingComponents,
imports: [ imports: [CommonModule, SharedModule, rankRouterModule],
CommonModule, providers: [RankStore, RankService]
SharedModule,
rankRouterModule,
TranslateModule.forChild({
loader: {
provide: TranslateLoader,
useFactory: (createTranslateLoader),
deps: [HttpClient]
},
isolate: true
})
],
providers: [
RankStore,
RankService
]
}) })
export class RanksModule { export class RanksModule {
static routes = rankRouterModule; static routes = rankRouterModule;

View File

@ -3,13 +3,8 @@ import {RankListComponent} from './rank-list/rank-list.component';
import {EditRankComponent} from './edit-rank/edit-rank.component'; import {EditRankComponent} from './edit-rank/edit-rank.component';
import {RankItemComponent} from './rank-list/rank-item.component'; import {RankItemComponent} from './rank-list/rank-item.component';
import {ModuleWithProviders} from '@angular/core'; import {ModuleWithProviders} from '@angular/core';
import {RanksComponent} from './ranks.component';
export const ranksRoutes: Routes = [ export const ranksRoutes: Routes = [
{
path: '',
component: RanksComponent,
},
{ {
path: '', path: '',
component: RankListComponent, component: RankListComponent,
@ -28,4 +23,5 @@ export const ranksRoutes: Routes = [
export const rankRouterModule: ModuleWithProviders = RouterModule.forChild(ranksRoutes); export const rankRouterModule: ModuleWithProviders = RouterModule.forChild(ranksRoutes);
export const ranksRoutingComponents = [RanksComponent, RankItemComponent, RankListComponent, EditRankComponent]; export const ranksRoutingComponents = [RankItemComponent, RankListComponent, EditRankComponent];

View File

@ -1,8 +1,8 @@
<form #form="ngForm" class="overview"> <form #form="ngForm" class="overview">
<h3>{{'request.award.headline' | translate}}</h3> <h3>Auszeichnung beantragen</h3>
<div class="form-group"> <div class="form-group">
<label for="user">{{'request.award.field.user' | translate}}</label> <label for="user">Teilnehmer</label>
<select class="form-control" <select class="form-control"
name="user" name="user"
id="user" id="user"
@ -10,7 +10,7 @@
[compareWith]="equals" [compareWith]="equals"
(change)="toggleUser()" (change)="toggleUser()"
required> required>
<option [ngValue]="{_id: '0'}">{{'request.award.field.user.placeholder' | translate}}</option> <option [ngValue]="{_id: '0'}">Auswählen...</option>
<option *ngFor="let user of users" [ngValue]="user"> <option *ngFor="let user of users" [ngValue]="user">
{{user.username}} {{user.username}}
</option> </option>
@ -18,7 +18,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="decoration">{{'request.award.field.award' | translate}}</label> <label for="decoration">Auszeichnung</label>
<select class="form-control" <select class="form-control"
name="decoration" name="decoration"
id="decoration" id="decoration"
@ -26,7 +26,7 @@
[compareWith]="equals" [compareWith]="equals"
(change)="toggleDecoPreview(decoDescription, decoPreview)" (change)="toggleDecoPreview(decoDescription, decoPreview)"
required> required>
<option [ngValue]="{_id: '0'}">{{'request.award.field.award.placeholder' | translate}}</option> <option [ngValue]="{_id: '0'}">Auswählen...</option>
<option *ngFor="let deco of decorations" [ngValue]="deco"> <option *ngFor="let deco of decorations" [ngValue]="deco">
{{deco.name}} {{deco.name}}
</option> </option>
@ -44,35 +44,35 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="reason">{{'request.award.field.reason' | translate}}</label> <label for="reason">Begründung</label>
<textarea class="form-control center-block" name="reason" [(ngModel)]="reason" required <textarea class="form-control center-block" name="reason" [(ngModel)]="reason" required
id="reason" placeholder="{{'request.award.field.reason.placeholder' | translate}}" rows="3"></textarea> id="reason" placeholder="Begründung eingeben..." rows="3"></textarea>
</div> </div>
<button id="cancel" <button id="cancel"
(click)="cancel()" (click)="cancel()"
class="btn btn-default"> class="btn btn-default">
{{'request.award.button.cancel' | translate}} Abbrechen
</button> </button>
<button id="save" <button id="save"
(click)="addAwarding(decoPreview, decoDescription)" (click)="addAwarding(decoPreview, decoDescription)"
class="btn btn-default" class="btn btn-default"
[disabled]="!form.valid || user._id === '0' || decoration._id === '0'"> [disabled]="!form.valid || user._id === '0' || decoration._id === '0'">
{{'request.award.button.submit' | translate}} Bestätigen
</button> </button>
<div class="table-container" *ngIf="showForm"> <div class="table-container" *ngIf="showForm">
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
<th class="col-sm-1">{{'request.award.table.head.image' | translate}}</th> <th class="col-sm-1">Bild</th>
<th class="col-sm-2">{{'request.award.table.head.name' | translate}}</th> <th class="col-sm-2">Bezeichnung</th>
<th class="col-sm-2">{{'request.award.table.head.reason' | translate}}</th> <th class="col-sm-2">Begründung</th>
<th class="col-sm-1 ">{{'request.award.table.head.requester' | translate}}</th> <th class="col-sm-1 ">Antragsteller</th>
<th class="col-sm-1 text-right">{{'request.award.table.head.date' | translate}}</th> <th class="col-sm-1 text-right">Datum</th>
<th class="col-sm-1 text-center">{{'request.award.table.head.status' | translate}}</th> <th class="col-sm-1 text-center">Status</th>
<th class="col-sm-2 text-right">{{'request.award.table.head.reject.reason' | translate}}</th> <th class="col-sm-2 text-right">Grund für Ablehnung</th>
</tr> </tr>
</thead> </thead>
<tbody *ngFor="let award of awards"> <tbody *ngFor="let award of awards">
@ -96,15 +96,7 @@
{{award.date | date: 'dd.MM.yyyy'}} {{award.date | date: 'dd.MM.yyyy'}}
</td> </td>
<td class="text-center"> <td class="text-center">
<span *ngIf="award.confirmed === 0"> {{award.confirmed === 0? 'In Bearbeitung' : (award.confirmed === 1? 'Genehmigt' : 'Abgelehnt')}}
{{'request.award.table.status.progressing' | translate}}
</span>
<span *ngIf="award.confirmed === 1">
{{'request.award.table.status.accepted' | translate}}
</span>
<span *ngIf="award.confirmed !== 0 && award.confirmed !== 1">
{{'request.award.table.status.rejected' | translate}}
</span>
</td> </td>
<td class="text-right"> <td class="text-right">
{{award.rejectReason ? award.rejectReason : ''}} {{award.rejectReason ? award.rejectReason : ''}}

View File

@ -82,10 +82,10 @@ export class RequestAwardComponent implements OnInit {
addAwarding(previewImage, descriptionField) { addAwarding(previewImage, descriptionField) {
if (this.decoration._id && this.reason.length > 0) { if (this.decoration._id && this.reason.length > 0) {
const award: Award = { const award: Award = {
userId: this.user._id, 'userId': this.user._id,
decorationId: this.decoration._id, 'decorationId': this.decoration._id,
reason: this.reason, 'reason': this.reason,
date: Date.now() 'date': Date.now()
}; };
this.awardingService.requestAwarding(award).subscribe(() => { this.awardingService.requestAwarding(award).subscribe(() => {
this.awardingService.getUserAwardings(this.user._id) this.awardingService.getUserAwardings(this.user._id)

View File

@ -1,18 +1,18 @@
<form #form="ngForm" class="overview"> <form #form="ngForm" class="overview">
<h3>{{'request.confirm.award.headline' | translate}}</h3> <h3>Offene Anträge - Auszeichnungen</h3>
<div class="table-container"> <div class="table-container">
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
<th class="col-sm-1">{{'request.confirm.award.table.head.participant' | translate}}</th> <th class="col-sm-1">Teilnehmer</th>
<th class="col-sm-1"></th> <th class="col-sm-1"></th>
<th class="col-sm-2">{{'request.confirm.award.table.head.award' | translate}}</th> <th class="col-sm-2">Auszeichnung</th>
<th class="col-sm-2">{{'request.confirm.award.table.head.reason' | translate}}</th> <th class="col-sm-2">Begründung</th>
<th class="col-sm-1 ">{{'request.confirm.award.table.head.requester' | translate}}</th> <th class="col-sm-1 ">Antragsteller</th>
<th class="col-sm-1 text-right">{{'request.confirm.award.table.head.date' | translate}}</th> <th class="col-sm-1 text-right">Datum</th>
<th class="col-sm-2 text-right"></th> <th class="col-sm-2 text-right"></th>
<th class="col-sm-1 text-right">{{'request.confirm.award.table.head.action' | translate}}</th> <th class="col-sm-1 text-right">Aktion</th>
</tr> </tr>
</thead> </thead>
<tbody *ngFor="let award of awards"> <tbody *ngFor="let award of awards">
@ -43,19 +43,16 @@
<td> <td>
<textarea style="width: 100%;" <textarea style="width: 100%;"
rows="3" rows="3"
placeholder="{{'request.confirm.award.table.reject.reason.placeholder' | translate}}" placeholder="Begründung für Ablehnung (optional)"
#rejectReason></textarea> #rejectReason></textarea>
</td> </td>
<td class="text-right"> <td class="text-right">
<a class="action" (click)="confirm(award, true, reason.value)"> <a class="action" (click)="confirm(award, true, reason.value)">Bestätigen</a><br>
{{'request.confirm.award.table.button.action.accept' | translate}} <a class="action" (click)="confirm(award, false, reason.value, rejectReason.value)">Ablehnen</a>
</a><br>
<a class="action" (click)="confirm(award, false, reason.value, rejectReason.value)">
{{'request.confirm.award.table.button.action.reject' | translate}}
</a>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</form> </form>

View File

@ -1,18 +1,18 @@
<form #form="ngForm" class="overview"> <form #form="ngForm" class="overview">
<h3>{{'request.confirm.promotion.headline' | translate}}</h3> <h3>Offene Anträge - Beförderung</h3>
<div class="table-container"> <div class="table-container">
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
<th class="col-sm-1">{{'request.confirm.promotion.table.head.participant' | translate}}</th> <th class="col-sm-1">Teilnehmer</th>
<th class="col-sm-1">{{'request.confirm.promotion.table.head.rank.before' | translate}}</th> <th class="col-sm-1">Alter Rang</th>
<th class="col-sm-1">{{'request.confirm.promotion.table.head.rank.after' | translate}}</th> <th class="col-sm-1">Neuer Rang</th>
<th class="col-sm-1 ">{{'"request.confirm.promotion.table.head.requester' | translate}}</th> <th class="col-sm-1 ">Antragsteller</th>
<th class="col-sm-1 text-center">{{'request.confirm.promotion.table.head.date' | translate}}</th> <th class="col-sm-1 text-center">Datum</th>
<th class="col-sm-1 text-center">{{'request.confirm.promotion.table.head.status' | translate}}</th> <th class="col-sm-1 text-center">Status</th>
<th class="col-sm-2 text-right"></th> <th class="col-sm-2 text-right"></th>
<th class="col-sm-1 text-right">{{'request.confirm.promotion.table.head.action' | translate}}</th> <th class="col-sm-1 text-right">Aktion</th>
</tr> </tr>
</thead> </thead>
<tbody *ngFor="let promotion of promotions"> <tbody *ngFor="let promotion of promotions">
@ -33,29 +33,17 @@
{{promotion.timestamp | date: 'dd.MM.yyyy'}} {{promotion.timestamp | date: 'dd.MM.yyyy'}}
</td> </td>
<td class="text-center"> <td class="text-center">
<span *ngIf="promotion.confirmed === 0"> {{promotion.confirmed === 0? 'In Bearbeitung' : (promotion.confirmed === 1? 'Genehmigt' : 'Abgelehnt')}}
{{'request.confirm.promotion.table.status.progressing' | translate}}
</span>
<span *ngIf="promotion.confirmed === 1">
{{'request.confirm.promotion.table.status.accepted' | translate}}
</span>
<span *ngIf="promotion.confirmed !== 0 && promotion.confirmed !== 1">
{{'request.confirm.promotion.table.status.rejected' | translate}}
</span>
</td> </td>
<td> <td>
<textarea style="width: 100%;" <textarea style="width: 100%;"
rows="3" rows="3"
placeholder="{{'request.confirm.promotion.table.reject.reason.placeholder' | translate}}" placeholder="Begründung für Ablehnung (optional)"
#rejectReason></textarea> #rejectReason></textarea>
</td> </td>
<td class="text-right"> <td class="text-right">
<a class="action" (click)="confirm(promotion, true)"> <a class="action" (click)="confirm(promotion, true)">Bestätigen</a><br>
{{'request.confirm.promotion.table.button.action.accept' | translate}} <a class="action" (click)="confirm(promotion, false, rejectReason.value)">Ablehnen</a>
</a><br>
<a class="action" (click)="confirm(promotion, false, rejectReason.value)">
{{'request.confirm.promotion.table.button.action.reject' | translate}}
</a>
</td> </td>
</tr> </tr>
</tbody> </tbody>

View File

@ -1,8 +1,8 @@
<form #form="ngForm" class="overview"> <form #form="ngForm" class="overview">
<h3>{{'request.promotion.headline' | translate}}</h3> <h3>Beförderung beantragen</h3>
<div class="form-group"> <div class="form-group">
<label for="user">{{'request.promotion.field.participant' | translate}}</label> <label for="user">Teilnehmer</label>
<select class="form-control" <select class="form-control"
name="user" name="user"
id="user" id="user"
@ -10,7 +10,7 @@
[compareWith]="equals" [compareWith]="equals"
required required
(change)="toggleUser()"> (change)="toggleUser()">
<option [ngValue]="{_id: '0'}">{{'request.promotion.field.participant.placeholder' | translate}}</option> <option [ngValue]="{_id: '0'}">Auswählen...</option>
<option *ngFor="let user of users" [ngValue]="user"> <option *ngFor="let user of users" [ngValue]="user">
{{user.username}} {{user.username}}
</option> </option>
@ -20,7 +20,7 @@
<div *ngIf="showForm"> <div *ngIf="showForm">
<div class="form-group"> <div class="form-group">
<label for="user">{{'request.promotion.field.rank.before' | translate}}</label> <label for="user">Aktueller Rang</label>
<input class="form-control" <input class="form-control"
[(ngModel)]="selectedUserRank" [(ngModel)]="selectedUserRank"
[ngModelOptions]="{standalone: true}" [ngModelOptions]="{standalone: true}"
@ -28,7 +28,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="decoration">{{'request.promotion.field.rank.after' | translate}}</label> <label for="decoration">Neuer Rang</label>
<select class="form-control" <select class="form-control"
name="decoration" name="decoration"
id="decoration" id="decoration"
@ -46,7 +46,7 @@
<button id="cancel" <button id="cancel"
(click)="cancel()" (click)="cancel()"
class="btn btn-default"> class="btn btn-default">
{{'request.promotion.button.cancel' | translate}} Abbrechen
</button> </button>
<button id="save" <button id="save"
@ -54,7 +54,7 @@
(click)="addPromotion()" (click)="addPromotion()"
class="btn btn-default" class="btn btn-default"
[disabled]="newLevel === user.rankLvl"> [disabled]="newLevel === user.rankLvl">
{{'request.promotion.button.submit' | translate}} Bestätigen
</button> </button>
<div class="table-container"> <div class="table-container">
@ -62,13 +62,13 @@
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
<th class="col-sm-1">{{'request.promotion.table.head.participant' | translate}}</th> <th class="col-sm-1">Teilnehmer</th>
<th class="col-sm-1">{{'request.promotion.table.head.rank.before' | translate}}</th> <th class="col-sm-1">Alter Rang</th>
<th class="col-sm-1">{{'request.promotion.table.head.rank.after' | translate}}</th> <th class="col-sm-1">Neuer Rang</th>
<th class="col-sm-1 ">{{'request.promotion.table.head.requester' | translate}}</th> <th class="col-sm-1 ">Antragsteller</th>
<th class="col-sm-1 text-center">{{'request.promotion.table.head.date' | translate}}</th> <th class="col-sm-1 text-center">Datum</th>
<th class="col-sm-1 text-center">{{'request.promotion.table.head.status' | translate}}</th> <th class="col-sm-1 text-center">Status</th>
<th class="col-sm-2 text-right">{{'request.promotion.table.head.reject.reason' | translate}}</th> <th class="col-sm-2 text-right">Grund für Ablehnung</th>
</tr> </tr>
</thead> </thead>
<tbody *ngFor="let promotion of uncheckedPromotions"> <tbody *ngFor="let promotion of uncheckedPromotions">
@ -89,18 +89,10 @@
{{promotion.timestamp | date: 'dd.MM.yyyy'}} {{promotion.timestamp | date: 'dd.MM.yyyy'}}
</td> </td>
<td class="text-center"> <td class="text-center">
<span *ngIf="promotion.confirmed === 0"> {{promotion.confirmed === 0? 'In Bearbeitung' : (promotion.confirmed === 1? 'Genehmigt' : 'Abgelehnt')}}
{{'request.confirm.promotion.table.status.progressing' | translate}}
</span>
<span *ngIf="promotion.confirmed === 1">
{{'request.confirm.promotion.table.status.accepted' | translate}}
</span>
<span *ngIf="promotion.confirmed !== 0 && promotion.confirmed !== 1">
{{'request.confirm.promotion.table.status.rejected' | translate}}
</span>
</td> </td>
<td class="text-right"> <td class="text-right">
<span *ngIf="promotion.rejectReason">{{promotion.rejectReason}}</span> {{promotion.rejectReason ? promotion.rejectReason : ''}}
</td> </td>
</tr> </tr>
</tbody> </tbody>

View File

@ -98,4 +98,5 @@ export class RequestPromotionComponent implements OnInit {
return o1._id === o2._id; return o1._id === o2._id;
} }
} }
} }

View File

@ -1,13 +1,11 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {TranslateService} from '@ngx-translate/core';
@Component({ @Component({
selector: 'cc-request-root', selector: 'cc-request',
templateUrl: 'request.component.html', templateUrl: 'request.component.html',
styleUrls: ['request.component.css'] styleUrls: ['request.component.css']
}) })
export class RequestComponent { export class RequestComponent {
constructor(private translate: TranslateService) { constructor() {
translate.setDefaultLang('de');
} }
} }

View File

@ -9,38 +9,11 @@ import {ConfirmPromotionComponent} from './confirm-promotion/confirm-promotion.c
import {RequestAwardComponent} from './award/req-award.component'; import {RequestAwardComponent} from './award/req-award.component';
import {RequestPromotionComponent} from './promotion/req-promotion.component'; import {RequestPromotionComponent} from './promotion/req-promotion.component';
import {SqlDashboardComponent} from './sql-dashboard/sql-dashboard.component'; import {SqlDashboardComponent} from './sql-dashboard/sql-dashboard.component';
import {HttpClient} from '@angular/common/http';
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
export function createTranslateLoader(http: HttpClient) {
return new TranslateHttpLoader(http, './assets/i18n/request/', '.json');
}
@NgModule({ @NgModule({
declarations: [ declarations: [RequestComponent, RequestPromotionComponent, RequestAwardComponent, ConfirmPromotionComponent,
RequestComponent, ConfirmAwardComponent, SqlDashboardComponent, FilterRankPipe],
RequestPromotionComponent, imports: [CommonModule, SharedModule, requestRouterModule]
RequestAwardComponent,
ConfirmPromotionComponent,
ConfirmAwardComponent,
SqlDashboardComponent,
FilterRankPipe
],
imports: [
CommonModule,
SharedModule,
requestRouterModule,
TranslateModule.forChild({
loader: {
provide: TranslateLoader,
useFactory: (createTranslateLoader),
deps: [HttpClient]
},
isolate: true
})
]
}) })
export class RequestModule { export class RequestModule {
static routes = requestRouterModule; static routes = requestRouterModule;

View File

@ -11,11 +11,9 @@ import {LoginGuardHL, LoginGuardSQL} from '../login';
import {SqlDashboardComponent} from './sql-dashboard/sql-dashboard.component'; import {SqlDashboardComponent} from './sql-dashboard/sql-dashboard.component';
export const requestRoutes: Routes = [ export const requestRoutes: Routes = [{
{ path: '', component: RequestComponent
path: '', },
component: RequestComponent,
children: [
{ {
path: RouteConfig.requestAwardPath, path: RouteConfig.requestAwardPath,
component: RequestAwardComponent, component: RequestAwardComponent,
@ -41,8 +39,6 @@ export const requestRoutes: Routes = [
component: ConfirmPromotionComponent, component: ConfirmPromotionComponent,
canActivate: [LoginGuardHL] canActivate: [LoginGuardHL]
}, },
]
},
]; ];
export const requestRouterModule: ModuleWithProviders = RouterModule.forChild(requestRoutes); export const requestRouterModule: ModuleWithProviders = RouterModule.forChild(requestRoutes);

View File

@ -1,16 +1,16 @@
<div class="overview"> <div class="overview">
<h3>{{'request.sql.dashboard.headline' | translate}}</h3> <h3>SQL Dashboard</h3>
<div class="table-container"> <div class="table-container">
<label>{{'request.confirm.promotion.headline' | translate}}</label> <label>Beförderungsanträge</label>
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
<th class="col-sm-1">{{'request.confirm.promotion.table.head.participant' | translate}}</th> <th class="col-sm-1">Teilnehmer</th>
<th class="col-sm-1">{{'request.confirm.promotion.table.head.rank.before' | translate}}</th> <th class="col-sm-1">Alter Rang</th>
<th class="col-sm-1">{{'request.confirm.promotion.table.head.rank.after' | translate}}</th> <th class="col-sm-1">Neuer Rang</th>
<th class="col-sm-1 ">{{'request.confirm.promotion.table.head.requester' | translate}}</th> <th class="col-sm-1 ">Antragsteller</th>
<th class="col-sm-1 text-center">{{'request.confirm.promotion.table.head.date' | translate}}</th> <th class="col-sm-1 text-center">Datum</th>
</tr> </tr>
</thead> </thead>
<tbody *ngFor="let promotion of promotions"> <tbody *ngFor="let promotion of promotions">
@ -36,16 +36,16 @@
</div> </div>
<div class="table-container"> <div class="table-container">
<label>{{'request.confirm.award.headline' | translate}}</label> <label>Anträge für Orden/ Auszeichnungen</label>
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
<th class="col-sm-1">{{'request.confirm.award.table.head.participant' | translate}}</th> <th class="col-sm-1">Teilnehmer</th>
<th class="col-sm-1"></th> <th class="col-sm-1">Bild</th>
<th class="col-sm-2">{{'request.confirm.award.table.head.award' | translate}}</th> <th class="col-sm-2">Bezeichnung</th>
<th class="col-sm-2">{{'request.confirm.award.table.head.reason' | translate}}</th> <th class="col-sm-2">Begründung</th>
<th class="col-sm-1 ">{{'request.confirm.award.table.head.requester' | translate}}</th> <th class="col-sm-1 ">Antragsteller</th>
<th class="col-sm-1 text-right">{{'request.confirm.award.table.head.date' | translate}}</th> <th class="col-sm-1 text-right">Datum</th>
</tr> </tr>
</thead> </thead>
<tbody *ngFor="let award of awards"> <tbody *ngFor="let award of awards">

View File

@ -1,43 +1,44 @@
<form #form="ngForm" (keydown.enter)="$event.preventDefault()" class="overview"> <form #form="ngForm" (keydown.enter)="$event.preventDefault()" class="overview">
<h3 *ngIf="squad._id">{{'squad.submit.edit.headline' | translate}}</h3> <h3 *ngIf="squad._id">Squad editieren</h3>
<h3 *ngIf="!squad._id">{{'squad.submit.new.headline' | translate}}</h3> <h3 *ngIf="!squad._id">Neues Squad hinzufügen</h3>
<div class="form-group"> <div class="form-group">
<label for="title">{{'squad.submit.field.name' | translate}}</label> <label for="title">Name</label>
<input type="text" class="form-control" <input type="text" class="form-control"
[(ngModel)]="squad.name" [(ngModel)]="squad.name"
name="title" name="title"
id="title" id="title"
required maxlength="50"/> required maxlength="50"/>
<show-error displayName="{{'squad.submit.field.name' | translate}}" controlPath="title"></show-error>
<show-error displayName="Name" controlPath="title"></show-error>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="fraction">{{'squad.submit.field.fraction' | translate}}</label> <label for="fraction">Fraktion</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)]="squad.fraction"> [(ngModel)]="squad.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>
</select> </select>
<show-error displayName="{{'squad.submit.field.fraction' | translate}}" controlPath="fraction"></show-error> <show-error displayName="Fraktion" controlPath="fraction"></show-error>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="sort">{{'squad.submit.field.sort' | translate}}</label> <label for="sort">Sortierung</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)]="squad.sortingNumber"> [(ngModel)]="squad.sortingNumber">
<show-error displayName="{{'squad.submit.field.sort' | translate}}" controlPath="sort"></show-error> <show-error displayName="Sortierung" controlPath="sort"></show-error>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="logo">{{'squad.submit.field.logo' | translate}}</label> <label for="logo">Logo</label>
<input id="logo" name="logo" class="ui-button form-control" type="file" <input id="logo" name="logo" 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">
{{'squad.submit.error.logo.type' | translate}} Bild muss im PNG Format vorliegen
</span> </span>
<img class="preview-image" src="{{imagePreviewSrc}}"> <img class="preview-image" src="{{imagePreviewSrc}}">
@ -46,7 +47,7 @@
<button id="cancel" <button id="cancel"
(click)="cancel()" (click)="cancel()"
class="btn btn-default"> class="btn btn-default">
{{'squad.submit.button.cancel' | translate}} Abbrechen
</button> </button>
<button id="save" <button id="save"
@ -54,6 +55,6 @@
(click)="saveSquad(fileInput)" (click)="saveSquad(fileInput)"
class="btn btn-default" class="btn btn-default"
[disabled]="!form.valid"> [disabled]="!form.valid">
{{'squad.submit.button.submit' | translate}} Bestätigen
</button> </button>
</form> </form>

View File

@ -7,7 +7,6 @@ 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({
@ -35,8 +34,7 @@ export class EditSquadComponent implements OnInit, OnDestroy {
constructor(private route: ActivatedRoute, constructor(private route: ActivatedRoute,
private router: Router, private router: Router,
private squadService: SquadService, private squadService: SquadService,
private snackBarService: SnackBarService, private snackBarService: SnackBarService) {
private translate: TranslateService) {
} }
ngOnInit() { ngOnInit() {
@ -75,12 +73,7 @@ export class EditSquadComponent implements OnInit, OnDestroy {
this.router.navigate(['..'], {relativeTo: this.route}); this.router.navigate(['..'], {relativeTo: this.route});
}); });
} else { } else {
this.translate.get('squad.submit.field.logo').subscribe((fieldNameLogo) => { return window.alert(`Bild ist ein Pflichtfeld`);
this.translate.get('public.error.message.required',
{fieldName: fieldNameLogo}).subscribe((message) => {
this.snackBarService.showError(message, 4000);
})
});
} }
} else { } else {
if (this.fileList) { if (this.fileList) {
@ -102,4 +95,12 @@ export class EditSquadComponent implements OnInit, OnDestroy {
this.router.navigate([this.squad._id ? '../..' : '..'], {relativeTo: this.route}); this.router.navigate([this.squad._id ? '../..' : '..'], {relativeTo: this.route});
return false; return false;
} }
canDeactivate(): boolean {
if (this.saved || !this.form.dirty) {
return true;
}
return window.confirm(`Ihr Formular besitzt ungespeicherte Änderungen, möchten Sie die Seite wirklich verlassen?`);
}
} }

View File

@ -12,9 +12,7 @@
<div class="col-xs-4"> <div class="col-xs-4">
<img src="{{imageSrc}}" height="50px" class="squad-list-preview"> <img src="{{imageSrc}}" height="50px" class="squad-list-preview">
<span (click)="delete(); $event.stopPropagation()" <span (click)="delete(); $event.stopPropagation()" matTooltip="Löschen" class="glyphicon glyphicon-trash trash"></span>
matTooltip="{{'squad.modify.delete' | translate}}"
class="glyphicon glyphicon-trash trash"></span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -2,7 +2,7 @@
<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'}]"
[addButton]="{svgIcon: 'add', tooltip: 'squad.list.tooltip.new'}" [addButton]="{svgIcon: 'add', tooltip: 'Neues Squad hinzufügen'}"
(executeSearch)="filterSquads($event)" (executeSearch)="filterSquads($event)"
(openAddFrom)="openNewSquadForm()"> (openAddFrom)="openNewSquadForm()">
</cc-list-filter> </cc-list-filter>

View File

@ -8,7 +8,6 @@ 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',
@ -29,8 +28,7 @@ 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() {
@ -56,16 +54,11 @@ 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;
this.translate.get('squad.list.delete.confirm', { if (confirm('Soll das Squad "' + squad.name + '" (' + fraction + ') wirklich gelöscht werden?')) {
name: squad.name,
fraction: fraction
}).subscribe((confirmQuestion) => {
if (confirm(confirmQuestion)) {
this.squadService.deleteSquad(squad) this.squadService.deleteSquad(squad)
.subscribe((res) => { .subscribe((res) => {
}); });
} }
});
} }
filterSquads(group?: MatButtonToggleGroup) { filterSquads(group?: MatButtonToggleGroup) {

View File

@ -1 +0,0 @@
<router-outlet></router-outlet>

View File

@ -1,14 +0,0 @@
import {Component} from '@angular/core';
import {TranslateService} from '@ngx-translate/core';
@Component({
selector: 'cc-squads-root',
templateUrl: './squads.component.html',
styleUrls: ['./squads.component.scss']
})
export class SquadsComponent {
constructor(private translate: TranslateService) {
this.translate.setDefaultLang('de');
}
}

View File

@ -4,36 +4,11 @@ import {SharedModule} from '../shared.module';
import {squadRouterModule, squadsRoutingComponents} from './squads.routing'; import {squadRouterModule, squadsRoutingComponents} from './squads.routing';
import {SquadStore} from '../services/stores/squad.store'; import {SquadStore} from '../services/stores/squad.store';
import {SquadService} from '../services/army-management/squad.service'; import {SquadService} from '../services/army-management/squad.service';
import {HttpClient} from '@angular/common/http';
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
export function createTranslateLoader(http: HttpClient) {
return new TranslateHttpLoader(http, './assets/i18n/squads/', '.json');
}
@NgModule({ @NgModule({
declarations: squadsRoutingComponents, declarations: squadsRoutingComponents,
imports: [CommonModule, SharedModule, squadRouterModule],
imports: [ providers: [SquadStore, SquadService]
CommonModule,
SharedModule,
squadRouterModule,
TranslateModule.forChild({
loader: {
provide: TranslateLoader,
useFactory: (createTranslateLoader),
deps: [HttpClient]
},
isolate: true
})
],
providers: [
SquadStore,
SquadService
]
}) })
export class SquadsModule { export class SquadsModule {
static routes = squadRouterModule; static routes = squadRouterModule;

View File

@ -3,13 +3,8 @@ import {SquadListComponent} from './squad-list/squad-list.component';
import {EditSquadComponent} from './edit-squad/edit-squad.component'; import {EditSquadComponent} from './edit-squad/edit-squad.component';
import {ModuleWithProviders} from '@angular/core'; import {ModuleWithProviders} from '@angular/core';
import {SquadItemComponent} from './squad-list/squad-item.component'; import {SquadItemComponent} from './squad-list/squad-item.component';
import {SquadsComponent} from './squads.component';
export const squadsRoutes: Routes = [ export const squadsRoutes: Routes = [
{
path: '',
component: SquadsComponent
},
{ {
path: '', path: '',
component: SquadListComponent, component: SquadListComponent,
@ -24,10 +19,9 @@ export const squadsRoutes: Routes = [
path: 'edit/:id', path: 'edit/:id',
component: EditSquadComponent, component: EditSquadComponent,
outlet: 'right' outlet: 'right'
} }];
];
export const squadRouterModule: ModuleWithProviders = RouterModule.forChild(squadsRoutes); export const squadRouterModule: ModuleWithProviders = RouterModule.forChild(squadsRoutes);
export const squadsRoutingComponents = [SquadsComponent, SquadItemComponent, SquadListComponent, EditSquadComponent]; export const squadsRoutingComponents = [SquadItemComponent, SquadListComponent, EditSquadComponent];

View File

@ -5,7 +5,6 @@ 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',
@ -38,8 +37,7 @@ 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');
} }
@ -95,13 +93,12 @@ 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++) {
this.translate.get(this.tableHead[i].head).subscribe((translated) => { csvOut += this.tableHead[i].head;
csvOut += translated;
if (i !== this.tableHead.length - 1) { if (i !== this.tableHead.length - 1) {
csvOut += ','; 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';

View File

@ -26,11 +26,11 @@
</div> </div>
<div class="form-group" *ngIf="!war._id"> <div class="form-group" *ngIf="!war._id">
<label for="log">{{'stats.war.submit.logfile' | translate}}</label> <label for="log">Logfile</label>
<input id="log" name="log" class="ui-button form-control" type="file" <input id="log" name="log" class="ui-button form-control" type="file"
(change)="fileChange($event)"> (change)="fileChange($event)">
<span class="label label-bg label-danger center-block" style="font-size:small" *ngIf="showFileError"> <span class="label label-bg label-danger center-block" style="font-size:small" *ngIf="showFileError">
{{'stats.war.submit.error.file.format' | translate}} Logfile muss im Format RPT, LOG oder TXT vorliegen
</span> </span>
</div> </div>

View File

@ -8,7 +8,6 @@ import {SnackBarService} from '../../../services/user-interface/snack-bar/snack-
import {SpinnerService} from '../../../services/user-interface/spinner/spinner.service'; import {SpinnerService} from '../../../services/user-interface/spinner/spinner.service';
import {Subscription} from 'rxjs'; import {Subscription} from 'rxjs';
import {Fraction} from '../../../utils/fraction.enum'; import {Fraction} from '../../../utils/fraction.enum';
import {TranslateService} from '@ngx-translate/core';
@Component({ @Component({
@ -39,7 +38,6 @@ export class WarSubmitComponent {
private warService: WarService, private warService: WarService,
private snackBarService: SnackBarService, private snackBarService: SnackBarService,
private spinnerService: SpinnerService, private spinnerService: SpinnerService,
private translate: TranslateService,
public campaignService: CampaignService) { public campaignService: CampaignService) {
this.subscription = this.route.params this.subscription = this.route.params
.map(params => params['id']) .map(params => params['id'])
@ -63,12 +61,7 @@ export class WarSubmitComponent {
saveWar() { saveWar() {
if (!this.fileList) { if (!this.fileList) {
this.translate.get('stats.war.submit.logfile').subscribe((fieldNameLogfile) => { return window.alert(`Logfile ist ein Pflichtfeld`);
this.translate.get('public.error.message.required',
{fieldName: fieldNameLogfile}).subscribe((message) => {
this.snackBarService.showError(message, 4000);
})
})
} }
const file: File = this.fileList[0]; const file: File = this.fileList[0];
this.loading = true; this.loading = true;

View File

@ -1,8 +1,8 @@
<form #form="ngForm" class="overview"> <form #form="ngForm" class="overview">
<h3>{{'users.award.headline' | translate}}</h3> <h3>Teilnehmer auszeichnen</h3>
<div class="form-group"> <div class="form-group">
<label for="decoration">{{'users.award.field.decoration' | translate}}</label> <label for="decoration">Auszeichnung</label>
<select class="form-control" <select class="form-control"
name="decoration" name="decoration"
id="decoration" id="decoration"
@ -11,13 +11,14 @@
[ngModel]="0" [ngModel]="0"
required required
style="min-width: 200px;"> style="min-width: 200px;">
<option [value]="0">{{'users.award.field.decoration.placeholder' | translate}}</option> <option [value]="0">Auswählen...</option>
<option *ngFor="let deco of decorations" [value]="deco._id"> <option *ngFor="let deco of decorations" [value]="deco._id">
{{deco.fraction == 'BLUFOR'? fraction.BLUFOR : deco.fraction == 'OPFOR'? fraction.OPFOR : 'Global'}}: {{deco.fraction == 'BLUFOR'? fraction.BLUFOR : deco.fraction == 'OPFOR'? fraction.OPFOR : 'Global'}}:
{{deco.name}} {{deco.name}}
</option> </option>
</select> </select>
<show-error displayName="{{'users.award.field.decoration' | translate}}" controlPath="decoration"></show-error>
<show-error displayName="Auszeichnung" controlPath="decoration"></show-error>
</div> </div>
<div class="div-table-row" [style.display]="decoPreviewDisplay" style="margin-top: 5px; margin-bottom:10px"> <div class="div-table-row" [style.display]="decoPreviewDisplay" style="margin-top: 5px; margin-bottom:10px">
@ -37,40 +38,37 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="reason">{{'users.award.field.reason' | translate}}</label> <label for="reason">Begründung</label>
<textarea class="form-control center-block" name="reason" [ngModel]="undefined" required <textarea class="form-control center-block" name="reason" [ngModel]="undefined" required
id="reason" placeholder="{{'users.award.field.reason.placeholder' | translate}}" id="reason" placeholder="Begründung eingeben..." rows="3" #awardTextArea></textarea>
rows="3" #awardTextArea> <show-error displayName="Begründung" controlPath="reason"></show-error>
</textarea>
<show-error displayName="{{'users.award.field.reason' | translate}}" controlPath="reason"></show-error>
</div> </div>
<button id="cancel" <button id="cancel"
(click)="cancel()" (click)="cancel()"
class="btn btn-default"> class="btn btn-default">
{{'users.award.button.cancel' | translate}} Abbrechen
</button> </button>
<button id="save" <button id="save"
(click)="addAwarding(decorationField, awardTextArea, decoPreview, decoDescription)" (click)="addAwarding(decorationField, awardTextArea, decoPreview, decoDescription)"
class="btn btn-default" class="btn btn-default"
[disabled]="decorationField.value === '0' || !form.valid"> [disabled]="decorationField.value === '0' || !form.valid">
{{'users.award.button.submit' | translate}} Bestätigen
</button> </button>
<div class="table-container"> <div class="table-container">
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
<th class="col-sm-1">{{'users.award.table.head.image' | translate}}</th> <th class="col-sm-1">Bild</th>
<th class="col-sm-2">{{'users.award.table.head.name' | translate}}</th> <th class="col-sm-2">Bezeichnung</th>
<th class="col-sm-2">{{'users.award.table.head.reason' | translate}}</th> <th class="col-sm-2">Begründung</th>
<th class="col-sm-1 text-right">{{'users.award.table.head.date' | translate}}</th> <th class="col-sm-1 text-right">Datum</th>
<th class="col-sm-1 text-center">{{'users.award.table.head.status' | translate}}</th> <th class="col-sm-1 text-center">Status</th>
<th class="col-sm-1 text-center"> <th class="col-sm-1 text-center">
<span class="btn btn-default" (click)="deleteAwarding()"> <span class="btn btn-default" (click)="deleteAwarding()">Löschen</span>
{{'users.award.table.button.delete' | translate}}
</span>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -92,9 +90,7 @@
<a class="small text-nowrap">{{award.date | date: 'dd.MM.yyyy'}}</a> <a class="small text-nowrap">{{award.date | date: 'dd.MM.yyyy'}}</a>
</td> </td>
<td class="text-center"> <td class="text-center">
{{award.confirmed === 0 ? {{award.confirmed === 0 ? 'In Bearbeitung' : (award.confirmed === 1 ? 'Genehmigt' : 'Abgelehnt')}}
awardStatus['users.award.table.status.in.progress'] : (award.confirmed === 1 ?
awardStatus['users.award.table.status.approved']: awardStatus['users.award.table.status.rejected'])}}
</td> </td>
<td class="text-center"> <td class="text-center">
<label> <label>

View File

@ -7,7 +7,6 @@ import {DecorationService} from '../../services/army-management/decoration.servi
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({
@ -24,8 +23,6 @@ export class AwardUserComponent implements OnInit {
awards: Award[]; awards: Award[];
awardStatus = {};
decoPreviewDisplay = 'none'; decoPreviewDisplay = 'none';
readonly fraction = Fraction; readonly fraction = Fraction;
@ -34,18 +31,10 @@ export class AwardUserComponent implements OnInit {
private route: ActivatedRoute, private route: ActivatedRoute,
private awardingService: AwardingService, private awardingService: AwardingService,
private decorationService: DecorationService, private decorationService: DecorationService,
private snackBarService: SnackBarService, private snackBarService: SnackBarService) {
private translate: TranslateService) {
} }
ngOnInit() { ngOnInit() {
['users.award.table.status.in.progress',
'users.award.table.status.approved',
'users.award.table.status.rejected'].forEach((i18n) => {
this.translate.get(i18n).subscribe((translated) => {
this.awardStatus[i18n] = translated;
})
});
this.decorationService.findDecorations().subscribe(decorations => { this.decorationService.findDecorations().subscribe(decorations => {
this.decorations = decorations; this.decorations = decorations;

View File

@ -1,36 +1,38 @@
<form #form="ngForm" (keydown.enter)="$event.preventDefault()" class="overview"> <form #form="ngForm" (keydown.enter)="$event.preventDefault()" class="overview">
<h3 *ngIf="user._id">{{'user.submit.headline.edit' | translate}}</h3> <h3 *ngIf="user._id">Teilnehmer editieren</h3>
<h3 *ngIf="!user._id">{{'user.submit.headline.new' | translate}}</h3> <h3 *ngIf="!user._id">Neuen Teilnehmer hinzufügen</h3>
<div class="form-group"> <div class="form-group">
<label for="title">{{'user.submit.field.name' | translate}}</label> <label for="title">Name</label>
<input class="form-control" <input class="form-control"
[(ngModel)]="user.username" [(ngModel)]="user.username"
name="title" name="title"
id="title" id="title"
required required
maxlength="50"/> maxlength="50"/>
<show-error displayName="{{'user.submit.field.name' | translate}}" controlPath="title"></show-error>
<show-error displayName="Name" controlPath="title"></show-error>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="squad">{{'user.submit.field.squad' | translate}}</label> <label for="squad">Squad</label>
<select class="form-control" <select class="form-control"
name="squad" name="squad"
id="squad" id="squad"
[(ngModel)]="user.squadId" [(ngModel)]="user.squadId"
[compareWith]="equals" [compareWith]="equals"
(change)="toggleRanks()"> (change)="toggleRanks()">
<option [value]="0">{{'user.submit.field.squad.not.assigned' | translate}}</option> <option [value]="0">Ohne Fraktion/ Squad</option>
<option *ngFor="let squad of squads" [ngValue]="squad"> <option *ngFor="let squad of squads" [ngValue]="squad">
{{squad.fraction == 'BLUFOR'? fraction.BLUFOR : fraction.OPFOR}}: {{squad.name}} {{squad.fraction == 'BLUFOR'? fraction.BLUFOR : fraction.OPFOR}}: {{squad.name}}
</option> </option>
</select> </select>
<show-error displayName="{{'user.submit.field.squad' | translate}}" controlPath="squad"></show-error>
<show-error displayName="Squad" controlPath="squad"></show-error>
</div> </div>
<div class="form-group" [style.display]="ranksDisplay"> <div class="form-group" [style.display]="ranksDisplay">
<label for="rank">{{'user.submit.field.rank' | translate}}</label> <label for="rank">Rang</label>
<select class="form-control" <select class="form-control"
name="rank" name="rank"
id="rank" [ngModel]="user.rankLvl" id="rank" [ngModel]="user.rankLvl"
@ -38,13 +40,14 @@
style="min-width: 200px;"> style="min-width: 200px;">
<option *ngFor="let rank of ranks" [value]="rank.level">{{rank.name}}</option> <option *ngFor="let rank of ranks" [value]="rank.level">{{rank.name}}</option>
</select> </select>
<show-error displayName="{{'user.submit.field.rank' | translate}}" controlPath="rank"></show-error>
<show-error displayName="Rang" controlPath="rank"></show-error>
</div> </div>
<button id="cancel" <button id="cancel"
(click)="cancel()" (click)="cancel()"
class="btn btn-default"> class="btn btn-default">
{{'user.submit.button.cancel' | translate}} Abbrechen
</button> </button>
<button id="save" <button id="save"
@ -52,6 +55,6 @@
(click)="saveUser(rankLevel.value)" (click)="saveUser(rankLevel.value)"
class="btn btn-default" class="btn btn-default"
[disabled]="!form.valid"> [disabled]="!form.valid">
{{'user.submit.button.submit' | translate}} Bestätigen
</button> </button>
</form> </form>

View File

@ -130,4 +130,5 @@ export class EditUserComponent implements OnInit {
return o1._id === o2._id; return o1._id === o2._id;
} }
} }
} }

View File

@ -9,14 +9,12 @@
<small *ngIf="user.squadId && user.squadId.fraction == 'OPFOR'">{{fraction.OPFOR}} - {{user.squadId.name}}</small> <small *ngIf="user.squadId && user.squadId.fraction == 'OPFOR'">{{fraction.OPFOR}} - {{user.squadId.name}}</small>
<small *ngIf="user.squadId && user.squadId.fraction == 'BLUFOR'">{{fraction.BLUFOR}} - {{user.squadId.name}} <small *ngIf="user.squadId && user.squadId.fraction == 'BLUFOR'">{{fraction.BLUFOR}} - {{user.squadId.name}}
</small> </small>
<small *ngIf="!user.squadId">{{'users.list.item.label.no.squad' | translate}}</small> <small *ngIf="!user.squadId">ohne Squad/Fraktion</small>
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<mat-icon (click)="delete(); $event.stopPropagation()" matTooltip="{{'users.list.tooltip.delete' | translate}}" <mat-icon (click)="delete(); $event.stopPropagation()" matTooltip="Löschen" class="pull-right" style="margin-top: 8px;" svgIcon="delete"></mat-icon>
class="pull-right" style="margin-top: 8px;" svgIcon="delete"></mat-icon> <mat-icon (click)="award(); $event.stopPropagation()" matTooltip="Auszeichnungen" class="icon-award pull-right" svgIcon="award"></mat-icon>
<mat-icon (click)="award(); $event.stopPropagation()" matTooltip="{{'users.list.tooltip.awards' | translate}}"
class="icon-award pull-right" svgIcon="award"></mat-icon>
</div> </div>
</div> </div>
</div> </div>

View File

@ -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: 'users.list.filter.no.squad', value: 'UNASSIGNED'}]" {label: 'Ohne Squad', value: 'UNASSIGNED'}]"
[addButton]="{svgIcon: 'add-user', tooltip: 'users.list.tooltip.new'}" [addButton]="{svgIcon: 'add-user', tooltip: 'Neuen Teilnehmer hinzufügen'}"
(executeSearch)="filterUsers(undefined, $event)" (executeSearch)="filterUsers(undefined, $event)"
(openAddFrom)="openNewUserForm()"> (openAddFrom)="openNewUserForm()">
</cc-list-filter> </cc-list-filter>

View File

@ -9,7 +9,6 @@ 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',
@ -38,8 +37,7 @@ 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() {
@ -69,13 +67,11 @@ export class UserListComponent implements OnInit {
} }
deleteUser(user: User) { deleteUser(user: User) {
this.translate.get('squad.list.delete.confirm', {name: user.username}).subscribe((confirmQuestion) => { if (confirm('Soll der Teilnehmer "' + user.username + '" wirklich gelöscht werden?')) {
if (confirm(confirmQuestion)) {
this.userService.deleteUser(user) this.userService.deleteUser(user)
.subscribe((res) => { .subscribe((res) => {
}); });
} }
});
} }
filterUsers(action?, group?: MatButtonToggleGroup) { filterUsers(action?, group?: MatButtonToggleGroup) {

View File

@ -1 +0,0 @@
<router-outlet></router-outlet>

View File

@ -1,14 +0,0 @@
import {Component} from '@angular/core';
import {TranslateService} from '@ngx-translate/core';
@Component({
selector: 'cc-users-root',
templateUrl: './users.component.html',
styleUrls: ['./users.component.scss']
})
export class UsersComponent {
constructor(private translate: TranslateService) {
this.translate.setDefaultLang('de');
}
}

View File

@ -3,32 +3,10 @@ import {usersRouterModule, usersRoutingComponents} from './users.routing';
import {CommonModule} from '@angular/common'; import {CommonModule} from '@angular/common';
import {SharedModule} from '../shared.module'; import {SharedModule} from '../shared.module';
import {InfiniteScrollModule} from 'ngx-infinite-scroll'; import {InfiniteScrollModule} from 'ngx-infinite-scroll';
import {HttpClient} from '@angular/common/http';
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
export function createTranslateLoader(http: HttpClient) {
return new TranslateHttpLoader(http, './assets/i18n/users/', '.json');
}
@NgModule({ @NgModule({
declarations: usersRoutingComponents, declarations: usersRoutingComponents,
imports: [CommonModule, SharedModule, InfiniteScrollModule, usersRouterModule],
imports: [
CommonModule,
SharedModule,
InfiniteScrollModule,
usersRouterModule,
TranslateModule.forChild({
loader: {
provide: TranslateLoader,
useFactory: (createTranslateLoader),
deps: [HttpClient]
},
isolate: true
})
],
}) })
export class UsersModule { export class UsersModule {
static routes = usersRouterModule; static routes = usersRouterModule;

View File

@ -4,13 +4,8 @@ import {UserListComponent} from './user-list/user-list.component';
import {AwardUserComponent} from './award-user/award-user.component'; import {AwardUserComponent} from './award-user/award-user.component';
import {ModuleWithProviders} from '@angular/core'; import {ModuleWithProviders} from '@angular/core';
import {UserItemComponent} from './user-list/user-item.component'; import {UserItemComponent} from './user-list/user-item.component';
import {UsersComponent} from './users.component';
export const usersRoutes: Routes = [ export const usersRoutes: Routes = [
{
path: '',
component: UsersComponent,
},
{ {
path: '', path: '',
component: UserListComponent, component: UserListComponent,
@ -35,5 +30,4 @@ export const usersRoutes: Routes = [
export const usersRouterModule: ModuleWithProviders = RouterModule.forChild(usersRoutes); export const usersRouterModule: ModuleWithProviders = RouterModule.forChild(usersRoutes);
export const usersRoutingComponents = [UsersComponent, UserItemComponent, UserListComponent, EditUserComponent, export const usersRoutingComponents = [UserItemComponent, UserListComponent, EditUserComponent, AwardUserComponent];
AwardUserComponent];

View File

@ -1,13 +1,4 @@
{ {
"public.error.headline": "Oops, diese Seite kennen wir nicht...",
"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",
"navigation.top.board": "Zum Forum", "navigation.top.board": "Zum Forum",
"navigation.top.overview": "Armeeübersicht", "navigation.top.overview": "Armeeübersicht",
"navigation.top.ranks": "Ränge", "navigation.top.ranks": "Ränge",
@ -43,11 +34,5 @@
"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.error.headline": "Oops, diese Seite kennen wir nicht..."
"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"
} }

View File

@ -1,31 +0,0 @@
{
"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"
}

View File

@ -1,3 +0,0 @@
{
}

View File

@ -1,24 +0,0 @@
{
"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",
"ranks.list.button.add": "Neuen Rank hinzufügen",
"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.submit.headline.new": "Neuen Rang hinzufügen",
"ranks.submit.headline.edit": "Rang bearbeiten",
"ranks.submit.field.name": "Name",
"ranks.submit.field.fraction": "Fraktion",
"ranks.submit.field.level": "Stufe",
"ranks.submit.field.image": "Bild",
"ranks.submit.field.image.error.format": "Bild muss im PNG Format vorliegen",
"ranks.submit.button.submit": "Bestätigen",
"ranks.submit.button.cancel": "Abbrechen"
}

View File

@ -1,3 +0,0 @@
{
}

View File

@ -1,72 +0,0 @@
{
"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",
"request.confirm.award.headline": "Offene Anträge - Auszeichnungen",
"request.confirm.award.table.head.participant": "Teilnehmer",
"request.confirm.award.table.head.award": "Auszeichnung",
"request.confirm.award.table.head.reason": "Begründung",
"request.confirm.award.table.head.requester": "Antragsteller",
"request.confirm.award.table.head.date": "Datum",
"request.confirm.award.table.head.action": "Aktion",
"request.confirm.award.table.reject.reason.placeholder": "Begründung für Ablehnung (optional)",
"request.confirm.award.table.button.action.accept": "Bestätigen",
"request.confirm.award.table.button.action.reject": "Ablehnen",
"request.confirm.promotion.headline": "Offene Anträge - Beförderungen",
"request.confirm.promotion.table.head.participant": "Teilnehmer",
"request.confirm.promotion.table.head.rank.before": "Alter Rang",
"request.confirm.promotion.table.head.rank.after": "Neuer Rang",
"request.confirm.promotion.table.head.requester": "Antragsteller",
"request.confirm.promotion.table.head.date": "Datum",
"request.confirm.promotion.table.head.status": "Status",
"request.confirm.promotion.table.head.action": "Aktion",
"request.confirm.promotion.table.reject.reason.placeholder": "Begründung für Ablehnung (optional)",
"request.confirm.promotion.table.button.action.accept": "Bestätigen",
"request.confirm.promotion.table.button.action.reject": "Ablehnen",
"request.confirm.promotion.table.status.progressing": "In Bearbeitung",
"request.confirm.promotion.table.status.accepted": "Genehmigt",
"request.confirm.promotion.table.status.rejected": "Abgelehnt",
"request.award.headline": "Auszeichnung beantragen",
"request.award.field.user": "Teilnehmer",
"request.award.field.user.placeholder": "Auswählen...",
"request.award.field.award": "Auszeichnung",
"request.award.field.award.placeholder": "Auswählen...",
"request.award.field.reason": "Begründung",
"request.award.field.reason.placeholder": "Begründung eingeben...",
"request.award.button.cancel": "Abbrechen",
"request.award.button.submit": "Bestätigen",
"request.award.table.head.image": "Bild",
"request.award.table.head.name": "Bezeichnung",
"request.award.table.head.reason": "Begründung",
"request.award.table.head.requester": "Antragsteller",
"request.award.table.head.date": "Datum",
"request.award.table.head.status": "Status",
"request.award.table.head.reject.reason": "Grund für Ablehnung",
"request.award.table.status.progressing": "In Bearbeitung",
"request.award.table.status.accepted": "Genehmigt",
"request.award.table.status.rejected": "Abgelehnt",
"request.promotion.headline": "Beförderung beantragen",
"request.promotion.field.participant": "Teilnehmer",
"request.promotion.field.participant.placeholder": "Auswählen...",
"request.promotion.field.rank.before": "Aktueller Rang",
"request.promotion.field.rank.after": "Neuer Rang",
"request.promotion.button.submit": "Bestätigen",
"request.promotion.button.cancel": "Abbrechen",
"request.promotion.table.head.participant": "Teilnehmer",
"request.promotion.table.head.rank.before": "Alter Rang",
"request.promotion.table.head.rank.after": "Neuer Rang",
"request.promotion.table.head.requester": "Antragsteller",
"request.promotion.table.head.date": "Datum",
"request.promotion.table.head.status": "Status",
"request.promotion.table.head.reject.reason": "Grund für Ablehnung",
"request.sql.dashboard.headline":"SQL Dashboard"
}

View File

@ -1,2 +0,0 @@
{
}

View File

@ -1,22 +0,0 @@
{
"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",
"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.submit.new.headline": "Neues Squad hinzufügen",
"squad.submit.edit.headline": "Squad bearbeiten",
"squad.submit.field.name": "Name",
"squad.submit.field.fraction": "Fraktion",
"squad.submit.field.sort": "Sortierung",
"squad.submit.field.logo": "Logo",
"squad.submit.error.logo.type": "Bild muss im PNG Format vorliegen",
"squad.submit.button.submit": "Bestätigen",
"squad.submit.button.cancel": "Abbrechen"
}

View File

@ -1,3 +0,0 @@
{
}

View File

@ -63,24 +63,14 @@
"stats.war.submit.headline.edit": "Schlacht bearbeiten", "stats.war.submit.headline.edit": "Schlacht bearbeiten",
"stats.war.submit.title": "Titel", "stats.war.submit.title": "Titel",
"stats.war.submit.campaign": "Kampagne", "stats.war.submit.campaign": "Kampagne",
"stats.war.submit.logfile": "Logfile",
"stats.war.submit.points": "Punkte", "stats.war.submit.points": "Punkte",
"stats.war.submit.final.budget": "Endbudget", "stats.war.submit.final.budget": "Endbudget",
"stats.war.submit.button.submit": "Bestätigen", "stats.war.submit.button.submit": "Bestätigen",
"stats.war.submit.button.cancel": "Abbrechen", "stats.war.submit.button.cancel": "Abbrechen",
"stats.war.submit.error.file.format": "Logfile muss im Format RPT, LOG oder TXT vorliegen",
"stats.campaign.submit.headline.new": "Neue Kampagne hinzufügen", "stats.campaign.submit.headline.new": "Neue Kampagne hinzufügen",
"stats.campaign.submit.headline.edit": "Kampagne editieren", "stats.campaign.submit.headline.edit": "Kampagne editieren",
"stats.campaign.submit.title": "Titel", "stats.campaign.submit.title": "Titel",
"stats.campaign.submit.button.submit": "Bestätigen", "stats.campaign.submit.button.submit": "Bestätigen",
"stats.campaign.submit.button.cancel": "Abbrechen", "stats.campaign.submit.button.cancel": "Abbrechen"
"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"
} }

View File

@ -1,44 +0,0 @@
{
"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",
"users.list.tooltip.new": "Neuen Teilnehmer hinzufügen",
"users.list.tooltip.delete": "Löschen",
"users.list.tooltip.awards": "Auszeichnungen",
"users.list.filter.no.squad": "Ohne Squad",
"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.field.decoration": "Auszeichnung",
"users.award.field.decoration.placeholder": "Auswählen...",
"users.award.field.reason": "Begründung",
"users.award.field.reason.placeholder": "Begründung eingeben...",
"users.award.button.submit": "Bestätigen",
"users.award.button.cancel": "Abbrechen",
"users.award.table.head.image": "Bild",
"users.award.table.head.name": "Bezeichnung",
"users.award.table.head.reason": "Begründung",
"users.award.table.head.date": "Datum",
"users.award.table.head.status": "Status",
"users.award.table.button.delete": "Löschen",
"users.award.table.status.in.progress": "In Bearbeitung",
"users.award.table.status.approved": "Genehmigt",
"users.award.table.status.rejected": "Abgelehnt",
"user.submit.headline.new": "Neuen Teilnehmer hinzufügen",
"user.submit.headline.edit": "Teilnehmer bearbeiten",
"user.submit.field.name": "Name",
"user.submit.field.squad": "Squad",
"user.submit.field.squad.not.assigned": "Ohne Fraktion/ Squad",
"user.submit.field.rank": "Rang",
"user.submit.button.submit": "Bestätigen",
"user.submit.button.cancel": "Abbrechen"
}

View File

@ -1,3 +0,0 @@
{
}