view data fixes

This commit is contained in:
2026-01-23 15:30:23 +01:00
parent e22033be38
commit f8099f04bc
213 changed files with 3466 additions and 3003 deletions

View File

@@ -4,16 +4,21 @@
* Represents the total number of leagues in a UI-ready format.
*/
import { ViewModel } from "../contracts/view-models/ViewModel";
import type { LeagueStatsViewData } from "../view-data/LeagueStatsViewData";
export class LeagueStatsViewModel extends ViewModel {
totalLeagues: number;
private readonly data: LeagueStatsViewData;
constructor(dto: { totalLeagues: number }) {
this.totalLeagues = dto.totalLeagues;
constructor(data: LeagueStatsViewData) {
super();
this.data = data;
}
get totalLeagues(): number { return this.data.totalLeagues; }
/** UI-specific: Formatted total leagues display */
get formattedTotalLeagues(): string {
// Client-only formatting
return this.totalLeagues.toLocaleString();
}
}