rename to core
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation';
|
||||
|
||||
export interface DashboardDriverSummaryViewModel {
|
||||
id: string;
|
||||
name: string;
|
||||
country: string;
|
||||
avatarUrl: string;
|
||||
rating: number | null;
|
||||
globalRank: number | null;
|
||||
totalRaces: number;
|
||||
wins: number;
|
||||
podiums: number;
|
||||
consistency: number | null;
|
||||
}
|
||||
|
||||
export interface DashboardRaceSummaryViewModel {
|
||||
id: string;
|
||||
leagueId: string;
|
||||
leagueName: string;
|
||||
track: string;
|
||||
car: string;
|
||||
scheduledAt: string;
|
||||
status: 'scheduled' | 'running' | 'completed' | 'cancelled';
|
||||
isMyLeague: boolean;
|
||||
}
|
||||
|
||||
export interface DashboardRecentResultViewModel {
|
||||
raceId: string;
|
||||
raceName: string;
|
||||
leagueId: string;
|
||||
leagueName: string;
|
||||
finishedAt: string;
|
||||
position: number;
|
||||
incidents: number;
|
||||
}
|
||||
|
||||
export interface DashboardLeagueStandingSummaryViewModel {
|
||||
leagueId: string;
|
||||
leagueName: string;
|
||||
position: number;
|
||||
totalDrivers: number;
|
||||
points: number;
|
||||
}
|
||||
|
||||
export interface DashboardFeedItemSummaryViewModel {
|
||||
id: string;
|
||||
type: string;
|
||||
headline: string;
|
||||
body?: string;
|
||||
timestamp: string;
|
||||
ctaLabel?: string;
|
||||
ctaHref?: string;
|
||||
}
|
||||
|
||||
export interface DashboardFeedSummaryViewModel {
|
||||
notificationCount: number;
|
||||
items: DashboardFeedItemSummaryViewModel[];
|
||||
}
|
||||
|
||||
export interface DashboardFriendSummaryViewModel {
|
||||
id: string;
|
||||
name: string;
|
||||
country: string;
|
||||
avatarUrl: string;
|
||||
}
|
||||
|
||||
export interface DashboardOverviewViewModel {
|
||||
currentDriver: DashboardDriverSummaryViewModel | null;
|
||||
myUpcomingRaces: DashboardRaceSummaryViewModel[];
|
||||
otherUpcomingRaces: DashboardRaceSummaryViewModel[];
|
||||
/**
|
||||
* All upcoming races for the driver, already sorted by scheduledAt ascending.
|
||||
*/
|
||||
upcomingRaces: DashboardRaceSummaryViewModel[];
|
||||
/**
|
||||
* Count of distinct leagues that are currently "active" for the driver,
|
||||
* based on upcoming races and league standings.
|
||||
*/
|
||||
activeLeaguesCount: number;
|
||||
nextRace: DashboardRaceSummaryViewModel | null;
|
||||
recentResults: DashboardRecentResultViewModel[];
|
||||
leagueStandingsSummaries: DashboardLeagueStandingSummaryViewModel[];
|
||||
feedSummary: DashboardFeedSummaryViewModel;
|
||||
friends: DashboardFriendSummaryViewModel[];
|
||||
}
|
||||
|
||||
export type DashboardOverviewResultDTO = DashboardOverviewViewModel;
|
||||
|
||||
export interface IDashboardOverviewPresenter
|
||||
extends Presenter<DashboardOverviewResultDTO, DashboardOverviewViewModel> {}
|
||||
Reference in New Issue
Block a user