view models
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user