resolve todos in website and api

This commit is contained in:
2025-12-20 10:45:56 +01:00
parent 656ec62426
commit 7bbad511e2
62 changed files with 2036 additions and 611 deletions

View File

@@ -9,6 +9,8 @@ export interface ProtestDecisionData {
stewardNotes: string;
}
const DEFAULT_PROTEST_REASON = 'Protest upheld';
export class ProtestDecisionCommandModel {
decision: 'uphold' | 'dismiss' | null = null;
penaltyType: PenaltyType = 'time_penalty';
@@ -38,13 +40,17 @@ export class ProtestDecisionCommandModel {
}
toApplyPenaltyCommand(raceId: string, driverId: string, stewardId: string, protestId: string): ApplyPenaltyCommandDTO {
const reason = this.decision === 'uphold'
? DEFAULT_PROTEST_REASON
: 'Protest dismissed';
return {
raceId,
driverId,
stewardId,
type: this.penaltyType,
value: this.getPenaltyValue(),
reason: 'Protest upheld', // TODO: Make this configurable
reason,
protestId,
notes: this.stewardNotes,
};