view data fixes
This commit is contained in:
@@ -1,11 +1,50 @@
|
||||
import type { StandingEntryViewData } from './StandingEntryViewData';
|
||||
import { ViewData } from "@/lib/contracts/view-data/ViewData";
|
||||
|
||||
/**
|
||||
* ViewData for StandingEntry
|
||||
* This is the JSON-serializable input for the Template.
|
||||
*/
|
||||
export interface StandingEntryViewData {
|
||||
driverId: string;
|
||||
position: number;
|
||||
points: number;
|
||||
wins: number;
|
||||
podiums: number;
|
||||
races: number;
|
||||
leaderPoints: number;
|
||||
nextPoints: number;
|
||||
currentUserId: string | null;
|
||||
previousPosition?: number;
|
||||
driver?: any;
|
||||
// Phase 3 fields
|
||||
positionChange: number;
|
||||
lastRacePoints: number;
|
||||
droppedRaceIds: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* ViewData for LeagueStandings
|
||||
* This is the JSON-serializable input for the Template.
|
||||
*/
|
||||
export interface LeagueStandingsViewData {
|
||||
export interface LeagueStandingsViewData extends ViewData {
|
||||
standings: StandingEntryViewData[];
|
||||
drivers: any[];
|
||||
memberships: any[];
|
||||
drivers: Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
avatarUrl: string | null;
|
||||
iracingId: string;
|
||||
rating?: number;
|
||||
country: string;
|
||||
}>;
|
||||
memberships: Array<{
|
||||
driverId: string;
|
||||
leagueId: string;
|
||||
role: 'owner' | 'admin' | 'steward' | 'member';
|
||||
joinedAt: string;
|
||||
status: 'active' | 'inactive';
|
||||
}>;
|
||||
leagueId: string;
|
||||
currentDriverId: string | null;
|
||||
isAdmin: boolean;
|
||||
isTeamChampionship: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user