view models

This commit is contained in:
2025-12-18 00:08:47 +01:00
parent f7a56a92ce
commit 7c449af311
56 changed files with 2594 additions and 206 deletions

View File

@@ -1,6 +1,9 @@
// Analytics dashboard view model
// Represents dashboard data for analytics
/**
* Analytics dashboard view model
* Represents dashboard data for analytics
*
* Note: No matching generated DTO available yet
*/
export class AnalyticsDashboardViewModel {
totalUsers: number;
activeUsers: number;
@@ -8,7 +11,10 @@ export class AnalyticsDashboardViewModel {
totalLeagues: number;
constructor(data: { totalUsers: number; activeUsers: number; totalRaces: number; totalLeagues: number }) {
Object.assign(this, data);
this.totalUsers = data.totalUsers;
this.activeUsers = data.activeUsers;
this.totalRaces = data.totalRaces;
this.totalLeagues = data.totalLeagues;
}
/** UI-specific: User engagement rate */