website cleanup
This commit is contained in:
@@ -106,18 +106,22 @@ export class LeagueDetailPageViewModel {
|
||||
this.name = league.name;
|
||||
this.description = league.description ?? '';
|
||||
this.ownerId = league.ownerId;
|
||||
this.createdAt = ''; // Not provided by API
|
||||
this.createdAt = league.createdAt;
|
||||
this.settings = {
|
||||
maxDrivers: league.maxMembers,
|
||||
maxDrivers: league.settings?.maxDrivers,
|
||||
};
|
||||
this.socialLinks = {
|
||||
discordUrl: league.discordUrl,
|
||||
youtubeUrl: league.youtubeUrl,
|
||||
websiteUrl: league.websiteUrl,
|
||||
};
|
||||
this.socialLinks = undefined;
|
||||
|
||||
this.owner = owner;
|
||||
this.scoringConfig = scoringConfig;
|
||||
this.drivers = drivers;
|
||||
this.memberships = memberships.memberships.map(m => ({
|
||||
this.memberships = memberships.members.map(m => ({
|
||||
driverId: m.driverId,
|
||||
role: m.role,
|
||||
role: m.role as 'owner' | 'admin' | 'steward' | 'member',
|
||||
status: 'active',
|
||||
joinedAt: m.joinedAt,
|
||||
}));
|
||||
@@ -125,8 +129,9 @@ export class LeagueDetailPageViewModel {
|
||||
this.allRaces = allRaces;
|
||||
this.runningRaces = allRaces.filter(r => r.status === 'running');
|
||||
|
||||
this.averageSOF = leagueStats.averageSOF ?? null;
|
||||
this.completedRacesCount = leagueStats.completedRaces ?? 0;
|
||||
// Calculate SOF from available data
|
||||
this.averageSOF = leagueStats.averageRating ?? null;
|
||||
this.completedRacesCount = leagueStats.totalRaces ?? 0;
|
||||
|
||||
this.sponsors = sponsors;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user