This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
<h2 mat-dialog-title>Kies een baan:</h2>
|
<h2 mat-dialog-title>Kies een baan:</h2>
|
||||||
<mat-dialog-content>
|
<mat-dialog-content>
|
||||||
<button type="button" class="btn {{ data.availableCourts.indexOf(i + 1) < 0 ? 'btn-secondary' : 'btn-primary' }} btn-lg m-3"
|
@for (item of [].constructor(data.totalCourts); track item) {
|
||||||
*ngFor="let item of [].constructor(data.totalCourts); let i = index"
|
<button type="button" class="btn {{ data.availableCourts.indexOf($index + 1) < 0 ? 'btn-secondary' : 'btn-primary' }} btn-lg m-3"
|
||||||
[disabled]="data.availableCourts.indexOf(i + 1) < 0" [mat-dialog-close]="i + 1">
|
[disabled]="data.availableCourts.indexOf($index + 1) < 0" [mat-dialog-close]="$index + 1">
|
||||||
{{ i + 1 }}
|
{{ $index + 1 }}
|
||||||
</button>
|
</button>
|
||||||
|
}
|
||||||
<br>
|
<br>
|
||||||
</mat-dialog-content>
|
</mat-dialog-content>
|
||||||
<mat-dialog-actions>
|
<mat-dialog-actions>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {
|
|||||||
MatDialogTitle
|
MatDialogTitle
|
||||||
} from "@angular/material/dialog";
|
} from "@angular/material/dialog";
|
||||||
import {Match} from "../../model/match";
|
import {Match} from "../../model/match";
|
||||||
import {NgForOf} from "@angular/common";
|
|
||||||
import {MatButton} from "@angular/material/button";
|
import {MatButton} from "@angular/material/button";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -15,7 +14,6 @@ import {MatButton} from "@angular/material/button";
|
|||||||
imports: [
|
imports: [
|
||||||
MatDialogTitle,
|
MatDialogTitle,
|
||||||
MatDialogContent,
|
MatDialogContent,
|
||||||
NgForOf,
|
|
||||||
MatButton,
|
MatButton,
|
||||||
MatDialogClose,
|
MatDialogClose,
|
||||||
MatDialogActions
|
MatDialogActions
|
||||||
|
|||||||
@@ -3,19 +3,19 @@ import {
|
|||||||
MAT_DIALOG_DATA,
|
MAT_DIALOG_DATA,
|
||||||
MatDialogActions,
|
MatDialogActions,
|
||||||
MatDialogClose,
|
MatDialogClose,
|
||||||
MatDialogContent, MatDialogRef,
|
MatDialogContent,
|
||||||
|
MatDialogRef,
|
||||||
MatDialogTitle
|
MatDialogTitle
|
||||||
} from "@angular/material/dialog";
|
} from "@angular/material/dialog";
|
||||||
import {MatButton, MatIconButton} from "@angular/material/button";
|
import {MatButton} from "@angular/material/button";
|
||||||
import {DatePipe, NgClass, NgForOf} from "@angular/common";
|
import {NgClass} from "@angular/common";
|
||||||
import {MatIcon} from "@angular/material/icon";
|
|
||||||
import {TeamPipe} from "../../pipes/team-pipe";
|
import {TeamPipe} from "../../pipes/team-pipe";
|
||||||
import {FullNamePipe} from "../../pipes/fullname-pipe";
|
import {FullNamePipe} from "../../pipes/fullname-pipe";
|
||||||
import {Match} from "../../model/match";
|
import {Match} from "../../model/match";
|
||||||
import {MatFormField, MatInput} from "@angular/material/input";
|
import {MatFormField, MatInput} from "@angular/material/input";
|
||||||
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
|
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
|
||||||
import {Result} from "../../model/result";
|
import {Result} from "../../model/result";
|
||||||
import {MatGridList, MatGridTile, MatGridTileText} from "@angular/material/grid-list";
|
import {MatGridList, MatGridTile} from "@angular/material/grid-list";
|
||||||
import {Round} from "../../model/round";
|
import {Round} from "../../model/round";
|
||||||
import {Group} from "../../model/group";
|
import {Group} from "../../model/group";
|
||||||
import {Game} from "../../model/game";
|
import {Game} from "../../model/game";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@if (round) {
|
@if (round) {
|
||||||
<ng-container *ngFor="let match of round.matches">
|
@for (match of round.matches; track match.id) {
|
||||||
<div class="nobreak">
|
<div class="nobreak">
|
||||||
<mat-card appearance="outlined">
|
<mat-card appearance="outlined">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
@@ -54,10 +54,9 @@
|
|||||||
{{ group.name }} {{ round.name }}
|
{{ group.name }} {{ round.name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
</ng-container>
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {Round} from "../../model/round";
|
|||||||
import {TeamPipe} from "../../pipes/team-pipe";
|
import {TeamPipe} from "../../pipes/team-pipe";
|
||||||
import {FullNamePipe} from "../../pipes/fullname-pipe";
|
import {FullNamePipe} from "../../pipes/fullname-pipe";
|
||||||
import {Group} from "../../model/group";
|
import {Group} from "../../model/group";
|
||||||
import {NgForOf} from "@angular/common";
|
|
||||||
import {MatFormField} from "@angular/material/form-field";
|
import {MatFormField} from "@angular/material/form-field";
|
||||||
import {MatInput} from "@angular/material/input";
|
import {MatInput} from "@angular/material/input";
|
||||||
import {ReactiveFormsModule} from "@angular/forms";
|
import {ReactiveFormsModule} from "@angular/forms";
|
||||||
@@ -19,7 +18,6 @@ import {TitleService} from "../../service/title.service";
|
|||||||
MatCard,
|
MatCard,
|
||||||
MatCardContent,
|
MatCardContent,
|
||||||
TeamPipe,
|
TeamPipe,
|
||||||
NgForOf,
|
|
||||||
MatFormField,
|
MatFormField,
|
||||||
MatInput,
|
MatInput,
|
||||||
ReactiveFormsModule
|
ReactiveFormsModule
|
||||||
|
|||||||
@@ -60,9 +60,11 @@
|
|||||||
<mat-form-field appearance="fill">
|
<mat-form-field appearance="fill">
|
||||||
<mat-label>Speelsterkte</mat-label>
|
<mat-label>Speelsterkte</mat-label>
|
||||||
<mat-select [(ngModel)]="player.strength" name="strength" required>
|
<mat-select [(ngModel)]="player.strength" name="strength" required>
|
||||||
<mat-option *ngFor="let strengthOption of Strength | keyvalue" [value]="strengthOption.key">
|
@for (strengthOption of Strength | keyvalue; track strengthOption) {
|
||||||
|
<mat-option [value]="strengthOption.key">
|
||||||
{{ strengthOption.value }}
|
{{ strengthOption.value }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
}
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {MatIcon} from "@angular/material/icon";
|
|||||||
import {MatRadioButton, MatRadioGroup} from "@angular/material/radio";
|
import {MatRadioButton, MatRadioGroup} from "@angular/material/radio";
|
||||||
import {MatCard, MatCardActions, MatCardContent} from "@angular/material/card";
|
import {MatCard, MatCardActions, MatCardContent} from "@angular/material/card";
|
||||||
import {MatOption, MatSelect} from "@angular/material/select";
|
import {MatOption, MatSelect} from "@angular/material/select";
|
||||||
import {KeyValuePipe, NgForOf} from "@angular/common";
|
import {KeyValuePipe} from "@angular/common";
|
||||||
import {MatAnchor, MatButton} from "@angular/material/button";
|
import {MatAnchor, MatButton} from "@angular/material/button";
|
||||||
import {TitleService} from "../../service/title.service";
|
import {TitleService} from "../../service/title.service";
|
||||||
import {MatSnackBar} from "@angular/material/snack-bar";
|
import {MatSnackBar} from "@angular/material/snack-bar";
|
||||||
@@ -33,7 +33,6 @@ import {NgxMaskDirective} from "ngx-mask";
|
|||||||
MatSelect,
|
MatSelect,
|
||||||
MatOption,
|
MatOption,
|
||||||
KeyValuePipe,
|
KeyValuePipe,
|
||||||
NgForOf,
|
|
||||||
MatButton,
|
MatButton,
|
||||||
MatAnchor,
|
MatAnchor,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
@if (player && tournamentRegistrations && allPlayers) {
|
@if (player && tournamentRegistrations && allPlayers) {
|
||||||
<mat-card appearance="outlined">
|
<mat-card appearance="outlined">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-card *ngFor="let tournamentRegistration of getTournamentRegistrations()" appearance="outlined" class="mb-3">
|
@for (tournamentRegistration of getTournamentRegistrations(); track tournamentRegistration.id) {
|
||||||
|
<mat-card appearance="outlined" class="mb-3">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<h6>{{ tournamentRegistration.name }}</h6>
|
<h6>{{ tournamentRegistration.name }}</h6>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<ng-container *ngFor="let eventRegistration of tournamentRegistration.events">
|
@for (eventRegistration of tournamentRegistration.events; track eventRegistration.id) {
|
||||||
<div class="row event-row">
|
<div class="row event-row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<mat-checkbox [disabled]="!tournamentRegistration.editable" [(ngModel)]="eventRegistration.registered" (change)="updateModelWhenEventChecked(eventRegistration, $event)" name="registered">
|
<mat-checkbox [disabled]="!tournamentRegistration.editable" [(ngModel)]="eventRegistration.registered" (change)="updateModelWhenEventChecked(eventRegistration, $event)" name="registered">
|
||||||
@@ -20,9 +21,11 @@
|
|||||||
<mat-label>Partner</mat-label>
|
<mat-label>Partner</mat-label>
|
||||||
<mat-select [value]="eventRegistration.partner" [disabled]="!tournamentRegistration.editable || !eventRegistration.registered" [(ngModel)]="eventRegistration.partner">
|
<mat-select [value]="eventRegistration.partner" [disabled]="!tournamentRegistration.editable || !eventRegistration.registered" [(ngModel)]="eventRegistration.partner">
|
||||||
<mat-option>Geen</mat-option>
|
<mat-option>Geen</mat-option>
|
||||||
<mat-option *ngFor="let player of getRelevantPlayers(eventRegistration.type)" [value]="player.id">
|
@for (player of getRelevantPlayers(eventRegistration.type); track player.id) {
|
||||||
|
<mat-option [value]="player.id">
|
||||||
{{ player | fullName }}
|
{{ player | fullName }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
}
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
@@ -30,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-6"></div>
|
<div class="col-6"></div>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
}
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
@if (tournamentRegistration.editable) {
|
@if (tournamentRegistration.editable) {
|
||||||
<mat-card-actions>
|
<mat-card-actions>
|
||||||
@@ -45,6 +48,7 @@
|
|||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
}
|
}
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
}
|
||||||
@if (!this.showAll) {
|
@if (!this.showAll) {
|
||||||
<button mat-button (click)="this.showAll = true">
|
<button mat-button (click)="this.showAll = true">
|
||||||
<mat-icon>search</mat-icon>
|
<mat-icon>search</mat-icon>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import {MatCard, MatCardActions, MatCardContent, MatCardHeader} from "@angular/m
|
|||||||
import {MatFormField, MatLabel} from "@angular/material/form-field";
|
import {MatFormField, MatLabel} from "@angular/material/form-field";
|
||||||
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
|
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
|
||||||
import {RegistrationService} from "../../service/registration.service";
|
import {RegistrationService} from "../../service/registration.service";
|
||||||
import {NgFor, NgIf} from "@angular/common";
|
|
||||||
import {MatCheckbox, MatCheckboxChange} from "@angular/material/checkbox";
|
import {MatCheckbox, MatCheckboxChange} from "@angular/material/checkbox";
|
||||||
import {EventRegistration, TournamentRegistration} from "../../model/tournamentRegistration";
|
import {EventRegistration, TournamentRegistration} from "../../model/tournamentRegistration";
|
||||||
import {MatOption} from "@angular/material/core";
|
import {MatOption} from "@angular/material/core";
|
||||||
@@ -25,11 +24,9 @@ import {TitleService} from "../../service/title.service";
|
|||||||
MatCardHeader,
|
MatCardHeader,
|
||||||
MatFormField,
|
MatFormField,
|
||||||
MatLabel,
|
MatLabel,
|
||||||
NgFor,
|
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
MatCheckbox,
|
MatCheckbox,
|
||||||
NgIf,
|
|
||||||
MatCardActions,
|
MatCardActions,
|
||||||
RouterLink,
|
RouterLink,
|
||||||
MatOption,
|
MatOption,
|
||||||
|
|||||||
@@ -3,12 +3,14 @@
|
|||||||
@if (round.status != 'FINISHED') {
|
@if (round.status != 'FINISHED') {
|
||||||
<table class="table table-sm m-4 wide w-100">
|
<table class="table table-sm m-4 wide w-100">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let match of round.matches">
|
@for (match of round.matches; track match.id) {
|
||||||
|
<tr>
|
||||||
<td class="align-middle" style="width: 45%;">{{ match.team1 | teamText }}</td>
|
<td class="align-middle" style="width: 45%;">{{ match.team1 | teamText }}</td>
|
||||||
<td class="align-middle w-sep">-</td>
|
<td class="align-middle w-sep">-</td>
|
||||||
<td class="align-middle" style="width: 45%;">{{ match.team2 | teamText }}</td>
|
<td class="align-middle" style="width: 45%;">{{ match.team2 | teamText }}</td>
|
||||||
<td class="align-middle w-sep"></td>
|
<td class="align-middle w-sep"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
@if (round.drawnOut) {
|
@if (round.drawnOut) {
|
||||||
<tr>
|
<tr>
|
||||||
<td class="align-middle w-100" colspan="4"><b>Deze ronde uitgeloot:</b> {{ round.drawnOut | teamText }}</td>
|
<td class="align-middle w-100" colspan="4"><b>Deze ronde uitgeloot:</b> {{ round.drawnOut | teamText }}</td>
|
||||||
@@ -19,7 +21,8 @@
|
|||||||
} @else {
|
} @else {
|
||||||
<table class="table table-sm m-4 wide w-100">
|
<table class="table table-sm m-4 wide w-100">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let match of round.matches">
|
@for (match of round.matches; track match.id) {
|
||||||
|
<tr>
|
||||||
<td class="align-middle" style="width: 30%;">
|
<td class="align-middle" style="width: 30%;">
|
||||||
@if (event.doublesEvent) {
|
@if (event.doublesEvent) {
|
||||||
{{ match.team1.player1 | fullName }} /<br>{{ match.team1.player2 | fullName }}
|
{{ match.team1.player1 | fullName }} /<br>{{ match.team1.player2 | fullName }}
|
||||||
@@ -36,13 +39,16 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="align-middle" style="width: 35%;">
|
<td class="align-middle" style="width: 35%;">
|
||||||
<div class="row result align-items-center">
|
<div class="row result align-items-center">
|
||||||
<span *ngFor="let game of match.games" class="col-3">{{ game.score1 }}-{{ game.score2 }}</span>
|
@for (game of match.games; track game.id) {
|
||||||
|
<span class="col-3">{{ game.score1 }}-{{ game.score2 }}</span>
|
||||||
|
}
|
||||||
@if (match.games.length == 2) {
|
@if (match.games.length == 2) {
|
||||||
<span class="col-3"></span>
|
<span class="col-3"></span>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
@if (round.drawnOut) {
|
@if (round.drawnOut) {
|
||||||
<tr>
|
<tr>
|
||||||
<td class="align-middle w-100" colspan="4"><b>Deze ronde uitgeloot:</b> {{ round.drawnOut | teamText }}</td>
|
<td class="align-middle w-100" colspan="4"><b>Deze ronde uitgeloot:</b> {{ round.drawnOut | teamText }}</td>
|
||||||
@@ -78,7 +84,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="table-group-divider">
|
<tbody class="table-group-divider">
|
||||||
<tr *ngFor="let entry of round.standings.entries">
|
@for (entry of round.standings.entries; track entry.position) {
|
||||||
|
<tr>
|
||||||
<td class="align-middle">{{ entry.position }}</td>
|
<td class="align-middle">{{ entry.position }}</td>
|
||||||
<td class="align-middle">{{ entry.team | teamText }}</td>
|
<td class="align-middle">{{ entry.team | teamText }}</td>
|
||||||
<td class="align-middle">{{ entry.played }}</td>
|
<td class="align-middle">{{ entry.played }}</td>
|
||||||
@@ -86,6 +93,7 @@
|
|||||||
<td class="align-middle">{{ (entry.gamesWon - entry.gamesLost) / entry.played | number: '1.0-2' }}</td>
|
<td class="align-middle">{{ (entry.gamesWon - entry.gamesLost) / entry.played | number: '1.0-2' }}</td>
|
||||||
<td class="align-middle">{{ (entry.pointsWon - entry.pointsLost) / entry.played | number: '1.0-2' }}</td>
|
<td class="align-middle">{{ (entry.pointsWon - entry.pointsLost) / entry.played | number: '1.0-2' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {Group} from "../../model/group";
|
|||||||
import {Round} from "../../model/round";
|
import {Round} from "../../model/round";
|
||||||
import {TournamentService} from "../../service/tournament.service";
|
import {TournamentService} from "../../service/tournament.service";
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {DecimalPipe, NgForOf} from "@angular/common";
|
import {DecimalPipe} from "@angular/common";
|
||||||
import {TeamPipe} from "../../pipes/team-pipe";
|
import {TeamPipe} from "../../pipes/team-pipe";
|
||||||
import {FullNamePipe} from "../../pipes/fullname-pipe";
|
import {FullNamePipe} from "../../pipes/fullname-pipe";
|
||||||
import {TitleService} from "../../service/title.service";
|
import {TitleService} from "../../service/title.service";
|
||||||
@@ -13,7 +13,6 @@ import {TitleService} from "../../service/title.service";
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'app-round-overview',
|
selector: 'app-round-overview',
|
||||||
imports: [
|
imports: [
|
||||||
NgForOf,
|
|
||||||
TeamPipe,
|
TeamPipe,
|
||||||
DecimalPipe,
|
DecimalPipe,
|
||||||
FullNamePipe
|
FullNamePipe
|
||||||
|
|||||||
@@ -4,13 +4,15 @@
|
|||||||
<h5>Indeling voor {{ tournament.name }}</h5>
|
<h5>Indeling voor {{ tournament.name }}</h5>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-card *ngFor="let event of tournament.events" appearance="outlined" class="m-3">
|
@for (event of tournament.events; track event.id) {
|
||||||
|
<mat-card appearance="outlined" class="m-3">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<h6>Indeling {{ TournamentEvent.getType(event.type) }}</h6>
|
<h6>Indeling {{ TournamentEvent.getType(event.type) }}</h6>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-accordion multi="true">
|
<mat-accordion multi="true">
|
||||||
<mat-expansion-panel *ngFor="let group of event.groups">
|
@for (group of event.groups; track group.id) {
|
||||||
|
<mat-expansion-panel>
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
<mat-panel-title>
|
<mat-panel-title>
|
||||||
{{ group.name }} <span class="badge text-bg-success">{{ group.teams.length }}</span>
|
{{ group.name }} <span class="badge text-bg-success">{{ group.teams.length }}</span>
|
||||||
@@ -30,22 +32,26 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let team of group.teams">
|
@for (team of group.teams; track team.id) {
|
||||||
|
<tr>
|
||||||
<td class="align-middle">{{ team.player1 | fullName }}</td>
|
<td class="align-middle">{{ team.player1 | fullName }}</td>
|
||||||
<td class="align-middle">{{ team.player1.club }}</td>
|
<td class="align-middle">{{ team.player1.club }}</td>
|
||||||
<td class="align-middle">{{ getStrength(team.player1.strength.valueOf()) }}</td>
|
<td class="align-middle">{{ getStrength(team.player1.strength.valueOf()) }}</td>
|
||||||
@if (event.doublesEvent) {
|
@if (event.doublesEvent) {
|
||||||
<td class="align-middle">{{ team.player2 | fullName }}</td>
|
<td class="align-middle">{{ team.player2 | fullName }}</td>
|
||||||
<td class="align-middle">{{ team.player2.club }}</td>
|
<td class="align-middle">{{ team.player2?.club }}</td>
|
||||||
<td class="align-middle">{{ getStrength(team.player2.strength.valueOf()) }}</td>
|
<td class="align-middle">{{ team.player2 ? getStrength(team.player2!.strength.valueOf()) : '' }}</td>
|
||||||
}
|
}
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</mat-expansion-panel>
|
</mat-expansion-panel>
|
||||||
|
}
|
||||||
</mat-accordion>
|
</mat-accordion>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
}
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import {Tournament} from "../../model/tournament";
|
|||||||
import {TournamentService} from "../../service/tournament.service";
|
import {TournamentService} from "../../service/tournament.service";
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {MatCard, MatCardContent, MatCardHeader} from "@angular/material/card";
|
import {MatCard, MatCardContent, MatCardHeader} from "@angular/material/card";
|
||||||
import {NgForOf, NgIf} from "@angular/common";
|
|
||||||
import {
|
import {
|
||||||
MatAccordion,
|
MatAccordion,
|
||||||
MatExpansionPanel,
|
MatExpansionPanel,
|
||||||
@@ -19,12 +18,10 @@ import {FullNamePipe} from "../../pipes/fullname-pipe";
|
|||||||
imports: [
|
imports: [
|
||||||
MatCard,
|
MatCard,
|
||||||
MatCardHeader,
|
MatCardHeader,
|
||||||
NgIf,
|
|
||||||
MatCardContent,
|
MatCardContent,
|
||||||
MatExpansionPanel,
|
MatExpansionPanel,
|
||||||
MatExpansionPanelTitle,
|
MatExpansionPanelTitle,
|
||||||
MatExpansionPanelHeader,
|
MatExpansionPanelHeader,
|
||||||
NgForOf,
|
|
||||||
FullNamePipe,
|
FullNamePipe,
|
||||||
MatAccordion
|
MatAccordion
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -4,13 +4,15 @@
|
|||||||
<h5>Loting voor {{ tournament.name }}</h5>
|
<h5>Loting voor {{ tournament.name }}</h5>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-card *ngFor="let event of tournament.events" appearance="outlined" class="m-3">
|
@for (event of tournament.events; track event.id) {
|
||||||
|
<mat-card appearance="outlined" class="m-3">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<h6>Loting {{ TournamentEvent.getType(event.type) }}</h6>
|
<h6>Loting {{ TournamentEvent.getType(event.type) }}</h6>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-accordion multi="true">
|
<mat-accordion multi="true">
|
||||||
<mat-expansion-panel *ngFor="let group of event.groups">
|
@for (group of event.groups; track group.id) {
|
||||||
|
<mat-expansion-panel>
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
<mat-panel-title>
|
<mat-panel-title>
|
||||||
{{ group.name }} <span class="badge text-bg-success">{{ group.teams.length }}</span>
|
{{ group.name }} <span class="badge text-bg-success">{{ group.teams.length }}</span>
|
||||||
@@ -25,17 +27,21 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let match of group.rounds[0].matches">
|
@for (match of group.rounds[0].matches; track match.id) {
|
||||||
|
<tr>
|
||||||
<td class="align-middle">{{ match.team1 | teamText }}</td>
|
<td class="align-middle">{{ match.team1 | teamText }}</td>
|
||||||
<td class="align-middle">-</td>
|
<td class="align-middle">-</td>
|
||||||
<td class="align-middle">{{ match.team2 | teamText }}</td>
|
<td class="align-middle">{{ match.team2 | teamText }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</mat-expansion-panel>
|
</mat-expansion-panel>
|
||||||
|
}
|
||||||
</mat-accordion>
|
</mat-accordion>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
}
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import {Tournament} from "../../model/tournament";
|
|||||||
import {TournamentService} from "../../service/tournament.service";
|
import {TournamentService} from "../../service/tournament.service";
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {MatCard, MatCardContent, MatCardHeader} from "@angular/material/card";
|
import {MatCard, MatCardContent, MatCardHeader} from "@angular/material/card";
|
||||||
import {NgForOf, NgIf} from "@angular/common";
|
|
||||||
import {
|
import {
|
||||||
MatAccordion,
|
MatAccordion,
|
||||||
MatExpansionPanel,
|
MatExpansionPanel,
|
||||||
@@ -18,13 +17,11 @@ import {FullNamePipe} from "../../pipes/fullname-pipe";
|
|||||||
selector: 'app-tournament-draw',
|
selector: 'app-tournament-draw',
|
||||||
imports: [
|
imports: [
|
||||||
MatCard,
|
MatCard,
|
||||||
NgIf,
|
|
||||||
MatCardContent,
|
MatCardContent,
|
||||||
MatCardHeader,
|
MatCardHeader,
|
||||||
MatExpansionPanel,
|
MatExpansionPanel,
|
||||||
MatExpansionPanelHeader,
|
MatExpansionPanelHeader,
|
||||||
MatExpansionPanelTitle,
|
MatExpansionPanelTitle,
|
||||||
NgForOf,
|
|
||||||
TeamPipe,
|
TeamPipe,
|
||||||
MatAccordion
|
MatAccordion
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@for (tournament of getActiveTournaments(); track tournament) {
|
@for (tournament of getActiveTournaments(); track tournament.id) {
|
||||||
<tr>
|
<tr>
|
||||||
<td class="align-middle">{{ tournament.id }}</td>
|
<td class="align-middle">{{ tournament.id }}</td>
|
||||||
<td class="align-middle"><a [routerLink]="['/tournaments', tournament.id, 'manage']">{{ tournament.name }}</a></td>
|
<td class="align-middle"><a [routerLink]="['/tournaments', tournament.id, 'manage']">{{ tournament.name }}</a></td>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@if (showInactive) {
|
@if (showInactive) {
|
||||||
@for (tournament of getInactiveTournaments(); track tournament) {
|
@for (tournament of getInactiveTournaments(); track tournament.id) {
|
||||||
<tr>
|
<tr>
|
||||||
<td class="align-middle">{{ tournament.id }}</td>
|
<td class="align-middle">{{ tournament.id }}</td>
|
||||||
<td class="align-middle"><a [routerLink]="['/tournaments', tournament.id, 'manage']">{{ tournament.name }}</a></td>
|
<td class="align-middle"><a [routerLink]="['/tournaments', tournament.id, 'manage']">{{ tournament.name }}</a></td>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import {AfterContentChecked, Component, OnInit} from '@angular/core';
|
import {AfterContentChecked, Component, OnInit} from '@angular/core';
|
||||||
import {NgFor, NgIf} from "@angular/common";
|
|
||||||
import {RouterLink} from "@angular/router";
|
import {RouterLink} from "@angular/router";
|
||||||
import {Tournament} from "../../model/tournament";
|
import {Tournament} from "../../model/tournament";
|
||||||
import {TournamentService} from "../../service/tournament.service";
|
import {TournamentService} from "../../service/tournament.service";
|
||||||
@@ -12,7 +11,7 @@ import {TitleService} from "../../service/title.service";
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'app-tournament-list',
|
selector: 'app-tournament-list',
|
||||||
imports: [
|
imports: [
|
||||||
NgFor, RouterLink, NgIf, MatAnchor, MatIcon, MatCard, MatCardContent, MatButton, MatTableModule
|
RouterLink, MatAnchor, MatIcon, MatCard, MatCardContent, MatButton, MatTableModule
|
||||||
],
|
],
|
||||||
templateUrl: './tournament-list.component.html',
|
templateUrl: './tournament-list.component.html',
|
||||||
styleUrl: './tournament-list.component.scss'
|
styleUrl: './tournament-list.component.scss'
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
<h6>Totaal: {{ getTournamentMatchCount(tournament)}} wedstrijden</h6>
|
<h6>Totaal: {{ getTournamentMatchCount(tournament)}} wedstrijden</h6>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@for (event of tournament.events; track event) {
|
@for (event of tournament.events; track event.id) {
|
||||||
@if (event.groups.length > 0) {
|
@if (event.groups.length > 0) {
|
||||||
<mat-card appearance="outlined" class="m-3">
|
<mat-card appearance="outlined" class="m-3">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
@@ -59,7 +59,8 @@
|
|||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-accordion multi="true">
|
<mat-accordion multi="true">
|
||||||
<mat-expansion-panel *ngFor="let group of event.groups">
|
@for (group of event.groups; track group.id) {
|
||||||
|
<mat-expansion-panel>
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
<mat-panel-title>
|
<mat-panel-title>
|
||||||
{{ group.name }} <span class="badge text-bg-success">{{ group.teams.length }}</span>
|
{{ group.name }} <span class="badge text-bg-success">{{ group.teams.length }}</span>
|
||||||
@@ -79,19 +80,22 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let team of group.teams">
|
@for (team of group.teams; track team.id) {
|
||||||
|
<tr>
|
||||||
<td class="align-middle">{{ team.player1 | fullName }}</td>
|
<td class="align-middle">{{ team.player1 | fullName }}</td>
|
||||||
<td class="align-middle">{{ team.player1.club }}</td>
|
<td class="align-middle">{{ team.player1.club }}</td>
|
||||||
<td class="align-middle">{{ getStrength(team.player1.strength.valueOf()) }}</td>
|
<td class="align-middle">{{ getStrength(team.player1.strength.valueOf()) }}</td>
|
||||||
@if (event.doublesEvent) {
|
@if (event.doublesEvent && team.player2) {
|
||||||
<td class="align-middle">{{ team.player2 | fullName }}</td>
|
<td class="align-middle">{{ team.player2 | fullName }}</td>
|
||||||
<td class="align-middle">{{ team.player2?.club }}</td>
|
<td class="align-middle">{{ team.player2.club }}</td>
|
||||||
<td class="align-middle">{{ getStrength(team.player2?.strength?.valueOf()) }}</td>
|
<td class="align-middle">{{ getStrength(team.player2.strength.valueOf()) }}</td>
|
||||||
}
|
}
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</mat-expansion-panel>
|
</mat-expansion-panel>
|
||||||
|
}
|
||||||
</mat-accordion>
|
</mat-accordion>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@@ -167,8 +171,8 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<mat-tab-group animationDuration="0ms" disableRipple="true">
|
<mat-tab-group animationDuration="0ms" disableRipple="true">
|
||||||
<ng-container *ngFor="let event of tournament.events">
|
@for (event of tournament.events; track event.id) {
|
||||||
<ng-container *ngFor="let group of event.groups">
|
@for (group of event.groups; track group.id) {
|
||||||
<mat-tab label="{{group.id}}">
|
<mat-tab label="{{group.id}}">
|
||||||
<ng-template mat-tab-label>
|
<ng-template mat-tab-label>
|
||||||
<!--<mat-icon>list</mat-icon> -->
|
<!--<mat-icon>list</mat-icon> -->
|
||||||
@@ -205,7 +209,7 @@
|
|||||||
disableRipple="true"
|
disableRipple="true"
|
||||||
[(selectedIndex)]="activeRoundTab"
|
[(selectedIndex)]="activeRoundTab"
|
||||||
(selectedTabChange)="onRoundTabChange($event)">
|
(selectedTabChange)="onRoundTabChange($event)">
|
||||||
<ng-container *ngFor="let round of group.rounds; index as roundIndex">
|
@for (round of group.rounds; track round.id; let roundIndex = $index) {
|
||||||
<mat-tab label="{{round.id}}">
|
<mat-tab label="{{round.id}}">
|
||||||
<ng-template mat-tab-label>
|
<ng-template mat-tab-label>
|
||||||
<mat-icon>{{ getRoundIcon(round.status) }}</mat-icon>
|
<mat-icon>{{ getRoundIcon(round.status) }}</mat-icon>
|
||||||
@@ -249,12 +253,14 @@
|
|||||||
@if (round.status == 'NOT_STARTED') {
|
@if (round.status == 'NOT_STARTED') {
|
||||||
<table class="table table-hover m-4 wide w-100">
|
<table class="table table-hover m-4 wide w-100">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let match of round.matches">
|
@for (match of round.matches; track match.id) {
|
||||||
|
<tr>
|
||||||
<td class="align-middle w-team">{{ match.team1 | teamText }}</td>
|
<td class="align-middle w-team">{{ match.team1 | teamText }}</td>
|
||||||
<td class="align-middle w-sep">-</td>
|
<td class="align-middle w-sep">-</td>
|
||||||
<td class="align-middle w-team">{{ match.team2 | teamText }}</td>
|
<td class="align-middle w-team">{{ match.team2 | teamText }}</td>
|
||||||
<td class="align-middle w-fill"></td>
|
<td class="align-middle w-fill"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
@if (round.drawnOut) {
|
@if (round.drawnOut) {
|
||||||
<tr>
|
<tr>
|
||||||
<td class="align-middle w-100" colspan="4"><b>Deze ronde uitgeloot:</b> {{ round.drawnOut | teamText }}</td>
|
<td class="align-middle w-100" colspan="4"><b>Deze ronde uitgeloot:</b> {{ round.drawnOut | teamText }}</td>
|
||||||
@@ -265,7 +271,8 @@
|
|||||||
} @else if (round.status == 'IN_PROGRESS') {
|
} @else if (round.status == 'IN_PROGRESS') {
|
||||||
<table class="table table-hover m-4 wide w-100">
|
<table class="table table-hover m-4 wide w-100">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let match of round.matches">
|
@for (match of round.matches; track match.id) {
|
||||||
|
<tr>
|
||||||
<td class="align-middle w-team" [ngClass]="{'winner': checkWinner(match) == 1}">{{ match.team1 | teamText }}</td>
|
<td class="align-middle w-team" [ngClass]="{'winner': checkWinner(match) == 1}">{{ match.team1 | teamText }}</td>
|
||||||
<td class="align-middle w-sep">-</td>
|
<td class="align-middle w-sep">-</td>
|
||||||
<td class="align-middle w-team" [ngClass]="{'winner': checkWinner(match) == 2}">{{ match.team2 | teamText }}</td>
|
<td class="align-middle w-team" [ngClass]="{'winner': checkWinner(match) == 2}">{{ match.team2 | teamText }}</td>
|
||||||
@@ -286,7 +293,9 @@
|
|||||||
</button>
|
</button>
|
||||||
} @else if (match.status == 'FINISHED') {
|
} @else if (match.status == 'FINISHED') {
|
||||||
<div class="row result align-items-center">
|
<div class="row result align-items-center">
|
||||||
<span *ngFor="let game of match.games" class="col-2">{{ game.score1 }}-{{ game.score2 }}</span>
|
@for (game of match.games; track game.id) {
|
||||||
|
<span class="col-2">{{ game.score1 }}-{{ game.score2 }}</span>
|
||||||
|
}
|
||||||
@if (match.games.length == 2) {
|
@if (match.games.length == 2) {
|
||||||
<span class="col-2"></span>
|
<span class="col-2"></span>
|
||||||
}
|
}
|
||||||
@@ -304,6 +313,7 @@
|
|||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
@if (round.drawnOut) {
|
@if (round.drawnOut) {
|
||||||
<tr>
|
<tr>
|
||||||
<td class="align-middle w-100" colspan="4"><b>Deze ronde uitgeloot:</b> {{ round.drawnOut | teamText }}</td>
|
<td class="align-middle w-100" colspan="4"><b>Deze ronde uitgeloot:</b> {{ round.drawnOut | teamText }}</td>
|
||||||
@@ -314,19 +324,23 @@
|
|||||||
} @else if (round.status == 'FINISHED') {
|
} @else if (round.status == 'FINISHED') {
|
||||||
<table class="table table-hover m-4 wide {{ this.groupIsDoublesType(group) ? 'w-100' : 'w-100' }}">
|
<table class="table table-hover m-4 wide {{ this.groupIsDoublesType(group) ? 'w-100' : 'w-100' }}">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let match of round.matches">
|
@for (match of round.matches; track match.id) {
|
||||||
|
<tr>
|
||||||
<td class="align-middle w-team" [ngClass]="{'winner': checkWinner(match) == 1}">{{ match.team1 | teamText }}</td>
|
<td class="align-middle w-team" [ngClass]="{'winner': checkWinner(match) == 1}">{{ match.team1 | teamText }}</td>
|
||||||
<td class="align-middle w-sep">-</td>
|
<td class="align-middle w-sep">-</td>
|
||||||
<td class="align-middle w-team" [ngClass]="{'winner': checkWinner(match) == 2}">{{ match.team2 | teamText }}</td>
|
<td class="align-middle w-team" [ngClass]="{'winner': checkWinner(match) == 2}">{{ match.team2 | teamText }}</td>
|
||||||
<td class="align-middle w-fill">
|
<td class="align-middle w-fill">
|
||||||
<div class="row result align-items-center">
|
<div class="row result align-items-center">
|
||||||
<span *ngFor="let game of match.games" class="col-2">{{ game.score1 }}-{{ game.score2 }}</span>
|
@for (game of match.games; track game.id) {
|
||||||
|
<span class="col-2">{{ game.score1 }}-{{ game.score2 }}</span>
|
||||||
|
}
|
||||||
@if (match.games.length == 2) {
|
@if (match.games.length == 2) {
|
||||||
<span class="col-2"></span>
|
<span class="col-2"></span>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
@if (round.drawnOut) {
|
@if (round.drawnOut) {
|
||||||
<tr>
|
<tr>
|
||||||
<td class="align-middle w-100" colspan="4"><b>Deze ronde uitgeloot:</b> {{ round.drawnOut | teamText }}</td>
|
<td class="align-middle w-100" colspan="4"><b>Deze ronde uitgeloot:</b> {{ round.drawnOut | teamText }}</td>
|
||||||
@@ -357,7 +371,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="table-group-divider">
|
<tbody class="table-group-divider">
|
||||||
<tr *ngFor="let entry of getStandingsForRound(round, group).entries">
|
@for (entry of getStandingsForRound(round, group).entries; track entry.position) {
|
||||||
|
<tr>
|
||||||
<td class="align-middle">{{ entry.position }}</td>
|
<td class="align-middle">{{ entry.position }}</td>
|
||||||
<td class="align-middle">{{ entry.team | teamText }}</td>
|
<td class="align-middle">{{ entry.team | teamText }}</td>
|
||||||
<td class="align-middle">{{ entry.played }}</td>
|
<td class="align-middle">{{ entry.played }}</td>
|
||||||
@@ -377,14 +392,15 @@
|
|||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
</ng-container>
|
}
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
</ng-container>
|
}
|
||||||
</ng-container>
|
}
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
}
|
}
|
||||||
@@ -411,12 +427,13 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let tournamentPlayer of tournament.tournamentPlayers">
|
@for (tournamentPlayer of tournament.tournamentPlayers; track tournamentPlayer.playerId) {
|
||||||
|
<tr>
|
||||||
<td>{{ tournamentPlayer.name }}</td>
|
<td>{{ tournamentPlayer.name }}</td>
|
||||||
<td>
|
<td>
|
||||||
<ng-container *ngFor="let event of tournamentPlayer.events">
|
@for (event of tournamentPlayer.events; track event) {
|
||||||
{{ event }}
|
{{ event }}
|
||||||
</ng-container>
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ tournament.costsPerEvent[tournamentPlayer.events.length - 1] | currency:'EUR':'symbol':'1.2-2':'nl' }}
|
{{ tournament.costsPerEvent[tournamentPlayer.events.length - 1] | currency:'EUR':'symbol':'1.2-2':'nl' }}
|
||||||
@@ -440,9 +457,9 @@
|
|||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
MatExpansionPanelTitle
|
MatExpansionPanelTitle
|
||||||
} from "@angular/material/expansion";
|
} from "@angular/material/expansion";
|
||||||
import {MatCard, MatCardContent, MatCardHeader} from "@angular/material/card";
|
import {MatCard, MatCardContent, MatCardHeader} from "@angular/material/card";
|
||||||
import {CurrencyPipe, DatePipe, DecimalPipe, NgClass, NgForOf, NgIf} from "@angular/common";
|
import {CurrencyPipe, DatePipe, DecimalPipe, NgClass} from "@angular/common";
|
||||||
import {TeamPipe} from "../../pipes/team-pipe";
|
import {TeamPipe} from "../../pipes/team-pipe";
|
||||||
import {TournamentService} from "../../service/tournament.service";
|
import {TournamentService} from "../../service/tournament.service";
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
@@ -44,8 +44,6 @@ import {TitleService} from "../../service/title.service";
|
|||||||
MatExpansionPanel,
|
MatExpansionPanel,
|
||||||
MatExpansionPanelHeader,
|
MatExpansionPanelHeader,
|
||||||
MatExpansionPanelTitle,
|
MatExpansionPanelTitle,
|
||||||
NgForOf,
|
|
||||||
NgIf,
|
|
||||||
TeamPipe,
|
TeamPipe,
|
||||||
MatIcon,
|
MatIcon,
|
||||||
NgClass,
|
NgClass,
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
<h5>Inschrijvingen voor {{ tournament.name }}</h5>
|
<h5>Inschrijvingen voor {{ tournament.name }}</h5>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-card *ngFor="let event of tournament.events" appearance="outlined" class="m-3">
|
@for (event of tournament.events; track event.id) {
|
||||||
|
<mat-card appearance="outlined" class="m-3">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<h6>{{ TournamentEvent.getType(event.type) }} ({{ event.registrations.length}} inschrijvingen)</h6>
|
<h6>{{ TournamentEvent.getType(event.type) }} ({{ event.registrations.length}} inschrijvingen)</h6>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
@@ -21,7 +22,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let registration of event.registrations">
|
@for (registration of event.registrations; track registration.id) {
|
||||||
|
<tr>
|
||||||
<td class="align-middle">{{ registration.player | fullName }}</td>
|
<td class="align-middle">{{ registration.player | fullName }}</td>
|
||||||
<td class="align-middle">{{ registration.player.club }}</td>
|
<td class="align-middle">{{ registration.player.club }}</td>
|
||||||
@if (event.doublesEvent) {
|
@if (event.doublesEvent) {
|
||||||
@@ -29,10 +31,12 @@
|
|||||||
<td class="align-middle">{{ registration.partner | fullName }}</td>
|
<td class="align-middle">{{ registration.partner | fullName }}</td>
|
||||||
}
|
}
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
}
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import {MatCard, MatCardContent, MatCardHeader} from "@angular/material/card";
|
|||||||
import {Tournament} from "../../model/tournament";
|
import {Tournament} from "../../model/tournament";
|
||||||
import {TournamentService} from "../../service/tournament.service";
|
import {TournamentService} from "../../service/tournament.service";
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {NgForOf, NgIf} from "@angular/common";
|
|
||||||
import {Event} from "../../model/event";
|
import {Event} from "../../model/event";
|
||||||
import {FullNamePipe} from "../../pipes/fullname-pipe";
|
import {FullNamePipe} from "../../pipes/fullname-pipe";
|
||||||
import {TitleService} from "../../service/title.service";
|
import {TitleService} from "../../service/title.service";
|
||||||
@@ -14,8 +13,6 @@ import {TitleService} from "../../service/title.service";
|
|||||||
MatCard,
|
MatCard,
|
||||||
MatCardHeader,
|
MatCardHeader,
|
||||||
MatCardContent,
|
MatCardContent,
|
||||||
NgForOf,
|
|
||||||
NgIf,
|
|
||||||
FullNamePipe
|
FullNamePipe
|
||||||
],
|
],
|
||||||
templateUrl: './tournament-registrations.component.html',
|
templateUrl: './tournament-registrations.component.html',
|
||||||
|
|||||||
@@ -11,15 +11,18 @@
|
|||||||
</mat-panel-title>
|
</mat-panel-title>
|
||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let validation of tournamentValidation.validations">
|
@for (validation of tournamentValidation.validations; track validation) {
|
||||||
|
<li>
|
||||||
<mat-icon class="text-{{ getColorForSeverity(validation.severity) }}">{{ getIconForSeverity(validation.severity) }}</mat-icon>
|
<mat-icon class="text-{{ getColorForSeverity(validation.severity) }}">{{ getIconForSeverity(validation.severity) }}</mat-icon>
|
||||||
{{ validation.message }}
|
{{ validation.message }}
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
</ul>
|
</ul>
|
||||||
</mat-expansion-panel>
|
</mat-expansion-panel>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<mat-card *ngFor="let event of tournament.events" appearance="outlined" class="m-3">
|
@for (event of tournament.events; track event.id) {
|
||||||
|
<mat-card appearance="outlined" class="m-3">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<h6>{{ TournamentEvent.getType(event.type) }}</h6>
|
<h6>{{ TournamentEvent.getType(event.type) }}</h6>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
@@ -43,7 +46,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let registration of event.registrations">
|
@for (registration of event.registrations; track registration.id) {
|
||||||
|
<tr>
|
||||||
<td class="align-middle">{{ registration.player | fullName }}</td>
|
<td class="align-middle">{{ registration.player | fullName }}</td>
|
||||||
<td class="align-middle">{{ registration.player.club }}</td>
|
<td class="align-middle">{{ registration.player.club }}</td>
|
||||||
@if (event.doublesEvent) {
|
@if (event.doublesEvent) {
|
||||||
@@ -51,6 +55,7 @@
|
|||||||
<td class="align-middle">{{ registration.partner?.club }}</td>
|
<td class="align-middle">{{ registration.partner?.club }}</td>
|
||||||
}
|
}
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</mat-expansion-panel>
|
</mat-expansion-panel>
|
||||||
@@ -61,13 +66,16 @@
|
|||||||
</mat-panel-title>
|
</mat-panel-title>
|
||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let validation of getEventValidation(event.id)?.validations">
|
@for (validation of getEventValidation(event.id)?.validations; track validation) {
|
||||||
|
<li>
|
||||||
<mat-icon class="text-{{ getColorForSeverity(validation.severity) }}">{{ getIconForSeverity(validation.severity) }}</mat-icon>
|
<mat-icon class="text-{{ getColorForSeverity(validation.severity) }}">{{ getIconForSeverity(validation.severity) }}</mat-icon>
|
||||||
<player-link [validationMessage]="validation.message"></player-link>
|
<player-link [validationMessage]="validation.message"></player-link>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
</ul>
|
</ul>
|
||||||
</mat-expansion-panel>
|
</mat-expansion-panel>
|
||||||
</mat-accordion>
|
</mat-accordion>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {MatCard, MatCardContent, MatCardHeader} from "@angular/material/card";
|
import {MatCard, MatCardContent, MatCardHeader} from "@angular/material/card";
|
||||||
import {Tournament} from "../../model/tournament";
|
import {Tournament} from "../../model/tournament";
|
||||||
import {NgForOf, NgIf} from "@angular/common";
|
|
||||||
import {Event} from "../../model/event";
|
import {Event} from "../../model/event";
|
||||||
import {TournamentService} from "../../service/tournament.service";
|
import {TournamentService} from "../../service/tournament.service";
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
@@ -24,11 +23,9 @@ import {PlayerLinkComponent} from "../player-link/player-link.component";
|
|||||||
MatCard,
|
MatCard,
|
||||||
MatCardHeader,
|
MatCardHeader,
|
||||||
MatCardContent,
|
MatCardContent,
|
||||||
NgForOf,
|
|
||||||
MatExpansionPanel,
|
MatExpansionPanel,
|
||||||
MatExpansionPanelTitle,
|
MatExpansionPanelTitle,
|
||||||
MatExpansionPanelHeader,
|
MatExpansionPanelHeader,
|
||||||
NgIf,
|
|
||||||
MatAccordion,
|
MatAccordion,
|
||||||
MatIcon,
|
MatIcon,
|
||||||
FullNamePipe,
|
FullNamePipe,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
export class Game {
|
export class Game {
|
||||||
|
id: number;
|
||||||
score1: number;
|
score1: number;
|
||||||
score2: number;
|
score2: number;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import {Player} from "./player";
|
|||||||
import {FullNamePipe} from "../pipes/fullname-pipe";
|
import {FullNamePipe} from "../pipes/fullname-pipe";
|
||||||
|
|
||||||
export class Team {
|
export class Team {
|
||||||
|
id: number;
|
||||||
player1: Player;
|
player1: Player;
|
||||||
player2: Player;
|
player2: Player | null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user