Files
gridpilot.gg/apps/website/lib/view-models/SponsorDashboardViewModel.ts
Marc Mintel d97f50ed72
Some checks failed
Contract Testing / contract-tests (pull_request) Failing after 6m4s
Contract Testing / contract-snapshot (pull_request) Has been skipped
view data fixes
2026-01-23 11:59:49 +01:00

24 lines
620 B
TypeScript

import { SponsorDashboardDTO } from '@/lib/types/generated/SponsorDashboardDTO';
/**
* Sponsor Dashboard View Model
*
* Represents dashboard data for a sponsor with UI-specific transformations.
*/
import { ViewModel } from "../contracts/view-models/ViewModel";
export class SponsorDashboardViewModel extends ViewModel {
sponsorId: string;
sponsorName: string;
constructor(dto: SponsorDashboardDTO) {
this.sponsorId = dto.sponsorId;
this.sponsorName = dto.sponsorName;
}
/** UI-specific: Welcome message */
get welcomeMessage(): string {
return `Welcome back, ${this.sponsorName}!`;
}
}