view models

This commit is contained in:
2025-12-20 00:31:31 +01:00
parent 5c74837d73
commit 656ec62426
74 changed files with 4511 additions and 347 deletions

View File

@@ -12,7 +12,7 @@ export class TeamDetailsViewModel {
region?: string;
languages?: string[];
membership: { role: string; joinedAt: string; isActive: boolean } | null;
canManage: boolean;
private _canManage: boolean;
private currentUserId: string;
constructor(dto: GetTeamDetailsOutputDTO, currentUserId: string) {
@@ -27,7 +27,7 @@ export class TeamDetailsViewModel {
this.region = dto.team.region;
this.languages = dto.team.languages;
this.membership = dto.membership;
this.canManage = dto.canManage;
this._canManage = dto.canManage;
this.currentUserId = currentUserId;
}
@@ -38,7 +38,7 @@ export class TeamDetailsViewModel {
/** UI-specific: Whether can manage team */
get canManage(): boolean {
return this.canManage;
return this._canManage;
}
/** UI-specific: Whether current user is member */