website refactor
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user