{{ 'level' | translate }} {{ group.level + 1 }}
+ class="level-name">{{'level' | translate}} {{group.level + 1}}
0"
[ngClass]="{'group-name-hidden': groups.length < 2 || filteredFights.get(group.id!)?.length == 0}"
- class="group-name">{{ 'group' | translate }} {{ group.index + 1 }}
+ class="group-name">{{'group' | translate}} {{group.index + 1}}
0"
[ngClass]="{'fights-of-group': groups.length > 1 && filteredFights.get(group.id!)?.length! > 0}">
group.fights.indexOf(fight) >= 0)!;
-
selectDuel(duel: Duel): void {
this.selectedDuel = duel;
this.duelChangedService.isDuelUpdated.next(duel);
if (duel) {
- this.selectedGroup = this.groups.find((group: Group): boolean => group.unties.indexOf(duel) >= 0)!;
if (duel.duration) {
this.timeChangedService.isElapsedTimeChanged.next(duel.duration);
} else {
this.timeChangedService.isElapsedTimeChanged.next(0);
}
+ }
+ if (duel) {
if (duel.totalDuration) {
this.timeChangedService.isTotalTimeChanged.next(duel.totalDuration);
} else {
@@ -747,8 +746,8 @@ export class FightListComponent extends RbacBasedComponent implements OnInit, On
}
areAllDuelsOver(): boolean {
- const fights: Fight[] | undefined = this.selectedGroup ? this.filteredFights.get(this.selectedGroup!.id!) : this.getFights();
- const unties: Duel[] | undefined = this.selectedGroup ? this.filteredUnties.get(this.selectedGroup!.id!) : this.getUnties();
+ const fights: Fight[] = this.getFights();
+ const unties: Duel[] = this.getUnties();
if (fights) {
for (const fight of fights) {
for (const duel of fight.duels) {
@@ -757,11 +756,9 @@ export class FightListComponent extends RbacBasedComponent implements OnInit, On
}
}
}
- if (unties) {
- for (const duel of unties) {
- if (!duel.finished) {
- return false;
- }
+ for (const duel of unties) {
+ if (!duel.finished) {
+ return false;
}
}
}