refactor page to use services
This commit is contained in:
@@ -13,15 +13,31 @@ export class TeamSummaryViewModel {
|
||||
logoUrl?: string;
|
||||
memberCount: number;
|
||||
rating: number;
|
||||
description?: string;
|
||||
totalWins: number = 0;
|
||||
totalRaces: number = 0;
|
||||
performanceLevel: string = '';
|
||||
isRecruiting: boolean = false;
|
||||
specialization?: string;
|
||||
region?: string;
|
||||
languages: string[] = [];
|
||||
|
||||
private maxMembers = 10; // Assuming max members
|
||||
|
||||
constructor(dto: TeamSummaryDTO) {
|
||||
constructor(dto: TeamSummaryDTO & { description?: string; totalWins?: number; totalRaces?: number; performanceLevel?: string; isRecruiting?: boolean; specialization?: string; region?: string; languages?: string[] }) {
|
||||
this.id = dto.id;
|
||||
this.name = dto.name;
|
||||
if (dto.logoUrl !== undefined) this.logoUrl = dto.logoUrl;
|
||||
this.memberCount = dto.memberCount;
|
||||
this.rating = dto.rating;
|
||||
this.description = dto.description;
|
||||
this.totalWins = dto.totalWins ?? 0;
|
||||
this.totalRaces = dto.totalRaces ?? 0;
|
||||
this.performanceLevel = dto.performanceLevel ?? '';
|
||||
this.isRecruiting = dto.isRecruiting ?? false;
|
||||
this.specialization = dto.specialization;
|
||||
this.region = dto.region;
|
||||
this.languages = dto.languages ?? [];
|
||||
}
|
||||
|
||||
/** UI-specific: Whether team is full */
|
||||
|
||||
Reference in New Issue
Block a user