view models
This commit is contained in:
19
apps/website/lib/view-models/RemoveMemberViewModel.ts
Normal file
19
apps/website/lib/view-models/RemoveMemberViewModel.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { RemoveLeagueMemberOutputDTO } from '../types/generated/RemoveLeagueMemberOutputDTO';
|
||||
|
||||
/**
|
||||
* View Model for Remove Member Result
|
||||
*
|
||||
* Represents the result of removing a member from a league in a UI-ready format.
|
||||
*/
|
||||
export class RemoveMemberViewModel implements RemoveLeagueMemberOutputDTO {
|
||||
success: boolean;
|
||||
|
||||
constructor(dto: RemoveLeagueMemberOutputDTO) {
|
||||
this.success = dto.success;
|
||||
}
|
||||
|
||||
/** UI-specific: Success message */
|
||||
get successMessage(): string {
|
||||
return this.success ? 'Member removed successfully!' : 'Failed to remove member.';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user