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

@@ -4,6 +4,7 @@ import { useTranslations } from 'next-intl';
import { Link } from '@/i18n/navigation';
import { useAuth } from '@/lib/hooks/useAuth';
import { TodayKpiGrid } from '@/components/today/TodayKpiGrid';
import { TodayChartsSection } from '@/components/today/TodayChartsSection';
import { useTodaySummary } from '@/lib/hooks/useTodaySummary';
import { formatApiErrorMessage } from '@/components/shared/formatApiError';
@@ -39,6 +40,8 @@ export default function TodayPage() {
) : null}
<TodayKpiGrid widgets={data?.widgets ?? {}} loading={loading} />
<TodayChartsSection charts={data?.charts ?? {}} loading={loading} />
</div>
);
}