From a56317fecda569e5bb693da941441147b4789c57 Mon Sep 17 00:00:00 2001 From: Michel ten Voorde Date: Thu, 6 Nov 2025 16:40:20 +0100 Subject: [PATCH] Update counter --- .../counter-selection.component.html | 22 +++++++++ .../counter-selection.component.scss | 4 ++ .../counter-selection.component.ts | 49 +++++++++++++++++++ .../tournament-manage.component.html | 8 +++ .../tournament-manage.component.ts | 19 +++++++ src/app/service/tournament.service.ts | 4 ++ 6 files changed, 106 insertions(+) create mode 100644 src/app/components/counter-selection/counter-selection.component.html create mode 100644 src/app/components/counter-selection/counter-selection.component.scss create mode 100644 src/app/components/counter-selection/counter-selection.component.ts diff --git a/src/app/components/counter-selection/counter-selection.component.html b/src/app/components/counter-selection/counter-selection.component.html new file mode 100644 index 0000000..dcad043 --- /dev/null +++ b/src/app/components/counter-selection/counter-selection.component.html @@ -0,0 +1,22 @@ + +

Kies een teller:

+
+ + Teller + + Geen + @for (player of data.availableCounters; track player.playerId) { + + {{ player.name }} + + } + + +
+
+ + @if (counter) { + + } + + diff --git a/src/app/components/counter-selection/counter-selection.component.scss b/src/app/components/counter-selection/counter-selection.component.scss new file mode 100644 index 0000000..8a202a9 --- /dev/null +++ b/src/app/components/counter-selection/counter-selection.component.scss @@ -0,0 +1,4 @@ +button:disabled { + cursor: not-allowed; + pointer-events: all !important; +} diff --git a/src/app/components/counter-selection/counter-selection.component.ts b/src/app/components/counter-selection/counter-selection.component.ts new file mode 100644 index 0000000..a2e089d --- /dev/null +++ b/src/app/components/counter-selection/counter-selection.component.ts @@ -0,0 +1,49 @@ +import {Component, inject, Inject} from '@angular/core'; +import { + MAT_DIALOG_DATA, + MatDialogActions, + MatDialogClose, + MatDialogContent, + MatDialogRef +} from "@angular/material/dialog"; +import {Match} from "../../model/match"; +import {MatButton} from "@angular/material/button"; +import {TournamentPlayer} from "../../model/tournamentPlayer"; +import {MatFormField, MatLabel} from "@angular/material/form-field"; +import {MatOption, MatSelect} from "@angular/material/select"; +import {FormsModule} from "@angular/forms"; + +@Component({ + selector: 'app-counter-selection', + imports: [ + MatDialogContent, + MatButton, + MatDialogClose, + MatDialogActions, + MatFormField, + MatLabel, + MatOption, + MatSelect, + FormsModule, + + ], + templateUrl: './counter-selection.component.html', + standalone: true, + styleUrl: './counter-selection.component.scss' +}) +export class CounterSelectionComponent { + + counter: TournamentPlayer; + + readonly dialogRef = inject(MatDialogRef); + + constructor(@Inject(MAT_DIALOG_DATA) public data: { + match: Match, + availableCounters: TournamentPlayer[] + }) {} + + onAnnulerenClick() { + this.dialogRef.close(); + } + +} diff --git a/src/app/components/tournament-manage/tournament-manage.component.html b/src/app/components/tournament-manage/tournament-manage.component.html index 975b8c8..0a5aa60 100644 --- a/src/app/components/tournament-manage/tournament-manage.component.html +++ b/src/app/components/tournament-manage/tournament-manage.component.html @@ -161,6 +161,10 @@ edit Uitslag invoeren + +