view models
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user