website cleanup

This commit is contained in:
2025-12-24 14:01:52 +01:00
parent a7aee42409
commit 9b683a59d3
65 changed files with 880 additions and 745 deletions

View File

@@ -7,6 +7,7 @@ import { GetDriverOutputDTO } from '../types/generated/GetDriverOutputDTO';
import { RaceDTO } from '../types/generated/RaceDTO';
import { LeagueScoringConfigDTO } from '../types/LeagueScoringConfigDTO';
import { RaceViewModel } from './RaceViewModel';
import { DriverViewModel } from './DriverViewModel';
// Sponsor info type
export interface SponsorInfo {
@@ -20,7 +21,7 @@ export interface SponsorInfo {
// Driver summary for management section
export interface DriverSummary {
driver: GetDriverOutputDTO;
driver: DriverViewModel;
rating: number | null;
rank: number | null;
}
@@ -117,7 +118,7 @@ export class LeagueDetailPageViewModel {
this.memberships = memberships.memberships.map(m => ({
driverId: m.driverId,
role: m.role,
status: m.status,
status: 'active',
joinedAt: m.joinedAt,
}));
@@ -164,8 +165,14 @@ export class LeagueDetailPageViewModel {
}
private buildDriverSummary(driverId: string): DriverSummary | null {
const driver = this.drivers.find(d => d.id === driverId);
if (!driver) return null;
const driverDto = this.drivers.find(d => d.id === driverId);
if (!driverDto) return null;
const driver = new DriverViewModel({
id: driverDto.id,
name: driverDto.name,
iracingId: driverDto.iracingId,
});
// Detailed rating and rank data are not wired from the analytics services yet;
// expose the driver identity only so the UI can still render role assignments.