view data fixes

This commit is contained in:
2026-01-23 15:30:23 +01:00
parent e22033be38
commit f8099f04bc
213 changed files with 3466 additions and 3003 deletions

View File

@@ -1,16 +1,15 @@
import { RaceWithSOFDTO } from '@/lib/types/generated/RaceWithSOFDTO';
import { ViewModel } from "../contracts/view-models/ViewModel";
import type { RaceWithSOFViewData } from "../view-data/RaceWithSOFViewData";
export class RaceWithSOFViewModel extends ViewModel {
id: string;
track: string;
strengthOfField: number | null;
private readonly data: RaceWithSOFViewData;
constructor(dto: RaceWithSOFDTO) {
constructor(data: RaceWithSOFViewData) {
super();
this.id = dto.id;
this.track = dto.track;
this.strengthOfField = 'strengthOfField' in dto ? dto.strengthOfField ?? null : null;
this.data = data;
}
get id(): string { return this.data.id; }
get track(): string { return this.data.track; }
get strengthOfField(): number | null { return this.data.strengthOfField; }
}