This commit is contained in:
2025-12-16 15:42:38 +01:00
parent 29410708c8
commit 362894d1a5
147 changed files with 780 additions and 375 deletions

View File

@@ -0,0 +1,17 @@
import { IGetAllRacesPresenter, GetAllRacesResultDTO, AllRacesPageViewModel } from '@core/racing/application/presenters/IGetAllRacesPresenter';
export class GetAllRacesPresenter implements IGetAllRacesPresenter {
private result: AllRacesPageViewModel | null = null;
reset() {
this.result = null;
}
present(dto: GetAllRacesResultDTO) {
this.result = dto;
}
getViewModel(): AllRacesPageViewModel | null {
return this.result;
}
}

View File

@@ -0,0 +1,20 @@
import { IGetTotalRacesPresenter, GetTotalRacesResultDTO } from '@core/racing/application/presenters/IGetTotalRacesPresenter';
import { RaceStatsDto } from '../dto/RaceDto';
export class GetTotalRacesPresenter implements IGetTotalRacesPresenter {
private result: RaceStatsDto | null = null;
reset() {
this.result = null;
}
present(dto: GetTotalRacesResultDTO) {
this.result = {
totalRaces: dto.totalRaces,
};
}
getViewModel(): RaceStatsDto | null {
return this.result;
}
}

View File

@@ -0,0 +1,17 @@
import { IImportRaceResultsApiPresenter, ImportRaceResultsApiResultDTO, ImportRaceResultsSummaryViewModel } from '@core/racing/application/presenters/IImportRaceResultsApiPresenter';
export class ImportRaceResultsApiPresenter implements IImportRaceResultsApiPresenter {
private result: ImportRaceResultsSummaryViewModel | null = null;
reset() {
this.result = null;
}
present(dto: ImportRaceResultsApiResultDTO) {
this.result = dto;
}
getViewModel(): ImportRaceResultsSummaryViewModel | null {
return this.result;
}
}