Added "card scores" page to "add game" component, startet on score calculation

This commit is contained in:
2022-09-10 20:41:18 +02:00
parent a9aca1351c
commit 68e35fc5bc
6 changed files with 145 additions and 18 deletions
@@ -23,8 +23,28 @@
<p id="team-warn" *ngIf="!checkValidTeamAssignment()">Illegal game teams!</p>
<button (click)="switchToNextPage()" [disabled]="!checkValidTeamAssignment()">Next</button>
</div>
<div id="player-points" class="visible-{{this.currentPage === 3}}">
<div id="player-card-scores" class="visible-{{this.currentPage === 3}}">
<p>Please enter the points that every player has collected:</p>
<table class="point-entry">
<tr>
<td><p>{{this.actualPlayers[0].firstName}}</p></td>
<td><input type="number" [(ngModel)]="this.actualPlayers[0].finalCardScore"/></td>
</tr>
<tr>
<td><p>{{this.actualPlayers[1].firstName}}</p></td>
<td><input type="number" [(ngModel)]="this.actualPlayers[1].finalCardScore"/></td>
</tr>
<tr>
<td><p>{{this.actualPlayers[2].firstName}}</p></td>
<td><input type="number" [(ngModel)]="this.actualPlayers[2].finalCardScore"/></td>
</tr>
<tr>
<td><p>{{this.actualPlayers[3].firstName}}</p></td>
<td><input type="number" [(ngModel)]="this.actualPlayers[3].finalCardScore"/></td>
</tr>
</table>
<p id="score-warn" *ngIf="!totalScoreValid()">Total score doesn't add up!</p>
<button (click)="switchToNextPage()" [disabled]="!totalScoreValid()">Next</button>
</div>
<div id="which-solo" class="visible-{{this.currentPage === 4}}">
@@ -34,6 +54,8 @@
</div>
</div>
<div id="scores">
<p class="team-{{player.team}}" *ngFor="let player of actualPlayers">
{{player.firstName}}: {{calculateCurrentScore(player)}}
</p>
</div>
</div>