mirror of
https://github.com/temetro/temetro.git
synced 2026-08-30 04:09:05 +00:00
feat(analysis): add trend charts to the Analysis page
The Analysis page only showed KPI numbers. Add two real time-series and render them as dependency-free bar charts (matching components/chat/sparkline.tsx): - backend: GET /api/analytics now returns `trends.patientsByMonth` (new patients per month over the last 6 months) and `trends.appointmentsByWeekday` (appointments per day for the current week), bucketed in JS from one query each. - frontend: new components/analysis/bar-chart.tsx and two chart sections on the Analysis view (Patient growth, Appointments this week), with i18n keys. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -402,6 +402,13 @@
|
||||
"description": "Care-team workload",
|
||||
"open": "Open",
|
||||
"completed": "Completed"
|
||||
},
|
||||
"charts": {
|
||||
"patientGrowthTitle": "Patient growth",
|
||||
"patientGrowthDescription": "New patients per month over the last 6 months",
|
||||
"weeklyAppointmentsTitle": "Appointments this week",
|
||||
"weeklyAppointmentsDescription": "Bookings per day for the current week",
|
||||
"empty": "No data yet"
|
||||
}
|
||||
},
|
||||
"activity": {
|
||||
|
||||
Reference in New Issue
Block a user