Skip to content

Commit

Permalink
Fixed deleting undraw does not show names on warning message.
Browse files Browse the repository at this point in the history
  • Loading branch information
softwaremagico committed May 11, 2024
1 parent aef2f80 commit 4b67bf3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ export class ConfirmationDialogComponent implements OnInit {

}

acceptAction() {
acceptAction(): void {
this.dialogRef.close(true);
}

cancelDialog() {
cancelDialog(): void {
this.dialogRef.close(false);
}

ngOnInit(): void {
this.message = "";
this.translateService.get(this.messageTag, this.parameters).subscribe((res: string) => {
this.translateService.get(this.messageTag, this.parameters).subscribe((res: string): void => {
this.message += res;
});
}
Expand Down
14 changes: 10 additions & 4 deletions frontend/src/app/views/fight-list/fight-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,16 @@ export class FightListComponent extends RbacBasedComponent implements OnInit, On
disableClose: false
});
dialogRef.componentInstance.messageTag = "deleteFightWarning"
dialogRef.componentInstance.parameters = {
team1: !this.swappedTeams ? (this.selectedFight?.team1.name) : (this.selectedFight?.team2.name),
team2: !this.swappedTeams ? (this.selectedFight?.team2.name) : (this.selectedFight?.team1.name),
if (this.selectedFight) {
dialogRef.componentInstance.parameters = {
team1: !this.swappedTeams ? (this.selectedFight?.team1.name) : (this.selectedFight?.team2.name),
team2: !this.swappedTeams ? (this.selectedFight?.team2.name) : (this.selectedFight?.team1.name),
}
} else if (this.selectedDuel) {
dialogRef.componentInstance.parameters = {
team1: !this.swappedTeams ? (this.selectedDuel?.competitor1?.lastname) : (this.selectedDuel?.competitor2?.lastname),
team2: !this.swappedTeams ? (this.selectedDuel?.competitor2?.lastname) : (this.selectedDuel?.competitor1?.lastname)
}
}

dialogRef.afterClosed().subscribe(result => {
Expand Down Expand Up @@ -698,7 +705,6 @@ export class FightListComponent extends RbacBasedComponent implements OnInit, On
}

showClassification(): void {
debugger
if ((this.tournament?.teamSize && this.tournament?.teamSize > 1) ||
(this.tournament && (this.tournament.type === TournamentType.KING_OF_THE_MOUNTAIN || this.tournament.type === TournamentType.CHAMPIONSHIP))) {
this.showTeamsClassification(true);
Expand Down

0 comments on commit 4b67bf3

Please sign in to comment.