website refactor

This commit is contained in:
2026-01-21 17:50:02 +01:00
parent 4b54c3603b
commit 02987f60c8
29 changed files with 1673 additions and 35 deletions

View File

@@ -65,6 +65,28 @@ export interface SponsorshipSlot {
benefits: string[];
}
export interface NextRaceInfo {
id: string;
name: string;
date: string;
track?: string;
car?: string;
}
export interface SeasonProgress {
completedRaces: number;
totalRaces: number;
percentage: number;
}
export interface RecentResult {
raceId: string;
raceName: string;
position: number;
points: number;
finishedAt: string;
}
export interface LeagueDetailViewData extends ViewData {
// Basic info
leagueId: string;
@@ -104,4 +126,14 @@ export interface LeagueDetailViewData extends ViewData {
metrics: SponsorMetric[];
slots: SponsorshipSlot[];
} | null;
// New fields for enhanced league pages
nextRace?: NextRaceInfo;
seasonProgress?: SeasonProgress;
recentResults?: RecentResult[];
// Admin fields
walletBalance?: number;
pendingProtestsCount?: number;
pendingJoinRequestsCount?: number;
}

View File

@@ -13,6 +13,12 @@ export interface StandingEntryData {
penaltyPoints: number;
bonusPoints: number;
teamName?: string;
// New fields from Phase 3
positionChange: number;
lastRacePoints: number;
droppedRaceIds: string[];
wins: number;
podiums: number;
}
export interface DriverData {
@@ -39,4 +45,6 @@ export interface LeagueStandingsViewData {
leagueId: string;
currentDriverId: string | null;
isAdmin: boolean;
// New fields for team standings toggle
isTeamChampionship?: boolean;
}

View File

@@ -11,5 +11,14 @@ export interface LeagueScheduleViewData {
isUpcoming: boolean;
status: 'scheduled' | 'completed';
strengthOfField?: number;
// Registration info
isUserRegistered?: boolean;
canRegister?: boolean;
// Admin info
canEdit?: boolean;
canReschedule?: boolean;
}>;
// User permissions
currentDriverId?: string;
isAdmin: boolean;
}