Compare commits
3 Commits
37eab6f33d
...
0adb9b7cf9
Author | SHA1 | Date |
---|---|---|
HardiReady | 0adb9b7cf9 | |
HardiReady | ccbcece0ab | |
HardiReady | 8ad9000766 |
|
@ -1,5 +1,5 @@
|
|||
<div class="fade-in player-campaign-detail-container" xmlns="http://www.w3.org/1999/html">
|
||||
<h2 class="pull-left">{{'stats.player.detail.headline' | translate}} {{campaignPlayer.name}}</h2>
|
||||
<h2 class="pull-left">{{'stats.player.detail.headline' | translate:{name: campaignPlayer.name} }}</h2>
|
||||
|
||||
<button class="btn-back" mat-raised-button (click)="navigateBack()">
|
||||
<mat-icon svgIcon="chevron-left"></mat-icon>
|
||||
|
|
|
@ -20,7 +20,7 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
|||
|
||||
@Output() switchTab = new EventEmitter();
|
||||
|
||||
campaignPlayer: CampaignPlayer = {campaign: {}, players: []};
|
||||
campaignPlayer: CampaignPlayer = {name: '', campaign: {}, players: []};
|
||||
|
||||
graphData: any[] = [];
|
||||
sumData: any[] = [];
|
||||
|
@ -74,7 +74,9 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
|||
|
||||
for (let i = 0; i < this.playerAttributeNameMap.length; i++) {
|
||||
const attr = this.playerAttributeNameMap[i];
|
||||
this.graphData.push({key: attr.prop, label: attr.head});
|
||||
this.translate.get(attr.head).subscribe((translated) => {
|
||||
this.graphData.push({key: attr.prop, label: translated});
|
||||
});
|
||||
}
|
||||
|
||||
this.initDataArray();
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
<form #form="ngForm" (keydown.enter)="$event.preventDefault()" class="overview">
|
||||
<h3 *ngIf="campaign._id">Kampagne editieren</h3>
|
||||
<h3 *ngIf="!campaign._id">Neue Kampagne hinzufügen</h3>
|
||||
<h3 *ngIf="campaign._id">{{'stats.campaign.submit.headline.edit' | translate}}</h3>
|
||||
<h3 *ngIf="!campaign._id">{{'stats.campaign.submit.headline.new' | translate}}</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="title">Titel</label>
|
||||
<label for="title">{{'stats.campaign.submit.title' | translate}}</label>
|
||||
<input type="text" class="form-control"
|
||||
[(ngModel)]="campaign.title"
|
||||
name="title"
|
||||
id="title"
|
||||
required maxlength="50"/>
|
||||
|
||||
<show-error displayName="Name" controlPath="title"></show-error>
|
||||
<show-error displayName="{{'stats.campaign.submit.title' | translate}}" controlPath="title"></show-error>
|
||||
</div>
|
||||
|
||||
<button id="cancel"
|
||||
(click)="cancel()"
|
||||
class="btn btn-default">
|
||||
Abbrechen
|
||||
{{'stats.campaign.submit.button.cancel' | translate}}
|
||||
</button>
|
||||
|
||||
<button id="save"
|
||||
|
@ -24,6 +23,6 @@
|
|||
(click)="saveCampaign()"
|
||||
class="btn btn-default"
|
||||
[disabled]="!form.valid">
|
||||
Bestätigen
|
||||
{{'stats.campaign.submit.button.submit' | translate}}
|
||||
</button>
|
||||
</form>
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
<div class="input-group search-field">
|
||||
<input id="search-tasks"
|
||||
markForCheck
|
||||
placeholder="Spielername (mehrere mit '&' trennen)"
|
||||
placeholder="{{'stats.highscore.filter.placholder' | translate}}"
|
||||
type="text" #query class="form-control"
|
||||
(keyup.enter)="filterPlayers()"
|
||||
[formControl]="searchTerm">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button"
|
||||
(click)="filterPlayers()">
|
||||
Filter
|
||||
{{'stats.highscore.filter.button' | translate}}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -26,7 +26,7 @@
|
|||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef>Name</th>
|
||||
<th mat-header-cell *matHeaderCellDef>{{'stats.highscore.header.name' | translate}}</th>
|
||||
<td mat-cell *matCellDef="let element"
|
||||
[style.color]="element['fraction'] === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
|
||||
{{element.name}}
|
||||
|
@ -36,7 +36,7 @@
|
|||
<ng-container matColumnDef="{{attributeMap.prop}}">
|
||||
<th mat-header-cell *matHeaderCellDef>
|
||||
<mat-icon svgIcon="{{attributeMap.prop}}"
|
||||
matTooltip="{{attributeMap.head}}">
|
||||
matTooltip="{{attributeMap.head | translate}}">
|
||||
</mat-icon>
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let element"> {{element[attributeMap.prop]}}</td>
|
||||
|
|
|
@ -10,7 +10,6 @@ import {WarSubmitComponent} from './war/war-submit/war-submit.component';
|
|||
import {FractionStatsComponent} from './war/fraction-stats/fraction-stats.component';
|
||||
import {StatisticHighScoreComponent} from './campaign/highscore/highscore.component';
|
||||
import {WarHeaderComponent} from './war/war-header/war-header.component';
|
||||
import {WarEditComponent} from './war/war-edit/war-edit.component';
|
||||
import {LoginGuardMT} from '../login';
|
||||
import {CampaignNavigationComponent} from './campaign/campaign-navigation/campaign-navigation.component';
|
||||
import {StatisticOverviewComponent} from './campaign/overview/campaign-overview.component';
|
||||
|
@ -61,7 +60,7 @@ export const statsRoutes: Routes = [
|
|||
},
|
||||
{
|
||||
path: 'submit-war/:id',
|
||||
component: WarEditComponent,
|
||||
component: WarSubmitComponent,
|
||||
outlet: 'right',
|
||||
canActivate: [LoginGuardMT]
|
||||
}];
|
||||
|
@ -69,7 +68,6 @@ export const statsRoutes: Routes = [
|
|||
export const statsRouterModule: ModuleWithProviders = RouterModule.forChild(statsRoutes);
|
||||
|
||||
export const statsRoutingComponents = [StatisticComponent, StatisticOverviewComponent, StatisticHighScoreComponent,
|
||||
CampaignSubmitComponent, WarListComponent, WarSubmitComponent, WarEditComponent, WarHeaderComponent,
|
||||
ScoreboardComponent, FractionStatsComponent, CampaignPlayerDetailComponent, WarItemComponent,
|
||||
CampaignNavigationComponent];
|
||||
CampaignSubmitComponent, WarListComponent, WarSubmitComponent, WarHeaderComponent, ScoreboardComponent,
|
||||
FractionStatsComponent, CampaignPlayerDetailComponent, WarItemComponent, CampaignNavigationComponent];
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
class="mat-elevation-z8">
|
||||
|
||||
<ng-container matColumnDef="{{tableHead[0].prop}}">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header="{{tableHead[0].prop}}">{{tableHead[0].head}}</th>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header="{{tableHead[0].prop}}">{{tableHead[0].head | translate}}</th>
|
||||
<td mat-cell *matCellDef="let element"
|
||||
[style.color]="element['fraction'] === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
|
||||
{{element.name}}
|
||||
|
@ -15,14 +15,14 @@
|
|||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="{{tableHead[1].prop}}">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header="{{tableHead[1].prop}}">{{tableHead[1].head}}</th>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header="{{tableHead[1].prop}}">{{tableHead[1].head | translate}}</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.fraction === 'BLUFOR' ? fraction.BLUFOR : fraction.OPFOR}}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngFor="let column of tableHead.slice(2, tableHead.length)" matColumnDef="{{column.prop}}">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header="{{column.prop}}">
|
||||
<mat-icon svgIcon="{{column.prop}}"
|
||||
matTooltip="{{column.head}}">
|
||||
matTooltip="{{column.head | translate}}">
|
||||
</mat-icon>
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let element">{{element[column.prop]}}</td>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<button mat-icon-button
|
||||
matTooltip="Kampagnenstatistik für {{element.name}}"
|
||||
matTooltip="{{ 'stats.scoreboard.button.detail' | translate:{name: element.name} }}"
|
||||
(click)="selectPlayerDetail(1, isSteamUUID(element['steamUUID']) ?
|
||||
element['steamUUID'] : element['name'])">
|
||||
<mat-icon svgIcon="stats-detail">
|
||||
|
|
|
@ -37,13 +37,6 @@ export class ScoreboardComponent implements OnChanges {
|
|||
|
||||
displayedColumns = this.tableHead.map(head => head.prop);
|
||||
|
||||
reorderable = false;
|
||||
|
||||
customClasses = {
|
||||
sortAscending: 'glyphicon glyphicon-triangle-top',
|
||||
sortDescending: 'glyphicon glyphicon-triangle-bottom',
|
||||
};
|
||||
|
||||
constructor(private elRef: ElementRef) {
|
||||
this.displayedColumns.push('interact');
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
form {
|
||||
margin-top: 45px;
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
<form #form="ngForm" (keydown.enter)="$event.preventDefault()" class="overview">
|
||||
<h3>Schlacht bearbeiten</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="title">Titel</label>
|
||||
<input type="text" class="form-control"
|
||||
[(ngModel)]="war.title"
|
||||
name="title"
|
||||
id="title"
|
||||
required maxlength="50"/>
|
||||
<show-error displayName="Name" controlPath="title"></show-error>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="campaign">Kampagne</label>
|
||||
<select class="form-control"
|
||||
name="campaign"
|
||||
id="campaign"
|
||||
[(ngModel)]="war.campaign"
|
||||
required>
|
||||
<option *ngFor="let campaign of campaignService.campaigns" [ngValue]="campaign._id">
|
||||
{{campaign.title}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="ptBlufor">Punkte NATO</label>
|
||||
<input type="number" class="form-control"
|
||||
[(ngModel)]="war.ptBlufor"
|
||||
name="ptBlufor"
|
||||
id="ptBlufor"
|
||||
required min="0"/>
|
||||
<show-error displayName="Name" controlPath="ptBlufor"></show-error>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="ptOpfor">Punkte CSAT</label>
|
||||
<input type="number" class="form-control"
|
||||
[(ngModel)]="war.ptOpfor"
|
||||
name="ptOpfor"
|
||||
id="ptOpfor"
|
||||
required min="0"/>
|
||||
<show-error displayName="Name" controlPath="ptOpfor"></show-error>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="endBudgetBlufor">Endbudget NATO</label>
|
||||
<input type="number" class="form-control"
|
||||
[(ngModel)]="war.endBudgetBlufor"
|
||||
name="endBudgetBlufor"
|
||||
id="endBudgetBlufor"
|
||||
required/>
|
||||
<show-error displayName="Name" controlPath="endBudgetBlufor"></show-error>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="endBudgetOpfor">Endbudget CSAT</label>
|
||||
<input type="number" class="form-control"
|
||||
[(ngModel)]="war.endBudgetOpfor"
|
||||
name="endBudgetOpfor"
|
||||
id="endBudgetOpfor"
|
||||
required/>
|
||||
<show-error displayName="Name" controlPath="endBudgetOpfor"></show-error>
|
||||
</div>
|
||||
|
||||
<button id="cancel"
|
||||
(click)="cancel()"
|
||||
class="btn btn-default">
|
||||
Abbrechen
|
||||
</button>
|
||||
|
||||
<button id="save"
|
||||
type="submit"
|
||||
(click)="updateWar()"
|
||||
class="btn btn-default"
|
||||
[disabled]="!form.valid">
|
||||
Bestätigen
|
||||
</button>
|
||||
</form>
|
|
@ -1,52 +0,0 @@
|
|||
import {Component, ViewChild} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {NgForm} from '@angular/forms';
|
||||
import {WarService} from '../../../services/logs/war.service';
|
||||
import {War} from '../../../models/model-interfaces';
|
||||
import {CampaignService} from '../../../services/logs/campaign.service';
|
||||
import {Subscription} from 'rxjs/Subscription';
|
||||
import {SnackBarService} from '../../../services/user-interface/snack-bar/snack-bar.service';
|
||||
import {Message} from '../../../i18n/de.messages';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'war-edit',
|
||||
templateUrl: './war-edit.component.html',
|
||||
styleUrls: ['./war-edit.component.css', '../../../style/entry-form.css', '../../../style/overview.css']
|
||||
})
|
||||
export class WarEditComponent {
|
||||
|
||||
war: War = {players: []};
|
||||
|
||||
subscription: Subscription;
|
||||
|
||||
@ViewChild(NgForm) form: NgForm;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private warService: WarService,
|
||||
private snackBarService: SnackBarService,
|
||||
public campaignService: CampaignService) {
|
||||
this.subscription = this.route.params
|
||||
.map(params => params['id'])
|
||||
.filter(id => id !== undefined)
|
||||
.flatMap(id => this.warService.getWar(id))
|
||||
.subscribe(war => {
|
||||
this.war = war;
|
||||
});
|
||||
}
|
||||
|
||||
updateWar() {
|
||||
this.warService.updateWar(this.war)
|
||||
.subscribe(war => {
|
||||
this.snackBarService.showSuccess(Message.SUCCESS_SAVE);
|
||||
this.router.navigate(['../../war/' + war._id], {relativeTo: this.route});
|
||||
},
|
||||
error => this.snackBarService.showError(error._body.error.message, 15000));
|
||||
}
|
||||
|
||||
cancel() {
|
||||
this.router.navigate(['..'], {relativeTo: this.route});
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,14 +1,14 @@
|
|||
<div *ngIf="war" class="war-header fade-in" xmlns="http://www.w3.org/1999/html">
|
||||
<div class="war-header-container">
|
||||
<div class="pull-left head-field" style="width: 250px">
|
||||
<h4>Endpunktestand:</h4>
|
||||
<h4>{{'stats.scoreboard.standings' | translate}}</h4>
|
||||
<span [style.color]="fraction.COLOR_BLUFOR" style="font-weight: bold; margin-right: 10px">{{fraction.BLUFOR}} {{war.ptBlufor}}</span>
|
||||
<span style="font-size: x-large">|</span>
|
||||
<span [style.color]="fraction.COLOR_OPFOR" style="font-weight: bold; margin-left: 10px;">{{war.ptOpfor}} {{fraction.OPFOR}}</span>
|
||||
</div>
|
||||
|
||||
<div class="pull-left head-field " style="padding-left: 100px;">
|
||||
<h4 class="pull-left" style="margin-bottom: 0;">Teilnehmer:</h4>
|
||||
<h4 class="pull-left" style="margin-bottom: 0;">{{'stats.scoreboard.participants' | translate}}</h4>
|
||||
<ngx-charts-pie-chart
|
||||
class="pull-left"
|
||||
[view]="[120, 120]"
|
||||
|
@ -24,20 +24,26 @@
|
|||
|
||||
<div class="pull-left " style="padding-left: 100px; padding-top:15px">
|
||||
<a class="btn btn-default" style="margin: 20px" target="_blank" href="resource/logs/{{war._id}}/clean.log">
|
||||
Logfile anzeigen
|
||||
{{'stats.scoreboard.show.logs' | translate}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item" [ngClass]="{active :tab === 0}" (click)="switchTab(0)">
|
||||
<a class="nav-link"><img src="../../../assets/scoreboard-btn.png"> Scoreboard</a>
|
||||
<a class="nav-link"><img src="../../../assets/scoreboard-btn.png">
|
||||
{{'stats.scoreboard.tab.scoreboard' | translate}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" [ngClass]="{active :tab === 1}" (click)="switchTab(1)">
|
||||
<a class="nav-link"><img src="../../../assets/fraction-btn.png"> Fraktionen</a>
|
||||
<a class="nav-link"><img src="../../../assets/fraction-btn.png">
|
||||
{{'stats.scoreboard.tab.fractions' | translate}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" [ngClass]="{active :tab === 2, deactivated :tab !== 2} ">
|
||||
<a class="nav-link"><img src="../../../assets/player-stats-btn.png"> Player</a>
|
||||
<a class="nav-link"><img src="../../../assets/player-stats-btn.png">
|
||||
{{'stats.scoreboard.tab.player' | translate}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<div *ngIf="tab === 0">
|
||||
|
@ -46,23 +52,26 @@
|
|||
<input type="radio" name="fractSelect"
|
||||
[checked]="(fractionFilterSelected == undefined) ? 'true' : 'false'"
|
||||
[(ngModel)]="fractionFilterSelected"
|
||||
(change)="filterPlayersByFraction()">Alle
|
||||
(change)="filterPlayersByFraction()">
|
||||
{{'stats.scoreboard.fraction.filter.all' | translate}}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="fractSelect" value="BLUFOR"
|
||||
[(ngModel)]="fractionFilterSelected"
|
||||
#fractRadioBufor
|
||||
(change)="filterPlayersByFraction(fractRadioBufor.value)">{{fraction.BLUFOR}}
|
||||
(change)="filterPlayersByFraction(fractRadioBufor.value)">
|
||||
{{fraction.BLUFOR}}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="fractSelect" value="OPFOR"
|
||||
[(ngModel)]="fractionFilterSelected"
|
||||
#fractRadioOpfor
|
||||
(change)="filterPlayersByFraction(fractRadioOpfor.value)">{{fraction.OPFOR}}
|
||||
(change)="filterPlayersByFraction(fractRadioOpfor.value)">
|
||||
{{fraction.OPFOR}}
|
||||
</label>
|
||||
</form>
|
||||
<span class="btn btn-default pull-left tab-control" (click)="scoreBoardComponent.exportCSV()">
|
||||
Download CSV
|
||||
{{'stats.scoreboard.download.csv' | translate}}
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<div class="war-list-header" *ngIf="!collapsed && loginService.hasPermission(3)">
|
||||
<button mat-stroked-button (click)="selectNewCampaign()">
|
||||
{{'stats.campaign.manage.add' | translate}}
|
||||
{{'stats.sidebar.campaign.add' | translate}}
|
||||
</button>
|
||||
<button mat-stroked-button (click)="selectNewWar()">
|
||||
Schlacht hinzufügen
|
||||
{{'stats.sidebar.battle.add' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<form #form="ngForm" (keydown.enter)="$event.preventDefault()" class="overview">
|
||||
<h3>Neue Schlacht hinzufügen</h3>
|
||||
<h3 *ngIf="!war._id">{{'stats.war.submit.headline.new' | translate}}</h3>
|
||||
<h3 *ngIf="war._id">{{'stats.war.submit.headline.edit' | translate}}</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="title">Titel</label>
|
||||
<label for="title">{{'stats.war.submit.title' | translate}}</label>
|
||||
<input type="text" class="form-control"
|
||||
[(ngModel)]="war.title"
|
||||
name="title"
|
||||
id="title"
|
||||
required maxlength="50"/>
|
||||
|
||||
<show-error displayName="Name" controlPath="title"></show-error>
|
||||
<show-error displayName="{{'stats.war.submit.title' | translate}}" controlPath="title"></show-error>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="campaign">Kampagne</label>
|
||||
<label for="campaign">{{'stats.war.submit.campaign' | translate}}</label>
|
||||
<select class="form-control"
|
||||
name="campaign"
|
||||
id="campaign"
|
||||
|
@ -25,7 +25,7 @@
|
|||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-group" *ngIf="!war._id">
|
||||
<label for="log">Logfile</label>
|
||||
<input id="log" name="log" class="ui-button form-control" type="file"
|
||||
(change)="fileChange($event)">
|
||||
|
@ -34,19 +34,63 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group" *ngIf="war._id">
|
||||
<label for="ptBlufor">{{'stats.war.submit.points' | translate}} {{fraction.BLUFOR}}</label>
|
||||
<input type="number" class="form-control"
|
||||
[(ngModel)]="war.ptBlufor"
|
||||
name="ptBlufor"
|
||||
id="ptBlufor"
|
||||
required min="0"/>
|
||||
<show-error displayName="{{'stats.war.submit.points' | translate}} {{fraction.BLUFOR}}"
|
||||
controlPath="ptBlufor"></show-error>
|
||||
</div>
|
||||
|
||||
<div class="form-group" *ngIf="war._id">
|
||||
<label for="ptOpfor">{{'stats.war.submit.points' | translate}} {{fraction.OPFOR}}</label>
|
||||
<input type="number" class="form-control"
|
||||
[(ngModel)]="war.ptOpfor"
|
||||
name="ptOpfor"
|
||||
id="ptOpfor"
|
||||
required min="0"/>
|
||||
<show-error displayName="{{'stats.war.submit.points' | translate}} {{fraction.OPFOR}}"
|
||||
controlPath="ptOpfor"></show-error>
|
||||
</div>
|
||||
|
||||
<div class="form-group" *ngIf="war._id">
|
||||
<label for="endBudgetBlufor">{{'stats.war.submit.final.budget' | translate}} {{fraction.BLUFOR}}</label>
|
||||
<input type="number" class="form-control"
|
||||
[(ngModel)]="war.endBudgetBlufor"
|
||||
name="endBudgetBlufor"
|
||||
id="endBudgetBlufor"
|
||||
required/>
|
||||
<show-error displayName="{{'stats.war.submit.final.budget' | translate}} {{fraction.BLUFOR}}"
|
||||
controlPath="endBudgetBlufor"></show-error>
|
||||
</div>
|
||||
|
||||
<div class="form-group" *ngIf="war._id">
|
||||
<label for="endBudgetOpfor">{{'stats.war.submit.final.budget' | translate}} {{fraction.OPFOR}}</label>
|
||||
<input type="number" class="form-control"
|
||||
[(ngModel)]="war.endBudgetOpfor"
|
||||
name="endBudgetOpfor"
|
||||
id="endBudgetOpfor"
|
||||
required/>
|
||||
<show-error displayName="{{'stats.war.submit.final.budget' | translate}} {{fraction.OPFOR}}"
|
||||
controlPath="endBudgetOpfor"></show-error>
|
||||
</div>
|
||||
|
||||
<button id="cancel"
|
||||
*ngIf="!loading"
|
||||
(click)="cancel()"
|
||||
class="btn btn-default">
|
||||
Abbrechen
|
||||
{{'stats.war.submit.button.cancel' | translate}}
|
||||
</button>
|
||||
|
||||
<button id="save"
|
||||
type="submit"
|
||||
*ngIf="!loading"
|
||||
(click)="saveWar()"
|
||||
(click)="war._id ? editWar() : saveWar()"
|
||||
class="btn btn-default"
|
||||
[disabled]="!form.valid">
|
||||
Bestätigen
|
||||
{{'stats.war.submit.button.submit' | translate}}
|
||||
</button>
|
||||
</form>
|
||||
|
|
|
@ -6,6 +6,8 @@ import {War} from '../../../models/model-interfaces';
|
|||
import {CampaignService} from '../../../services/logs/campaign.service';
|
||||
import {SnackBarService} from '../../../services/user-interface/snack-bar/snack-bar.service';
|
||||
import {SpinnerService} from '../../../services/user-interface/spinner/spinner.service';
|
||||
import {Subscription} from 'rxjs';
|
||||
import {Fraction} from '../../../utils/fraction.enum';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -17,10 +19,14 @@ export class WarSubmitComponent {
|
|||
|
||||
war: War = {players: []};
|
||||
|
||||
subscription: Subscription;
|
||||
|
||||
fileList: FileList;
|
||||
|
||||
readonly validExtensions = ['.rpt', '.log', '.txt'];
|
||||
|
||||
readonly fraction = Fraction;
|
||||
|
||||
showFileError = false;
|
||||
|
||||
loading = false;
|
||||
|
@ -33,6 +39,13 @@ export class WarSubmitComponent {
|
|||
private snackBarService: SnackBarService,
|
||||
private spinnerService: SpinnerService,
|
||||
public campaignService: CampaignService) {
|
||||
this.subscription = this.route.params
|
||||
.map(params => params['id'])
|
||||
.filter(id => id !== undefined)
|
||||
.flatMap(id => this.warService.getWar(id))
|
||||
.subscribe(war => {
|
||||
this.war = war;
|
||||
});
|
||||
}
|
||||
|
||||
fileChange(event) {
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
export class PlayerUtils {
|
||||
|
||||
public static readonly attributeDisplayNames = [
|
||||
{prop: 'name', head: 'Spieler'},
|
||||
{prop: 'fraction', head: 'Fraktion'},
|
||||
{prop: 'kill', head: 'Abschüsse'},
|
||||
{prop: 'friendlyFire', head: 'Friendly Fire'},
|
||||
{prop: 'revive', head: 'Revive'},
|
||||
{prop: 'flagTouch', head: 'Eroberungen'},
|
||||
{prop: 'vehicleLight', head: 'Fahrzeug (leicht)'},
|
||||
{prop: 'vehicleHeavy', head: 'Fahrzeug (schwer)'},
|
||||
{prop: 'vehicleAir', head: 'Fahrzeug (Luft)'},
|
||||
{prop: 'death', head: 'Tode'},
|
||||
{prop: 'respawn', head: 'Respawn'}
|
||||
{prop: 'name', head: 'stats.scoreboard.header.player'},
|
||||
{prop: 'fraction', head: 'stats.scoreboard.header.fraction'},
|
||||
{prop: 'kill', head: 'stats.scoreboard.header.kill'},
|
||||
{prop: 'friendlyFire', head: 'stats.scoreboard.header.friendly.fire'},
|
||||
{prop: 'revive', head: 'stats.scoreboard.header.revive'},
|
||||
{prop: 'flagTouch', head: 'stats.scoreboard.header.capture'},
|
||||
{prop: 'vehicleLight', head: 'stats.scoreboard.header.vehicle.light'},
|
||||
{prop: 'vehicleHeavy', head: 'stats.scoreboard.header.vehicle.heavy'},
|
||||
{prop: 'vehicleAir', head: 'stats.scoreboard.header.vehicle.air'},
|
||||
{prop: 'death', head: 'stats.scoreboard.header.death'},
|
||||
{prop: 'respawn', head: 'stats.scoreboard.header.respawn'}
|
||||
];
|
||||
|
||||
public static isSteamUUID(input: string): boolean {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
"stats.campaign.manage.add": "Kampagne hinzufügen",
|
||||
"stats.campaign.manage.edit": "Bearbeiten",
|
||||
"stats.campaign.manage.delete": "Löschen",
|
||||
"stats.campaign.manage.delete.confirm": "Soll die Kampagne \"{{title}}\" wirklich gelöscht werden?",
|
||||
"stats.campaign.title.all.time.overview": "Ewige Übersicht",
|
||||
|
||||
"stats.sidebar.campaign.add": "Kampagne hinzufügen",
|
||||
"stats.sidebar.battle.add": "Schlacht hinzufügen",
|
||||
"stats.sidebar.overview": "Übersicht",
|
||||
"stats.sidebar.highscore": "Highscore",
|
||||
"stats.sidebar.battles": "Schlachten",
|
||||
|
||||
"stats.sidebar.battles.battle.from.date": "vom",
|
||||
"stats.sidebar.battle.manage.edit": "Bearbeiten",
|
||||
"stats.sidebar.battle.manage.delete": "Löschen",
|
||||
|
@ -28,14 +28,14 @@
|
|||
"stats.fraction.select.stabilize": "Stabilisiert",
|
||||
"stats.fraction.select.flag": "Flaggenbesitz",
|
||||
|
||||
"stats.player.detail.headline": "Kampagnendetails -",
|
||||
"stats.player.detail.headline": "Kampagnendetails - {{name}}",
|
||||
"stats.player.detail.button.back": "Zurück",
|
||||
"stats.player.detail.kill.death.ratio": "Kill/Death",
|
||||
"stats.player.detail.respawn.death.ratio": "Respawn/Death",
|
||||
"stats.player.detail.graph.average": "Durchschnitt",
|
||||
|
||||
"stats.scoreboard.standings": "Endpunktestand",
|
||||
"stats.scoreboard.participants": "Teilnehmer",
|
||||
"stats.scoreboard.standings": "Endpunktestand:",
|
||||
"stats.scoreboard.participants": "Teilnehmer:",
|
||||
"stats.scoreboard.show.logs": "Logfile anzeigen",
|
||||
"stats.scoreboard.download.csv": "Download CSV",
|
||||
"stats.scoreboard.tab.scoreboard": "Scoreboard",
|
||||
|
@ -53,5 +53,24 @@
|
|||
"stats.scoreboard.header.vehicle.air": "Fahrzeug (Luft)",
|
||||
"stats.scoreboard.header.death": "Tode",
|
||||
"stats.scoreboard.header.respawn": "Respawn",
|
||||
"stats.scoreboard.button.detail": "Kampagnenstatistik für {{name}}"
|
||||
"stats.scoreboard.button.detail": "Kampagnenstatistik für {{name}}",
|
||||
|
||||
"stats.highscore.filter.placholder": "Spielername (mehrere mit '&' trennen)",
|
||||
"stats.highscore.filter.button": "Filter",
|
||||
"stats.highscore.header.name": "Name",
|
||||
|
||||
"stats.war.submit.headline.new": "Neue Schlacht hinzufügen",
|
||||
"stats.war.submit.headline.edit": "Schlacht bearbeiten",
|
||||
"stats.war.submit.title": "Titel",
|
||||
"stats.war.submit.campaign": "Kampagne",
|
||||
"stats.war.submit.points": "Punkte",
|
||||
"stats.war.submit.final.budget": "Endbudget",
|
||||
"stats.war.submit.button.submit": "Bestätigen",
|
||||
"stats.war.submit.button.cancel": "Abbrechen",
|
||||
|
||||
"stats.campaign.submit.headline.new": "Neue Kampagne hinzufügen",
|
||||
"stats.campaign.submit.headline.edit": "Kampagne editieren",
|
||||
"stats.campaign.submit.title": "Titel",
|
||||
"stats.campaign.submit.button.submit": "Bestätigen",
|
||||
"stats.campaign.submit.button.cancel": "Abbrechen"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue