website refactor
This commit is contained in:
17
apps/website/lib/view-data/LeagueAdminScheduleViewData.ts
Normal file
17
apps/website/lib/view-data/LeagueAdminScheduleViewData.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export interface AdminScheduleRaceData {
|
||||
id: string;
|
||||
name: string;
|
||||
track: string;
|
||||
car: string;
|
||||
scheduledAt: string; // ISO string
|
||||
}
|
||||
|
||||
export interface LeagueAdminScheduleViewData {
|
||||
published: boolean;
|
||||
races: AdminScheduleRaceData[];
|
||||
seasons: Array<{
|
||||
seasonId: string;
|
||||
name: string;
|
||||
}>;
|
||||
seasonId: string;
|
||||
}
|
||||
19
apps/website/lib/view-data/LeagueRulebookViewData.ts
Normal file
19
apps/website/lib/view-data/LeagueRulebookViewData.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
export interface RulebookScoringConfig {
|
||||
scoringPresetName: string | null;
|
||||
gameName: string;
|
||||
championships: Array<{
|
||||
type: string;
|
||||
sessionTypes: string[];
|
||||
pointsPreview: Array<{
|
||||
sessionType: string;
|
||||
position: number;
|
||||
points: number;
|
||||
}>;
|
||||
bonusSummary: string[];
|
||||
}>;
|
||||
dropPolicySummary: string;
|
||||
}
|
||||
|
||||
export interface LeagueRulebookViewData {
|
||||
scoringConfig: RulebookScoringConfig | null;
|
||||
}
|
||||
35
apps/website/lib/view-data/RacesViewData.ts
Normal file
35
apps/website/lib/view-data/RacesViewData.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
export interface RaceViewData {
|
||||
id: string;
|
||||
track: string;
|
||||
car: string;
|
||||
scheduledAt: string;
|
||||
scheduledAtLabel: string;
|
||||
timeLabel: string;
|
||||
relativeTimeLabel: string;
|
||||
status: 'scheduled' | 'running' | 'completed' | 'cancelled';
|
||||
statusLabel: string;
|
||||
sessionType: string;
|
||||
leagueId: string | null;
|
||||
leagueName: string | null;
|
||||
strengthOfField: number | null;
|
||||
isUpcoming: boolean;
|
||||
isLive: boolean;
|
||||
isPast: boolean;
|
||||
}
|
||||
|
||||
export interface RacesViewData {
|
||||
races: RaceViewData[];
|
||||
totalCount: number;
|
||||
scheduledCount: number;
|
||||
runningCount: number;
|
||||
completedCount: number;
|
||||
leagues: Array<{ id: string; name: string }>;
|
||||
upcomingRaces: RaceViewData[];
|
||||
liveRaces: RaceViewData[];
|
||||
recentResults: RaceViewData[];
|
||||
racesByDate: Array<{
|
||||
dateKey: string;
|
||||
dateLabel: string;
|
||||
races: RaceViewData[];
|
||||
}>;
|
||||
}
|
||||
@@ -1,13 +1,21 @@
|
||||
export interface LeagueWalletTransactionViewData {
|
||||
id: string;
|
||||
type: 'deposit' | 'withdrawal' | 'sponsorship' | 'prize';
|
||||
amount: number;
|
||||
formattedAmount: string;
|
||||
amountColor: string;
|
||||
description: string;
|
||||
createdAt: string;
|
||||
formattedDate: string;
|
||||
status: 'completed' | 'pending' | 'failed';
|
||||
statusColor: string;
|
||||
typeColor: string;
|
||||
}
|
||||
|
||||
export interface LeagueWalletViewData {
|
||||
leagueId: string;
|
||||
balance: number;
|
||||
formattedBalance: string;
|
||||
currency: string;
|
||||
transactions: Array<{
|
||||
id: string;
|
||||
type: 'deposit' | 'withdrawal' | 'sponsorship' | 'prize';
|
||||
amount: number;
|
||||
description: string;
|
||||
createdAt: string;
|
||||
status: 'completed' | 'pending' | 'failed';
|
||||
}>;
|
||||
}
|
||||
transactions: LeagueWalletTransactionViewData[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user