seed data
This commit is contained in:
@@ -5,6 +5,7 @@ export class DriverLeaderboardItemViewModel {
|
||||
name: string;
|
||||
rating: number;
|
||||
skillLevel: string;
|
||||
category?: string;
|
||||
nationality: string;
|
||||
racesCompleted: number;
|
||||
wins: number;
|
||||
@@ -21,6 +22,7 @@ export class DriverLeaderboardItemViewModel {
|
||||
this.name = dto.name;
|
||||
this.rating = dto.rating;
|
||||
this.skillLevel = dto.skillLevel;
|
||||
this.category = dto.category;
|
||||
this.nationality = dto.nationality;
|
||||
this.racesCompleted = dto.racesCompleted;
|
||||
this.wins = dto.wins;
|
||||
|
||||
@@ -11,6 +11,7 @@ export interface LeagueSummaryViewModel {
|
||||
structureSummary: string;
|
||||
scoringPatternSummary?: string;
|
||||
timingSummary: string;
|
||||
category?: string;
|
||||
scoring?: {
|
||||
gameId: string;
|
||||
gameName: string;
|
||||
|
||||
@@ -11,6 +11,7 @@ export class TeamDetailsViewModel {
|
||||
specialization: string | undefined;
|
||||
region: string | undefined;
|
||||
languages: string[] | undefined;
|
||||
category: string | undefined;
|
||||
membership: { role: string; joinedAt: string; isActive: boolean } | null;
|
||||
private _canManage: boolean;
|
||||
private currentUserId: string;
|
||||
@@ -28,11 +29,13 @@ export class TeamDetailsViewModel {
|
||||
specialization?: string;
|
||||
region?: string;
|
||||
languages?: string[];
|
||||
category?: string;
|
||||
};
|
||||
|
||||
this.specialization = teamExtras.specialization ?? undefined;
|
||||
this.region = teamExtras.region ?? undefined;
|
||||
this.languages = teamExtras.languages ?? undefined;
|
||||
this.category = teamExtras.category ?? undefined;
|
||||
this.membership = dto.membership ? {
|
||||
role: dto.membership.role,
|
||||
joinedAt: dto.membership.joinedAt,
|
||||
|
||||
@@ -8,12 +8,15 @@ export class TeamSummaryViewModel {
|
||||
description?: string;
|
||||
totalWins: number = 0;
|
||||
totalRaces: number = 0;
|
||||
performanceLevel: string = '';
|
||||
performanceLevel: 'beginner' | 'intermediate' | 'advanced' | 'pro' = 'intermediate';
|
||||
isRecruiting: boolean = false;
|
||||
specialization: string | undefined;
|
||||
specialization: 'endurance' | 'sprint' | 'mixed' | undefined;
|
||||
region: string | undefined;
|
||||
languages: string[] = [];
|
||||
leagues: string[] = [];
|
||||
logoUrl: string | undefined;
|
||||
rating: number | undefined;
|
||||
category: string | undefined;
|
||||
|
||||
private maxMembers = 10; // Assuming max members
|
||||
|
||||
@@ -23,10 +26,19 @@ export class TeamSummaryViewModel {
|
||||
this.tag = dto.tag;
|
||||
this.memberCount = dto.memberCount;
|
||||
this.description = dto.description;
|
||||
this.specialization = dto.specialization;
|
||||
this.specialization = dto.specialization as 'endurance' | 'sprint' | 'mixed' | undefined;
|
||||
this.region = dto.region;
|
||||
this.languages = dto.languages ?? [];
|
||||
this.leagues = dto.leagues;
|
||||
|
||||
// Map stats fields from DTO
|
||||
this.totalWins = dto.totalWins ?? 0;
|
||||
this.totalRaces = dto.totalRaces ?? 0;
|
||||
this.performanceLevel = (dto.performanceLevel as 'beginner' | 'intermediate' | 'advanced' | 'pro') ?? 'intermediate';
|
||||
this.logoUrl = dto.logoUrl;
|
||||
this.rating = dto.rating;
|
||||
this.category = dto.category;
|
||||
this.isRecruiting = dto.isRecruiting ?? false;
|
||||
}
|
||||
|
||||
/** UI-specific: Whether team is full */
|
||||
|
||||
Reference in New Issue
Block a user