Add Today dashboard foundation with permission-aware KPI summary API.
Replace hardcoded Today cards with a backend summary endpoint and composable frontend widgets filtered by org type and tab permissions. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
32
frontend/src/types/today.ts
Normal file
32
frontend/src/types/today.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
export type TodayWidgetKey =
|
||||
| 'appointmentsToday'
|
||||
| 'patientsToday'
|
||||
| 'treatmentsToday'
|
||||
| 'draftTreatments'
|
||||
| 'labCasesPendingSend'
|
||||
| 'casesReceivedToday'
|
||||
| 'tasksInProgress'
|
||||
| 'importantTasks'
|
||||
| 'pendingConnections'
|
||||
| 'seats'
|
||||
| 'pendingStaffInvites';
|
||||
|
||||
export type TodaySummaryWidgets = Partial<
|
||||
Record<
|
||||
TodayWidgetKey,
|
||||
| { count: number }
|
||||
| { used: number; limit: number | null; unlimited: boolean }
|
||||
>
|
||||
>;
|
||||
|
||||
export interface TodaySummaryData {
|
||||
generatedAt: string;
|
||||
orgType: 'CLINIC' | 'LAB';
|
||||
range: { from: string; to: string };
|
||||
widgets: TodaySummaryWidgets;
|
||||
}
|
||||
|
||||
export interface TodaySummaryResponse {
|
||||
success: boolean;
|
||||
data: TodaySummaryData;
|
||||
}
|
||||
Reference in New Issue
Block a user