This commit is contained in:
2025-12-17 00:33:13 +01:00
parent 8c67081953
commit f01e01e50c
186 changed files with 9242 additions and 1342 deletions

View File

@@ -1,6 +1,6 @@
import type { ChampionshipConfig } from '../types/ChampionshipConfig';
import type { ParticipantRef } from '../types/ParticipantRef';
import { ChampionshipStanding } from '../entities/ChampionshipStanding';
import { ChampionshipStanding } from '../entities/championship/ChampionshipStanding';
import type { ParticipantEventPoints } from './EventScoringService';
import { DropScoreApplier, type EventPointsEntry } from './DropScoreApplier';
@@ -52,7 +52,7 @@ export class ChampionshipAggregator {
const resultsDropped = dropResult.dropped.length;
standings.push(
new ChampionshipStanding({
ChampionshipStanding.create({
seasonId,
championshipId: championship.id,
participant,
@@ -64,7 +64,7 @@ export class ChampionshipAggregator {
);
}
standings.sort((a, b) => b.totalPoints - a.totalPoints);
standings.sort((a, b) => b.totalPoints.toNumber() - a.totalPoints.toNumber());
return standings.map((s, index) => s.withPosition(index + 1));
}