Always show substitutes if applicable
All checks were successful
Gitea/swiss-client/pipeline/head This commit looks good
All checks were successful
Gitea/swiss-client/pipeline/head This commit looks good
This commit is contained in:
@@ -19,7 +19,12 @@
|
|||||||
|
|
||||||
<mat-grid-tile colspan="2">
|
<mat-grid-tile colspan="2">
|
||||||
<div class="w-100" [ngClass]="{'winner': validateResult() == 1}">
|
<div class="w-100" [ngClass]="{'winner': validateResult() == 1}">
|
||||||
{{ data.match.team1 | teamText }}
|
<app-team-display
|
||||||
|
[team]="data.match.team1"
|
||||||
|
[event]="data.event"
|
||||||
|
[tournament]="data.tournament"
|
||||||
|
[inline]="true">
|
||||||
|
</app-team-display>
|
||||||
</div>
|
</div>
|
||||||
</mat-grid-tile>
|
</mat-grid-tile>
|
||||||
|
|
||||||
@@ -41,7 +46,12 @@
|
|||||||
|
|
||||||
<mat-grid-tile colspan="2">
|
<mat-grid-tile colspan="2">
|
||||||
<div class="w-100" [ngClass]="{'winner': validateResult() == -1}">
|
<div class="w-100" [ngClass]="{'winner': validateResult() == -1}">
|
||||||
{{ data.match.team2 | teamText }}
|
<app-team-display
|
||||||
|
[team]="data.match.team2"
|
||||||
|
[event]="data.event"
|
||||||
|
[tournament]="data.tournament"
|
||||||
|
[inline]="true">
|
||||||
|
</app-team-display>
|
||||||
</div>
|
</div>
|
||||||
</mat-grid-tile>
|
</mat-grid-tile>
|
||||||
<mat-grid-tile>
|
<mat-grid-tile>
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ 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";
|
||||||
|
import {TeamDisplayComponent} from "../team-display/team-display.component";
|
||||||
|
import {Event} from "../../model/event";
|
||||||
|
import {Tournament} from "../../model/tournament";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-match-result',
|
selector: 'app-match-result',
|
||||||
@@ -28,14 +31,14 @@ import {Game} from "../../model/game";
|
|||||||
MatButton,
|
MatButton,
|
||||||
MatDialogClose,
|
MatDialogClose,
|
||||||
MatDialogTitle,
|
MatDialogTitle,
|
||||||
TeamPipe,
|
|
||||||
MatInput,
|
MatInput,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
MatFormField,
|
MatFormField,
|
||||||
MatGridList,
|
MatGridList,
|
||||||
MatGridTile,
|
MatGridTile,
|
||||||
NgClass
|
NgClass,
|
||||||
|
TeamDisplayComponent
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
FullNamePipe,
|
FullNamePipe,
|
||||||
@@ -49,7 +52,7 @@ export class MatchResultComponent {
|
|||||||
|
|
||||||
result: Result = new Result();
|
result: Result = new Result();
|
||||||
|
|
||||||
constructor(@Inject(MAT_DIALOG_DATA) public data: {match: Match, group: Group, round: Round}) {
|
constructor(@Inject(MAT_DIALOG_DATA) public data: {match: Match, tournament: Tournament, event: Event, group: Group, round: Round}) {
|
||||||
this.result.matchId = this.data.match.id;
|
this.result.matchId = this.data.match.id;
|
||||||
|
|
||||||
if (data.match.games.length == 0) {
|
if (data.match.games.length == 0) {
|
||||||
|
|||||||
@@ -8,7 +8,14 @@
|
|||||||
<br>
|
<br>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<b>{{ match.team1 | teamText }}</b>
|
<b>
|
||||||
|
<app-team-display
|
||||||
|
[team]="match.team1"
|
||||||
|
[event]="this.event"
|
||||||
|
[tournament]="this.tournament"
|
||||||
|
[inline]="true">
|
||||||
|
</app-team-display>
|
||||||
|
</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field appearance="outline">
|
||||||
@@ -28,7 +35,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<b>{{ match.team2 | teamText }}</b>
|
<app-team-display
|
||||||
|
[team]="match.team2"
|
||||||
|
[event]="this.event"
|
||||||
|
[tournament]="this.tournament"
|
||||||
|
[inline]="true">
|
||||||
|
</app-team-display>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field appearance="outline">
|
||||||
|
|||||||
@@ -11,16 +11,18 @@ 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";
|
||||||
import {HeaderService} from "../../service/header.service";
|
import {HeaderService} from "../../service/header.service";
|
||||||
|
import {TeamDisplayComponent} from "../team-display/team-display.component";
|
||||||
|
import {Event} from "../../model/event";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-match-sheets',
|
selector: 'app-match-sheets',
|
||||||
imports: [
|
imports: [
|
||||||
MatCard,
|
MatCard,
|
||||||
MatCardContent,
|
MatCardContent,
|
||||||
TeamPipe,
|
|
||||||
MatFormField,
|
MatFormField,
|
||||||
MatInput,
|
MatInput,
|
||||||
ReactiveFormsModule
|
ReactiveFormsModule,
|
||||||
|
TeamDisplayComponent
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
TeamPipe,
|
TeamPipe,
|
||||||
@@ -33,6 +35,7 @@ import {HeaderService} from "../../service/header.service";
|
|||||||
export class MatchSheetsComponent implements OnInit, OnDestroy {
|
export class MatchSheetsComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
tournament: Tournament;
|
tournament: Tournament;
|
||||||
|
event: Event;
|
||||||
group: Group;
|
group: Group;
|
||||||
round: Round;
|
round: Round;
|
||||||
|
|
||||||
@@ -54,6 +57,7 @@ export class MatchSheetsComponent implements OnInit, OnDestroy {
|
|||||||
for (let group of event.groups) {
|
for (let group of event.groups) {
|
||||||
for (let round of group.rounds) {
|
for (let round of group.rounds) {
|
||||||
if (round.id == roundId) {
|
if (round.id == roundId) {
|
||||||
|
this.event = event;
|
||||||
this.group = group;
|
this.group = group;
|
||||||
this.round = round;
|
this.round = round;
|
||||||
this.headerService.setTitle(`Wedstrijdbriefjes ${this.group.name} ${this.round.name}`);
|
this.headerService.setTitle(`Wedstrijdbriefjes ${this.group.name} ${this.round.name}`);
|
||||||
|
|||||||
@@ -14,9 +14,7 @@ import {MatTooltip} from '@angular/material/tooltip';
|
|||||||
@let substitute = getSubstituteForEvent(player, event);
|
@let substitute = getSubstituteForEvent(player, event);
|
||||||
<span [class.has-substitute]="substitute"
|
<span [class.has-substitute]="substitute"
|
||||||
[matTooltip]="substitute ? 'Valt in voor ' + (player | fullName) : ''"
|
[matTooltip]="substitute ? 'Valt in voor ' + (player | fullName) : ''"
|
||||||
matTooltipPosition="below">
|
matTooltipPosition="below">{{ substitute || (player | fullName) }}</span>
|
||||||
{{ substitute || (player | fullName) }}
|
|
||||||
</span>
|
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class PlayerDisplayComponent {
|
export class PlayerDisplayComponent {
|
||||||
|
|||||||
@@ -5,9 +5,23 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@for (match of round.matches; track match.id) {
|
@for (match of round.matches; track match.id) {
|
||||||
<tr>
|
<tr>
|
||||||
<td class="align-middle" style="width: 45%;">{{ match.team1 | teamText }}</td>
|
<td class="align-middle" style="width: 45%;">
|
||||||
|
<app-team-display
|
||||||
|
[team]="match.team1"
|
||||||
|
[event]="this.event"
|
||||||
|
[tournament]="this.tournament"
|
||||||
|
[inline]="false">
|
||||||
|
</app-team-display>
|
||||||
|
</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%;">
|
||||||
|
<app-team-display
|
||||||
|
[team]="match.team2"
|
||||||
|
[event]="this.event"
|
||||||
|
[tournament]="this.tournament"
|
||||||
|
[inline]="true">
|
||||||
|
</app-team-display>
|
||||||
|
</td>
|
||||||
<td class="align-middle w-sep"></td>
|
<td class="align-middle w-sep"></td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -24,18 +38,20 @@
|
|||||||
@for (match of round.matches; track match.id) {
|
@for (match of round.matches; track match.id) {
|
||||||
<tr>
|
<tr>
|
||||||
<td class="align-middle" style="width: 30%;">
|
<td class="align-middle" style="width: 30%;">
|
||||||
@if (event.doublesEvent) {
|
<app-team-display
|
||||||
{{ match.team1.player1 | fullName }} /<br>{{ match.team1.player2 | fullName }}
|
[team]="match.team1"
|
||||||
} @else {
|
[event]="this.event"
|
||||||
{{ match.team1.player1 | fullName }}
|
[tournament]="this.tournament"
|
||||||
}
|
[inline]="true">
|
||||||
|
</app-team-display>
|
||||||
<td class="align-middle w-sep">-</td>
|
<td class="align-middle w-sep">-</td>
|
||||||
<td class="align-middle" style="width: 30%;">
|
<td class="align-middle" style="width: 30%;">
|
||||||
@if (event.doublesEvent) {
|
<app-team-display
|
||||||
{{ match.team2.player1 | fullName }} /<br>{{ match.team2.player2 | fullName }}
|
[team]="match.team2"
|
||||||
} @else {
|
[event]="this.event"
|
||||||
{{ match.team2.player1 | fullName }}
|
[tournament]="this.tournament"
|
||||||
}
|
[inline]="true">
|
||||||
|
</app-team-display>
|
||||||
</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">
|
||||||
@@ -87,7 +103,14 @@
|
|||||||
@for (entry of round.standings.entries; track entry.position) {
|
@for (entry of round.standings.entries; track entry.position) {
|
||||||
<tr>
|
<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">
|
||||||
|
<app-team-display
|
||||||
|
[team]="entry.team"
|
||||||
|
[event]="this.event"
|
||||||
|
[tournament]="this.tournament"
|
||||||
|
[inline]="true">
|
||||||
|
</app-team-display>
|
||||||
|
</td>
|
||||||
<td class="align-middle">{{ entry.played }}</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.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.gamesWon - entry.gamesLost) / entry.played | number: '1.0-2' }}</td>
|
||||||
|
|||||||
@@ -8,13 +8,14 @@ import {ActivatedRoute, Router} from "@angular/router";
|
|||||||
import {DecimalPipe} 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 {TeamDisplayComponent} from "../team-display/team-display.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-round-overview',
|
selector: 'app-round-overview',
|
||||||
imports: [
|
imports: [
|
||||||
TeamPipe,
|
TeamPipe,
|
||||||
DecimalPipe,
|
DecimalPipe,
|
||||||
FullNamePipe
|
TeamDisplayComponent
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
TeamPipe,
|
TeamPipe,
|
||||||
|
|||||||
@@ -157,7 +157,7 @@
|
|||||||
<div class="col-md-2">Duur: {{ getDuration(activeMatch.match.startTime) | date: 'mm:ss' }}</div>
|
<div class="col-md-2">Duur: {{ getDuration(activeMatch.match.startTime) | date: 'mm:ss' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<mat-action-row>
|
<mat-action-row>
|
||||||
<button class="align-baseline" mat-button (click)="editResult(activeMatch.match, activeMatch.group, activeMatch.round)">
|
<button class="align-baseline" mat-button (click)="editResult(activeMatch.match, activeMatch.event, activeMatch.group, activeMatch.round)">
|
||||||
<mat-icon>edit</mat-icon>
|
<mat-icon>edit</mat-icon>
|
||||||
Uitslag invoeren
|
Uitslag invoeren
|
||||||
</button>
|
</button>
|
||||||
@@ -325,7 +325,7 @@
|
|||||||
Wedstrijd starten
|
Wedstrijd starten
|
||||||
</button>
|
</button>
|
||||||
} @else if (match.status == 'IN_PROGRESS') {
|
} @else if (match.status == 'IN_PROGRESS') {
|
||||||
<button mat-button (click)="editResult(match, group, round)">
|
<button mat-button (click)="editResult(match, event, group, round)">
|
||||||
<mat-icon>edit</mat-icon>
|
<mat-icon>edit</mat-icon>
|
||||||
Uitslag invoeren
|
Uitslag invoeren
|
||||||
</button>
|
</button>
|
||||||
@@ -346,7 +346,7 @@
|
|||||||
<mat-icon>more_vert</mat-icon>
|
<mat-icon>more_vert</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<mat-menu #finishedMatchMenu="matMenu">
|
<mat-menu #finishedMatchMenu="matMenu">
|
||||||
<button mat-menu-item (click)="editResult(match, group, round)">
|
<button mat-menu-item (click)="editResult(match, event, group, round)">
|
||||||
<mat-icon>edit</mat-icon>
|
<mat-icon>edit</mat-icon>
|
||||||
Uitslag bewerken
|
Uitslag bewerken
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -368,9 +368,9 @@ export class TournamentManageComponent implements OnInit, OnDestroy {
|
|||||||
matchResultDialog = inject(MatDialog);
|
matchResultDialog = inject(MatDialog);
|
||||||
courtSelectionDialog = inject(MatDialog);
|
courtSelectionDialog = inject(MatDialog);
|
||||||
|
|
||||||
editResult(match: Match, group: Group, round: Round) {
|
editResult(match: Match, event: Event, group: Group, round: Round) {
|
||||||
this.matchResultDialog.open(MatchResultComponent, {
|
this.matchResultDialog.open(MatchResultComponent, {
|
||||||
data: {match: match, group: group, round: round},
|
data: {match: match, tournament: this.tournament, event: event, group: group, round: round},
|
||||||
minWidth: '800px'
|
minWidth: '800px'
|
||||||
}).afterClosed().subscribe(result => {
|
}).afterClosed().subscribe(result => {
|
||||||
if (result != undefined) {
|
if (result != undefined) {
|
||||||
|
|||||||
Reference in New Issue
Block a user