Add Recharts bar charts to Today dashboard summary.

Extend the Today summary API with treatment mix and workflow task breakdowns, and render permission-aware chart cards on the Today page using Recharts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-11 00:34:38 +03:30
parent 22466490bf
commit 10959e3183
14 changed files with 754 additions and 22 deletions

View File

@@ -1,3 +1,14 @@
export type TodayChartBucket = {
code: string;
label: string;
count: number;
};
export type TodaySummaryCharts = {
treatmentMixWeek?: TodayChartBucket[];
tasksByWorkflowStep?: TodayChartBucket[];
};
export type TodayWidgetKey =
| 'appointmentsToday'
| 'patientsToday'
@@ -24,6 +35,7 @@ export interface TodaySummaryData {
orgType: 'CLINIC' | 'LAB';
range: { from: string; to: string };
widgets: TodaySummaryWidgets;
charts: TodaySummaryCharts;
}
export interface TodaySummaryResponse {