view data fixes
Some checks failed
Contract Testing / contract-tests (pull_request) Failing after 6m4s
Contract Testing / contract-snapshot (pull_request) Has been skipped

This commit is contained in:
2026-01-23 11:59:49 +01:00
parent ae58839eb2
commit d97f50ed72
191 changed files with 2889 additions and 1019 deletions

View File

@@ -1,20 +1,25 @@
/**
* Analytics dashboard view model
* Represents dashboard data for analytics
*
* Note: No matching generated DTO available yet
* View model for analytics dashboard data.
*
* Accepts AnalyticsDashboardInputViewData as input and produces UI-ready data.
*/
export class AnalyticsDashboardViewModel {
totalUsers: number;
activeUsers: number;
totalRaces: number;
totalLeagues: number;
import { AnalyticsDashboardInputViewData } from "../view-data/AnalyticsDashboardInputViewData";
import { ViewModel } from "../contracts/view-models/ViewModel";
constructor(data: { totalUsers: number; activeUsers: number; totalRaces: number; totalLeagues: number }) {
this.totalUsers = data.totalUsers;
this.activeUsers = data.activeUsers;
this.totalRaces = data.totalRaces;
this.totalLeagues = data.totalLeagues;
export class AnalyticsDashboardViewModel extends ViewModel {
readonly totalUsers: number;
readonly activeUsers: number;
readonly totalRaces: number;
readonly totalLeagues: number;
constructor(viewData: AnalyticsDashboardInputViewData) {
super();
this.totalUsers = viewData.totalUsers;
this.activeUsers = viewData.activeUsers;
this.totalRaces = viewData.totalRaces;
this.totalLeagues = viewData.totalLeagues;
}
/** UI-specific: User engagement rate */