website refactor
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { ChampionshipStanding } from '../entities/championship/ChampionshipStanding';
|
||||
import type { ChampionshipConfig } from '../types/ChampionshipConfig';
|
||||
import type { ParticipantRef } from '../types/ParticipantRef';
|
||||
import { ChampionshipStanding } from '../entities/championship/ChampionshipStanding';
|
||||
import type { ParticipantEventPoints } from './EventScoringService';
|
||||
import { DropScoreApplier, type EventPointsEntry } from './DropScoreApplier';
|
||||
import type { ParticipantEventPoints } from './EventScoringService';
|
||||
|
||||
export class ChampionshipAggregator {
|
||||
constructor(private readonly dropScoreApplier: DropScoreApplier) {}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { DropScoreApplier } from '@core/racing/domain/services/DropScoreApplier';
|
||||
import type { EventPointsEntry } from '@core/racing/domain/services/DropScoreApplier';
|
||||
import { DropScoreApplier } from '@core/racing/domain/services/DropScoreApplier';
|
||||
import type { DropScorePolicy } from '@core/racing/domain/types/DropScorePolicy';
|
||||
|
||||
describe('DropScoreApplier', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { DropScorePolicy } from '../types/DropScorePolicy';
|
||||
import type { DomainCalculationService } from '@core/shared/domain/Service';
|
||||
import type { DropScorePolicy } from '../types/DropScorePolicy';
|
||||
|
||||
export interface EventPointsEntry {
|
||||
eventId: string;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import type { Penalty } from '@core/racing/domain/entities/Penalty';
|
||||
import { Result } from '@core/racing/domain/entities/result/Result';
|
||||
import { EventScoringService } from '@core/racing/domain/services/EventScoringService';
|
||||
import type { BonusRule } from '@core/racing/domain/types/BonusRule';
|
||||
import { Result } from '@core/racing/domain/entities/result/Result';
|
||||
import type { Penalty } from '@core/racing/domain/entities/Penalty';
|
||||
import type { ChampionshipConfig } from '@core/racing/domain/types/ChampionshipConfig';
|
||||
import type { SessionType } from '@core/racing/domain/types/SessionType';
|
||||
import { PointsTable } from '@core/racing/domain/value-objects/PointsTable';
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import type { ChampionshipConfig } from '../types/ChampionshipConfig';
|
||||
import type { SessionType } from '../types/SessionType';
|
||||
import type { ParticipantRef } from '../types/ParticipantRef';
|
||||
import type { Result } from '../entities/result/Result';
|
||||
import type { Penalty } from '../entities/Penalty';
|
||||
import type { Result } from '../entities/result/Result';
|
||||
import type { BonusRule } from '../types/BonusRule';
|
||||
import type { ChampionshipConfig } from '../types/ChampionshipConfig';
|
||||
import type { ChampionshipType } from '../types/ChampionshipType';
|
||||
import type { ParticipantRef } from '../types/ParticipantRef';
|
||||
import type { SessionType } from '../types/SessionType';
|
||||
|
||||
import type { PointsTable } from '../value-objects/PointsTable';
|
||||
import type { DomainCalculationService } from '@core/shared/domain/Service';
|
||||
import type { PointsTable } from '../value-objects/PointsTable';
|
||||
|
||||
export interface ParticipantEventPoints {
|
||||
participant: ParticipantRef;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { calculateRaceDates, getNextWeekday, type ScheduleConfig } from '@core/racing/domain/services/ScheduleCalculator';
|
||||
import type { Weekday } from '@core/racing/domain/types/Weekday';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
describe('ScheduleCalculator', () => {
|
||||
describe('calculateRaceDates', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import {
|
||||
applyScoringPresetToTimings,
|
||||
type ScoringPresetTimings,
|
||||
applyScoringPresetToTimings,
|
||||
type ScoringPresetTimings,
|
||||
} from '@core/racing/domain/services/ScoringPresetTimingService';
|
||||
|
||||
describe('ScoringPresetTimingService', () => {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { SeasonSchedule } from '../value-objects/SeasonSchedule';
|
||||
import { ScheduledRaceSlot } from '../value-objects/ScheduledRaceSlot';
|
||||
import type { RecurrenceStrategy } from '../value-objects/RecurrenceStrategy';
|
||||
import { ScheduledRaceSlot } from '../value-objects/ScheduledRaceSlot';
|
||||
import { SeasonSchedule } from '../value-objects/SeasonSchedule';
|
||||
|
||||
import { RaceTimeOfDay } from '../value-objects/RaceTimeOfDay';
|
||||
import type { Weekday } from '../types/Weekday';
|
||||
import { weekdayToIndex } from '../types/Weekday';
|
||||
import type { DomainCalculationService } from '@core/shared/domain/Service';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { Weekday } from '../types/Weekday';
|
||||
import { weekdayToIndex } from '../types/Weekday';
|
||||
import { RaceTimeOfDay } from '../value-objects/RaceTimeOfDay';
|
||||
|
||||
function cloneDate(date: Date): Date {
|
||||
return new Date(date.getTime());
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TeamDrivingRatingCalculator, TeamDrivingRaceResult, TeamDrivingQualifyingResult, TeamDrivingOvertakeStats } from './TeamDrivingRatingCalculator';
|
||||
import { TeamDrivingOvertakeStats, TeamDrivingQualifyingResult, TeamDrivingRaceResult, TeamDrivingRatingCalculator } from './TeamDrivingRatingCalculator';
|
||||
|
||||
describe('TeamDrivingRatingCalculator', () => {
|
||||
describe('calculateFromRaceFinish', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { TeamRatingEvent } from '../entities/TeamRatingEvent';
|
||||
import { TeamRatingEventId } from '../value-objects/TeamRatingEventId';
|
||||
import { TeamRatingDimensionKey } from '../value-objects/TeamRatingDimensionKey';
|
||||
import { TeamRatingDelta } from '../value-objects/TeamRatingDelta';
|
||||
import { TeamDrivingReasonCode } from '../value-objects/TeamDrivingReasonCode';
|
||||
import { TeamRatingDelta } from '../value-objects/TeamRatingDelta';
|
||||
import { TeamRatingDimensionKey } from '../value-objects/TeamRatingDimensionKey';
|
||||
import { TeamRatingEventId } from '../value-objects/TeamRatingEventId';
|
||||
|
||||
export interface TeamDrivingRaceResult {
|
||||
teamId: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TeamDrivingRatingEventFactory, TeamDrivingRaceFactsDto, TeamDrivingQualifyingFactsDto, TeamDrivingOvertakeFactsDto } from './TeamDrivingRatingEventFactory';
|
||||
import { TeamDrivingOvertakeFactsDto, TeamDrivingQualifyingFactsDto, TeamDrivingRaceFactsDto, TeamDrivingRatingEventFactory } from './TeamDrivingRatingEventFactory';
|
||||
|
||||
describe('TeamDrivingRatingEventFactory', () => {
|
||||
describe('createFromRaceFinish', () => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { TeamRatingEvent } from '../entities/TeamRatingEvent';
|
||||
import { TeamRatingEventId } from '../value-objects/TeamRatingEventId';
|
||||
import { TeamRatingDimensionKey } from '../value-objects/TeamRatingDimensionKey';
|
||||
import { TeamRatingDelta } from '../value-objects/TeamRatingDelta';
|
||||
import { TeamDrivingReasonCode } from '../value-objects/TeamDrivingReasonCode';
|
||||
import { TeamDrivingRatingCalculator, TeamDrivingRaceResult, TeamDrivingQualifyingResult, TeamDrivingOvertakeStats } from './TeamDrivingRatingCalculator';
|
||||
import { TeamRatingDelta } from '../value-objects/TeamRatingDelta';
|
||||
import { TeamRatingDimensionKey } from '../value-objects/TeamRatingDimensionKey';
|
||||
import { TeamRatingEventId } from '../value-objects/TeamRatingEventId';
|
||||
import { TeamDrivingOvertakeStats, TeamDrivingQualifyingResult, TeamDrivingRaceResult, TeamDrivingRatingCalculator } from './TeamDrivingRatingCalculator';
|
||||
|
||||
export interface TeamDrivingRaceFactsDto {
|
||||
raceId: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TeamRatingEventFactory, TeamRaceFactsDto } from './TeamRatingEventFactory';
|
||||
import { TeamRaceFactsDto, TeamRatingEventFactory } from './TeamRatingEventFactory';
|
||||
|
||||
describe('TeamRatingEventFactory', () => {
|
||||
describe('createFromRaceFinish', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { TeamRatingEvent } from '../entities/TeamRatingEvent';
|
||||
import { TeamRatingEventId } from '../value-objects/TeamRatingEventId';
|
||||
import { TeamRatingDimensionKey } from '../value-objects/TeamRatingDimensionKey';
|
||||
import { TeamRatingDelta } from '../value-objects/TeamRatingDelta';
|
||||
import { TeamRatingDimensionKey } from '../value-objects/TeamRatingDimensionKey';
|
||||
import { TeamRatingEventId } from '../value-objects/TeamRatingEventId';
|
||||
|
||||
export interface TeamRaceFactsDto {
|
||||
raceId: string;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { TeamRatingSnapshotCalculator } from './TeamRatingSnapshotCalculator';
|
||||
import { TeamRatingEvent } from '../entities/TeamRatingEvent';
|
||||
import { TeamRatingEventId } from '../value-objects/TeamRatingEventId';
|
||||
import { TeamRatingDimensionKey } from '../value-objects/TeamRatingDimensionKey';
|
||||
import { TeamRatingDelta } from '../value-objects/TeamRatingDelta';
|
||||
import { TeamRatingDimensionKey } from '../value-objects/TeamRatingDimensionKey';
|
||||
import { TeamRatingEventId } from '../value-objects/TeamRatingEventId';
|
||||
import { TeamRatingValue } from '../value-objects/TeamRatingValue';
|
||||
import { TeamRatingSnapshotCalculator } from './TeamRatingSnapshotCalculator';
|
||||
|
||||
describe('TeamRatingSnapshotCalculator', () => {
|
||||
describe('calculate', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TeamRatingEvent } from '../entities/TeamRatingEvent';
|
||||
import { TeamRatingValue } from '../value-objects/TeamRatingValue';
|
||||
import { TeamRatingDimensionKey } from '../value-objects/TeamRatingDimensionKey';
|
||||
import { TeamRatingValue } from '../value-objects/TeamRatingValue';
|
||||
|
||||
export interface TeamRatingSnapshot {
|
||||
teamId: string;
|
||||
|
||||
Reference in New Issue
Block a user