remove core from pages

This commit is contained in:
2025-12-18 19:14:50 +01:00
parent 9814d9682c
commit 4a3087ae35
35 changed files with 552 additions and 354 deletions

View File

@@ -0,0 +1,34 @@
import { RaceDTO } from '../types/generated/RaceDTO';
export class RaceViewModel {
constructor(private readonly dto: RaceDTO, private readonly _status?: string, private readonly _registeredCount?: number, private readonly _strengthOfField?: number) {}
get id(): string {
return this.dto.id;
}
get name(): string {
return this.dto.name;
}
get date(): string {
return this.dto.date;
}
get status(): string | undefined {
return this._status;
}
get registeredCount(): number | undefined {
return this._registeredCount;
}
get strengthOfField(): number | undefined {
return this._strengthOfField;
}
/** UI-specific: Formatted date */
get formattedDate(): string {
return new Date(this.date).toLocaleDateString();
}
}