Fixed authguard

This commit is contained in:
2025-09-30 22:59:13 +02:00
parent cdf27f1948
commit f2ee2b467d
6 changed files with 49 additions and 39 deletions

View File

@@ -124,7 +124,7 @@
</ng-template>
@if (this.activeMatches().length > 0) {
<h6 class="mt-3">Actieve wedstrijden</h6>
<h6 class="mt-3"></h6>
@for (activeMatch of this.activeMatches(); track activeMatch.match.id) {
<mat-expansion-panel>

View File

@@ -34,25 +34,15 @@ import {MatTab, MatTabGroup, MatTabLabel} from "@angular/material/tabs";
standalone: true,
styleUrl: './tournament-players.component.scss'
})
export class TournamentPlayersComponent implements OnInit {
export class TournamentPlayersComponent {
@Input() tournament: Tournament;
constructor(
private tournamentService: TournamentService,
private _snackBar: MatSnackBar,
private route: ActivatedRoute,
private router: Router,
) {}
ngOnInit() {
console.log('Tournament received from parent:', this.tournament);
// const id = this.route.snapshot.paramMap.get('id');
// this.tournamentService.getById(Number(id)).subscribe(data => {
// this.tournament = data;
// });
}
playerPaid($event: MatSlideToggleChange, playerId: number) {
this.tournamentService.playerPaid(this.tournament.id, playerId, $event.checked).subscribe(() => {
this._snackBar.open('Opgeslagen.');