Skip to content

Commit

Permalink
fix: toggles were wrongly showing
Browse files Browse the repository at this point in the history
  • Loading branch information
cskiwi committed Aug 19, 2024
1 parent 9eac8ae commit 251bdd2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@
<button mat-stroked-button [matMenuTriggerFor]="menu">Filter</button>
<mat-menu #menu="matMenu">
<form [formGroup]="this.breakdownService.filter">
<mat-slide-toggle (click)="$event.stopPropagation()" formControlName="includedIgnored">
{{ 'all.ranking.breakdown.notUsed' | translate }}:
{{
lostGamesIgnored()
| i18nPlural
: {
'=0': 'all.ranking.breakdown.lostGames.none',
'=1': 'all.ranking.breakdown.lostGames.one',
other: 'all.ranking.breakdown.lostGames.other',
}
| translate: { count: lostGamesIgnored() }
}}</mat-slide-toggle
>

<mat-slide-toggle (click)="$event.stopPropagation()" formControlName="includedUpgrade">
{{ 'all.ranking.breakdown.used-for-upgrade' | translate }}:
{{
Expand Down Expand Up @@ -79,22 +65,19 @@
}}
</mat-slide-toggle>

<mat-slide-toggle
(click)="$event.stopPropagation()"
formControlName="includeOutOfScopeWonGames"
>
{{ 'all.ranking.breakdown.outOfScopeWonGames' | translate }}:
<mat-slide-toggle (click)="$event.stopPropagation()" formControlName="includedIgnored">
{{ 'all.ranking.breakdown.notUsed' | translate }}:
{{
wonGames()
lostGamesIgnored()
| i18nPlural
: {
'=0': 'all.ranking.breakdown.outOfScope.none',
'=1': 'all.ranking.breakdown.outOfScope.one',
other: 'all.ranking.breakdown.outOfScope.other',
'=0': 'all.ranking.breakdown.lostGames.none',
'=1': 'all.ranking.breakdown.lostGames.one',
other: 'all.ranking.breakdown.lostGames.other',
}
| translate: { count: wonGames() }
}}
</mat-slide-toggle>
| translate: { count: lostGamesIgnored() }
}}</mat-slide-toggle
>
}
</form>
</mat-menu>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,17 @@ export class ListGamesComponent {
() => this.currGames().filter((x) => x.type == GameBreakdownType.LOST_IGNORED).length,
);


outOfScopeGamesUpgrade = computed(
() =>
this.currGames().filter(
(x) => x.type == GameBreakdownType.LOST_UPGRADE && !x.usedForDowngrade,
(x) => x.type == GameBreakdownType.LOST_UPGRADE && !x.usedForUpgrade,
).length,
);
outOfScopeGamesDowngrade = computed(
() =>
this.currGames().filter(
(x) => x.type == GameBreakdownType.LOST_DOWNGRADE && !x.usedForUpgrade,
(x) => x.type == GameBreakdownType.LOST_DOWNGRADE && !x.usedForDowngrade,
).length,
);

Expand Down
2 changes: 1 addition & 1 deletion libs/utils/src/lib/i18n.generated.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* DO NOT EDIT, file generated by nestjs-i18n */

/* eslint-disable */
/* prettier-ignore */
import { Path } from "nestjs-i18n";
/* prettier-ignore */
Expand Down

0 comments on commit 251bdd2

Please sign in to comment.