website refactor

This commit is contained in:
2026-01-21 17:50:02 +01:00
parent 4b54c3603b
commit 02987f60c8
29 changed files with 1673 additions and 35 deletions

View File

@@ -20,7 +20,8 @@ export class LeagueStandingsViewDataBuilder {
static build(
standingsDto: LeagueStandingsApiDto,
membershipsDto: LeagueMembershipsApiDto,
leagueId: string
leagueId: string,
isTeamChampionship: boolean = false
): LeagueStandingsViewData {
const standings = standingsDto.standings || [];
const members = membershipsDto.members || [];
@@ -35,6 +36,12 @@ export class LeagueStandingsViewDataBuilder {
avgFinish: null, // Not in DTO
penaltyPoints: 0, // Not in DTO
bonusPoints: 0, // Not in DTO
// New fields from Phase 3
positionChange: standing.positionChange || 0,
lastRacePoints: standing.lastRacePoints || 0,
droppedRaceIds: standing.droppedRaceIds || [],
wins: standing.wins || 0,
podiums: standing.podiums || 0,
}));
// Extract unique drivers from standings
@@ -70,6 +77,7 @@ export class LeagueStandingsViewDataBuilder {
leagueId,
currentDriverId: null, // Would need to get from auth
isAdmin: false, // Would need to check permissions
isTeamChampionship: isTeamChampionship,
};
}
}