fix issues
This commit is contained in:
@@ -23,10 +23,16 @@ export class TeamDetailsViewModel {
|
||||
this.ownerId = dto.team.ownerId;
|
||||
this.leagues = dto.team.leagues;
|
||||
this.createdAt = dto.team.createdAt;
|
||||
// These properties don't exist in the current TeamDTO but may be added later
|
||||
this.specialization = undefined;
|
||||
this.region = undefined;
|
||||
this.languages = undefined;
|
||||
|
||||
const teamExtras = dto.team as typeof dto.team & {
|
||||
specialization?: string;
|
||||
region?: string;
|
||||
languages?: string[];
|
||||
};
|
||||
|
||||
this.specialization = teamExtras.specialization ?? undefined;
|
||||
this.region = teamExtras.region ?? undefined;
|
||||
this.languages = teamExtras.languages ?? undefined;
|
||||
this.membership = dto.membership ? {
|
||||
role: dto.membership.role,
|
||||
joinedAt: dto.membership.joinedAt,
|
||||
|
||||
Reference in New Issue
Block a user