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