refactor page to use services

This commit is contained in:
2025-12-18 15:58:09 +01:00
parent f54fa5de5b
commit fc386db06a
45 changed files with 2254 additions and 1292 deletions

View File

@@ -0,0 +1,21 @@
import type { DriverDTO } from '../types/DriverDTO';
/**
* View Model for driver summary with rating and rank
* Transform from DTO to ViewModel with UI fields
*/
export class DriverSummaryViewModel {
driver: DriverDTO;
rating: number | null;
rank: number | null;
constructor(dto: {
driver: DriverDTO;
rating?: number | null;
rank?: number | null;
}) {
this.driver = dto.driver;
this.rating = dto.rating ?? null;
this.rank = dto.rank ?? null;
}
}