website refactor

This commit is contained in:
2026-01-16 15:20:25 +01:00
parent 7e02fc3ea5
commit 37b1aa626c
325 changed files with 2167 additions and 2782 deletions

View File

@@ -5,21 +5,21 @@
* Penalties can be applied as a result of an upheld protest or directly by stewards.
*/
import { RacingDomainValidationError, RacingDomainInvariantError } from '../../errors/RacingDomainError';
import type { Entity } from '@core/shared/domain';
import { PenaltyId } from './PenaltyId';
import { LeagueId } from '../LeagueId';
import { RaceId } from '../RaceId';
import type { Entity } from '@core/shared/domain/Entity';
import { RacingDomainInvariantError, RacingDomainValidationError } from '../../errors/RacingDomainError';
import { AppliedAt } from '../AppliedAt';
import { DriverId } from '../DriverId';
import { IssuedAt } from '../IssuedAt';
import { LeagueId } from '../LeagueId';
import { ProtestId } from '../ProtestId';
import { RaceId } from '../RaceId';
import { StewardId } from '../StewardId';
import { PenaltyId } from './PenaltyId';
import { PenaltyNotes } from './PenaltyNotes';
import { PenaltyReason } from './PenaltyReason';
import { PenaltyStatus } from './PenaltyStatus';
import { PenaltyType, type PenaltyTypeValue } from './PenaltyType';
import { PenaltyValue } from './PenaltyValue';
import { PenaltyReason } from './PenaltyReason';
import { ProtestId } from '../ProtestId';
import { StewardId } from '../StewardId';
import { PenaltyStatus } from './PenaltyStatus';
import { IssuedAt } from '../IssuedAt';
import { AppliedAt } from '../AppliedAt';
import { PenaltyNotes } from './PenaltyNotes';
export interface PenaltyProps {
id: PenaltyId;
@@ -239,4 +239,11 @@ export class Penalty implements Entity<string> {
return 'Penalty';
}
}
}
equals(other: Entity<string>): boolean {
if (!(other instanceof Penalty)) {
return false;
}
return this.id === other.id;
}
}