website refactor

This commit is contained in:
2026-01-16 18:21:06 +01:00
parent 2f53727702
commit 095885544b
146 changed files with 970 additions and 524 deletions

View File

@@ -1,6 +1,10 @@
import { Result } from '@core/shared/domain/Result';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
import type { RaceStatusValue } from '../../domain/entities/Race';
import type { Race, RaceStatusValue } from '../../domain/entities/Race';
import { RaceRepository } from '../../domain/repositories/RaceRepository';
import { LeagueRepository } from '../../domain/repositories/LeagueRepository';
import type { Logger } from '@core/shared/domain/Logger';
import type { League } from '../../domain/entities/League';
export type GetAllRacesPageDataInput = {};
@@ -46,12 +50,12 @@ export class GetAllRacesPageDataUseCase {
]);
this.logger.info(`Found ${allRaces.length} races and ${allLeagues.length} leagues.`);
const leagueMap = new Map(allLeagues.map(league => [league.id.toString(), league.name.toString()]));
const leagueMap = new Map(allLeagues.map((league: League) => [league.id.toString(), league.name.toString()]));
const races: GetAllRacesPageRaceItem[] = allRaces
.slice()
.sort((a, b) => b.scheduledAt.getTime() - a.scheduledAt.getTime())
.map(race => ({
.sort((a: Race, b: Race) => b.scheduledAt.getTime() - a.scheduledAt.getTime())
.map((race: Race) => ({
id: race.id,
track: race.track,
car: race.car,