view data fixes
Some checks failed
Contract Testing / contract-tests (pull_request) Failing after 5m42s
Contract Testing / contract-snapshot (pull_request) Has been skipped

This commit is contained in:
2026-01-22 23:40:38 +01:00
parent 1288a9dc30
commit 18133aef4c
111 changed files with 841 additions and 324 deletions

View File

@@ -0,0 +1,55 @@
/**
* Race Stewarding View Data
*
* ViewData for the race stewarding page template.
* JSON-serializable, template-ready data structure.
*/
import { ViewData } from "../contracts/view-data/ViewData";
export interface Protest {
id: string;
protestingDriverId: string;
accusedDriverId: string;
incident: {
lap: number;
description: string;
};
filedAt: string;
status: string;
proofVideoUrl?: string;
decisionNotes?: string;
}
export interface Penalty {
id: string;
driverId: string;
type: string;
value: number;
reason: string;
notes?: string;
}
export interface Driver {
id: string;
name: string;
}
export interface RaceStewardingViewData extends ViewData {
race?: {
id: string;
track: string;
scheduledAt: string;
} | null;
league?: {
id: string;
} | null;
pendingProtests: Protest[];
resolvedProtests: Protest[];
penalties: Penalty[];
driverMap: Record<string, Driver>;
pendingCount: number;
resolvedCount: number;
penaltiesCount: number;
}