website cleanup
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import type { GetTeamDetailsOutputDTO } from '@/lib/types/generated/GetTeamDetailsOutputDTO';
|
||||
|
||||
export class TeamDetailsViewModel {
|
||||
id: string;
|
||||
name: string;
|
||||
tag: string;
|
||||
id!: string;
|
||||
name!: string;
|
||||
tag!: string;
|
||||
description?: string;
|
||||
ownerId: string;
|
||||
leagues: string[];
|
||||
ownerId!: string;
|
||||
leagues!: string[];
|
||||
createdAt?: string;
|
||||
specialization?: string;
|
||||
region?: string;
|
||||
@@ -23,10 +23,15 @@ export class TeamDetailsViewModel {
|
||||
this.ownerId = dto.team.ownerId;
|
||||
this.leagues = dto.team.leagues;
|
||||
this.createdAt = dto.team.createdAt;
|
||||
this.specialization = dto.team.specialization;
|
||||
this.region = dto.team.region;
|
||||
this.languages = dto.team.languages;
|
||||
this.membership = dto.membership;
|
||||
// These properties don't exist in the current TeamDTO but may be added later
|
||||
this.specialization = undefined;
|
||||
this.region = undefined;
|
||||
this.languages = undefined;
|
||||
this.membership = dto.membership ? {
|
||||
role: dto.membership.role,
|
||||
joinedAt: dto.membership.joinedAt,
|
||||
isActive: dto.membership.isActive
|
||||
} : null;
|
||||
this._canManage = dto.canManage;
|
||||
this.currentUserId = currentUserId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user