From 6a9ea43e2394e6cbabcb69cb5922f0ebae86016d Mon Sep 17 00:00:00 2001 From: Michel ten Voorde Date: Thu, 18 Sep 2025 23:28:02 +0200 Subject: [PATCH] Invallers --- TODO.txt | 2 +- .../substitute-selection.component.html | 6 +++--- .../substitute-selection.component.ts | 9 +++++---- .../tournament-players/tournament-players.component.ts | 1 + src/app/model/tournamentPlayer.ts | 4 +++- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/TODO.txt b/TODO.txt index aff93f5..cf9bf4b 100644 --- a/TODO.txt +++ b/TODO.txt @@ -32,7 +32,7 @@ Player-registrations: oude toernooien verbergen via knop Onderdeel afsluiten Wedstrijd opgave -Blessures + Blessures Titels pagina's Authenticatie Progress indicator tijdens communicatie backend diff --git a/src/app/components/substitute-selection/substitute-selection.component.html b/src/app/components/substitute-selection/substitute-selection.component.html index 7286a6e..e2213e3 100644 --- a/src/app/components/substitute-selection/substitute-selection.component.html +++ b/src/app/components/substitute-selection/substitute-selection.component.html @@ -9,9 +9,9 @@ Invaller - Geen - @for (player of data.availablePlayers; track player.playerId) { - + Geen + @for (player of data.availablePlayers; track player.id) { + {{ player.name }} } diff --git a/src/app/components/substitute-selection/substitute-selection.component.ts b/src/app/components/substitute-selection/substitute-selection.component.ts index afec578..b58ab7f 100644 --- a/src/app/components/substitute-selection/substitute-selection.component.ts +++ b/src/app/components/substitute-selection/substitute-selection.component.ts @@ -5,10 +5,10 @@ import { MatDialogActions, MatDialogClose, MatDialogContent, - MatDialogRef, MatDialogTitle + MatDialogRef, + MatDialogTitle } from "@angular/material/dialog"; -import {MatFormField} from "@angular/material/form-field"; -import {MatLabel} from "@angular/material/form-field"; +import {MatFormField, MatLabel} from "@angular/material/form-field"; import {MatOption, MatSelect} from "@angular/material/select"; import {TournamentPlayer} from "../../model/tournamentPlayer"; import {FormsModule} from "@angular/forms"; @@ -29,7 +29,8 @@ import {Event} from "../../model/event"; MatDialogClose, ], templateUrl: './substitute-selection.component.html', - styleUrl: './substitute-selection.component.scss' + styleUrl: './substitute-selection.component.scss', + standalone: true }) export class SubstituteSelectionComponent { diff --git a/src/app/components/tournament-players/tournament-players.component.ts b/src/app/components/tournament-players/tournament-players.component.ts index 6b89911..9447ab4 100644 --- a/src/app/components/tournament-players/tournament-players.component.ts +++ b/src/app/components/tournament-players/tournament-players.component.ts @@ -83,6 +83,7 @@ export class TournamentPlayersComponent implements OnInit { console.log(result.substitutions[1].event + ': ' + result.substitutions[1].substitute); this.tournamentService.playerSubstitute(this.tournament.id, player.playerId, result.substitutions).subscribe(data => { this.tournament = data; + console.log(this.tournament); }); } }); diff --git a/src/app/model/tournamentPlayer.ts b/src/app/model/tournamentPlayer.ts index 4deadc6..6799fbc 100644 --- a/src/app/model/tournamentPlayer.ts +++ b/src/app/model/tournamentPlayer.ts @@ -1,5 +1,6 @@ export class TournamentPlayer { + id: number; playerId: number; name: string; events: string[]; @@ -13,5 +14,6 @@ export class TournamentPlayer { export class TournamentPlayerSubstitution { substitutionId: number; event: string; - substitute: TournamentPlayer; + // substitute: TournamentPlayer; + substitute: number = -1; }