Added match counter
All checks were successful
Gitea/swiss-client/pipeline/head This commit looks good

This commit is contained in:
2025-08-18 23:28:15 +02:00
parent 71e5b5c912
commit 5a5c134002
22 changed files with 484 additions and 2070 deletions

View File

@@ -1,10 +1,5 @@
@if (tournament) {
<mat-card appearance="outlined">
<!--
<mat-card-header>
<h5>{{ tournament.name }}</h5>
</mat-card-header>
-->
<mat-card-content>
<mat-tab-group animationDuration="0ms" disableRipple="true">
@@ -108,56 +103,43 @@
<mat-tab>
<ng-template mat-tab-label>
<mat-icon>play_arrow</mat-icon>
&nbsp;Actieve wedstrijden
&nbsp;
&nbsp;Actieve wedstrijden&nbsp;&nbsp;
@if (this.activeMatches().length > 0) {
<span class="badge text-bg-success">{{ this.activeMatches().length }}</span>
}
</ng-template>
@if (this.activeMatches().length > 0) {
<table class="table table-hover w-100 m-4">
<thead>
<tr>
<th colspan="3">Wedstrijd</th>
<th>Onderdeel/Ronde</th>
<th>Start</th>
<th>Baan</th>
<th></th>
</tr>
</thead>
<tbody>
@for (activeMatch of this.activeMatches(); track activeMatch.match.id) {
<tr>
<td class="align-middle">{{ activeMatch.match.team1 | teamText }}</td>
<td class="align-middle">-</td>
<td class="align-middle">{{ activeMatch.match.team2 | teamText }}</td>
<td class="align-middle">{{ activeMatch.group.name }} {{ activeMatch.round.name }}</td>
<td class="align-middle">{{ activeMatch.match.startTime | date: 'HH:mm' }}</td>
<td class="align-middle">{{ activeMatch.match.court }}</td>
<td nowrap class="align-middle">
<button class="align-baseline" mat-button (click)="editResult(activeMatch.match, activeMatch.group, activeMatch.round)">
<mat-icon>edit</mat-icon>
Uitslag invoeren
</button>
<button mat-icon-button [matMenuTriggerFor]="activeMatchMenu" [matMenuTriggerData]="{ match: activeMatch.match }" class="menu-button">
<mat-icon>more_vert</mat-icon>
</button>
</td>
</tr>
}
</tbody>
</table>
<mat-menu #activeMatchMenu="matMenu">
<ng-template matMenuContent let-match="match">
<button mat-button (click)="stopMatch(match)">
<mat-icon>stop</mat-icon>
Wedstrijd stoppen
</button>
</ng-template>
</mat-menu>
<h6 class="mt-3">Actieve wedstrijden</h6>
@for (activeMatch of this.activeMatches(); track activeMatch.match.id) {
<mat-expansion-panel>
<mat-expansion-panel-header>
<div class="col-md-2">Baan {{ activeMatch.match.court }}</div>
<div class="col-md-3">{{ activeMatch.match.team1 | teamText }}</div>
<div class="col-md-1">-</div>
<div class="col-md-3">{{ activeMatch.match.team2 | teamText }}</div>
<div class="col-md-3">{{ activeMatch.group.name }} {{ activeMatch.round.name }}</div>
</mat-expansion-panel-header>
<div class="row">
<div class="col-md-3">Teller: {{ activeMatch.match.counter | fullName }}</div>
<div class="col-md-5"></div>
<div class="col-md-2">Starttijd: {{ activeMatch.match.startTime | date: 'HH:mm' }}</div>
<div class="col-md-2">Duur: {{ getDuration(activeMatch.match.startTime) | date: 'mm:ss' }}</div>
</div>
<mat-action-row>
<button class="align-baseline" mat-button (click)="editResult(activeMatch.match, activeMatch.group, activeMatch.round)">
<mat-icon>edit</mat-icon>
Uitslag invoeren
</button>
<button mat-button (click)="stopMatch(activeMatch.match)">
<mat-icon>stop</mat-icon>
Wedstrijd stoppen
</button>
</mat-action-row>
</mat-expansion-panel>
<br>
}
} @else {
<h6 class="mt-3">Geen actieve wedstrijden</h6>
}
@@ -223,11 +205,11 @@
<mat-icon>play_arrow</mat-icon>
Ronde starten
</button>
<button mat-menu-item (click)="printMatchSheets(round)">
<mat-icon>print</mat-icon>
Wedstrijdbriefjes printen
</button>
}
<button mat-menu-item (click)="printMatchSheets(round)">
<mat-icon>print</mat-icon>
Wedstrijdbriefjes printen
</button>
<button mat-menu-item (click)="printRoundOverview(round)">
<mat-icon>print</mat-icon>
Rondeoverzicht printen
@@ -402,8 +384,7 @@
}
</mat-tab-group>
</mat-tab>
}
@if (tournament.status == 'ONGOING' || tournament.status == 'DRAWN') {
<mat-tab>
<ng-template mat-tab-label>
<mat-icon>settings</mat-icon>