Various improvements

This commit is contained in:
2025-08-25 23:38:30 +02:00
parent 5a5c134002
commit d6de1c43fb
6 changed files with 81 additions and 60 deletions

View File

@@ -1,4 +1,4 @@
import {Component, OnInit} from '@angular/core';
import {Component, Input, OnInit} from '@angular/core';
import {CurrencyPipe} from "@angular/common";
import {MatSlideToggle, MatSlideToggleChange} from "@angular/material/slide-toggle";
import {TournamentService} from "../../service/tournament.service";
@@ -19,7 +19,7 @@ import {MatSnackBar} from "@angular/material/snack-bar";
})
export class TournamentPlayersComponent implements OnInit {
tournament: Tournament;
@Input() tournament: Tournament;
constructor(
private tournamentService: TournamentService,
@@ -29,10 +29,11 @@ export class TournamentPlayersComponent implements OnInit {
) {}
ngOnInit() {
const id = this.route.snapshot.paramMap.get('id');
this.tournamentService.getById(Number(id)).subscribe(data => {
this.tournament = data;
});
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) {