view data fixes
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
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";
|
||||
import type { SponsorDashboardViewData } from "../view-data/SponsorDashboardViewData";
|
||||
|
||||
export class SponsorDashboardViewModel extends ViewModel {
|
||||
sponsorId: string;
|
||||
sponsorName: string;
|
||||
|
||||
constructor(dto: SponsorDashboardDTO) {
|
||||
this.sponsorId = dto.sponsorId;
|
||||
this.sponsorName = dto.sponsorName;
|
||||
constructor(data: SponsorDashboardViewData) {
|
||||
super();
|
||||
this.sponsorId = data.sponsorId;
|
||||
this.sponsorName = data.sponsorName;
|
||||
}
|
||||
|
||||
/** UI-specific: Welcome message */
|
||||
|
||||
Reference in New Issue
Block a user