Removed *ngFor
All checks were successful
Gitea/swiss-client/pipeline/head This commit looks good

This commit is contained in:
2025-08-12 23:32:32 +02:00
parent af96ecda32
commit f88cd94316
25 changed files with 463 additions and 430 deletions

View File

@@ -3,12 +3,14 @@
@if (round.status != 'FINISHED') {
<table class="table table-sm m-4 wide w-100">
<tbody>
<tr *ngFor="let match of round.matches">
<td class="align-middle" style="width: 45%;">{{ match.team1 | teamText }}</td>
<td class="align-middle w-sep">-</td>
<td class="align-middle" style="width: 45%;">{{ match.team2 | teamText }}</td>
<td class="align-middle w-sep"></td>
</tr>
@for (match of round.matches; track match.id) {
<tr>
<td class="align-middle" style="width: 45%;">{{ match.team1 | teamText }}</td>
<td class="align-middle w-sep">-</td>
<td class="align-middle" style="width: 45%;">{{ match.team2 | teamText }}</td>
<td class="align-middle w-sep"></td>
</tr>
}
@if (round.drawnOut) {
<tr>
<td class="align-middle w-100" colspan="4"><b>Deze ronde uitgeloot:</b> {{ round.drawnOut | teamText }}</td>
@@ -19,30 +21,34 @@
} @else {
<table class="table table-sm m-4 wide w-100">
<tbody>
<tr *ngFor="let match of round.matches">
<td class="align-middle" style="width: 30%;">
@if (event.doublesEvent) {
{{ match.team1.player1 | fullName }} /<br>{{ match.team1.player2 | fullName }}
} @else {
{{ match.team1.player1 | fullName }}
}
<td class="align-middle w-sep">-</td>
<td class="align-middle" style="width: 30%;">
@if (event.doublesEvent) {
{{ match.team2.player1 | fullName }} /<br>{{ match.team2.player2 | fullName }}
} @else {
{{ match.team2.player1 | fullName }}
}
</td>
<td class="align-middle" style="width: 35%;">
<div class="row result align-items-center">
<span *ngFor="let game of match.games" class="col-3">{{ game.score1 }}-{{ game.score2 }}</span>
@if (match.games.length == 2) {
<span class="col-3"></span>
}
</div>
</td>
</tr>
@for (match of round.matches; track match.id) {
<tr>
<td class="align-middle" style="width: 30%;">
@if (event.doublesEvent) {
{{ match.team1.player1 | fullName }} /<br>{{ match.team1.player2 | fullName }}
} @else {
{{ match.team1.player1 | fullName }}
}
<td class="align-middle w-sep">-</td>
<td class="align-middle" style="width: 30%;">
@if (event.doublesEvent) {
{{ match.team2.player1 | fullName }} /<br>{{ match.team2.player2 | fullName }}
} @else {
{{ match.team2.player1 | fullName }}
}
</td>
<td class="align-middle" style="width: 35%;">
<div class="row result align-items-center">
@for (game of match.games; track game.id) {
<span class="col-3">{{ game.score1 }}-{{ game.score2 }}</span>
}
@if (match.games.length == 2) {
<span class="col-3"></span>
}
</div>
</td>
</tr>
}
@if (round.drawnOut) {
<tr>
<td class="align-middle w-100" colspan="4"><b>Deze ronde uitgeloot:</b> {{ round.drawnOut | teamText }}</td>
@@ -78,14 +84,16 @@
</tr>
</thead>
<tbody class="table-group-divider">
<tr *ngFor="let entry of round.standings.entries">
<td class="align-middle">{{ entry.position }}</td>
<td class="align-middle">{{ entry.team | teamText }}</td>
<td class="align-middle">{{ entry.played }}</td>
<td class="align-middle">{{ entry.points / 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>
</tr>
@for (entry of round.standings.entries; track entry.position) {
<tr>
<td class="align-middle">{{ entry.position }}</td>
<td class="align-middle">{{ entry.team | teamText }}</td>
<td class="align-middle">{{ entry.played }}</td>
<td class="align-middle">{{ entry.points / 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>
</tr>
}
</tbody>
</table>
}

View File

@@ -5,7 +5,7 @@ import {Group} from "../../model/group";
import {Round} from "../../model/round";
import {TournamentService} from "../../service/tournament.service";
import {ActivatedRoute, Router} from "@angular/router";
import {DecimalPipe, NgForOf} from "@angular/common";
import {DecimalPipe} from "@angular/common";
import {TeamPipe} from "../../pipes/team-pipe";
import {FullNamePipe} from "../../pipes/fullname-pipe";
import {TitleService} from "../../service/title.service";
@@ -13,7 +13,6 @@ import {TitleService} from "../../service/title.service";
@Component({
selector: 'app-round-overview',
imports: [
NgForOf,
TeamPipe,
DecimalPipe,
FullNamePipe