Files
gridpilot.gg/apps/website/lib/view-models/UpdateTeamViewModel.ts
2026-01-23 15:30:23 +01:00

22 lines
581 B
TypeScript

/**
* View Model for Update Team Result
*
* Represents the result of updating a team in a UI-ready format.
*/
import { ViewModel } from "../contracts/view-models/ViewModel";
import type { UpdateTeamViewData } from "../view-data/UpdateTeamViewData";
export class UpdateTeamViewModel extends ViewModel {
success: boolean;
constructor(data: UpdateTeamViewData) {
super();
this.success = data.success;
}
/** UI-specific: Success message */
get successMessage(): string {
return this.success ? 'Team updated successfully!' : 'Failed to update team.';
}
}