feat: integrate operations dashboard summaries

This commit is contained in:
2026-07-03 00:57:42 -07:00
parent 3d55975975
commit 9d73457f79
5 changed files with 273 additions and 14 deletions

View File

@@ -0,0 +1,40 @@
# Operations Dashboard Integration Design
## Summary
Upgrade the dashboard into a cross-module operations summary now that health, care, emergency, elder, bed, and admission data are persisted.
## Data Boundary
The dashboard remains a Server Component:
- elder/bed/admission data from `modules/core/server/operations.ts`
- health data from `listHealthAdminData`
- care data from `listCareExecutionData`
- emergency data from `listEmergencyIncidentData`
Load optional module data only when the viewer has the corresponding read permission. Do not fabricate metrics when permission or data is absent.
## UI Boundary
`DashboardHome` stays presentational. It receives:
- primary metrics
- bed occupancy chart data
- recent admissions
- work queues for health, care, and emergency
Dashboard items should link into modules:
- health reviews -> `/settings/health`
- care tasks -> `/care`
- emergency events -> `/emergency`
- admissions -> `/beds`
The dashboard is not a mutation surface.
## Compatibility
- Existing bed occupancy chart remains data-backed.
- Existing admission list remains data-backed.
- Top badge-style tag should be removed to match the module cleanup direction.

View File

@@ -0,0 +1,29 @@
# Implementation Plan
## 1. Start Task
- Start Trellis task.
- Preserve unrelated dirty settings/dialog files.
## 2. Server Data
- Update dashboard page to load health/care/emergency summaries when permitted.
- Keep all reads organization-scoped.
- Build route hrefs with `getWorkspaceHref`.
## 3. Presentational UI
- Extend `DashboardHome` props for health reviews, care tasks, and emergency events.
- Add compact queue sections with links to modules.
- Remove top badge tag.
## 4. Verification
- `pnpm lint`
- `pnpm type-check`
- `pnpm test`
- `pnpm build`
## Rollback
- Revert dashboard page and `DashboardHome` changes.

View File

@@ -3,7 +3,7 @@
"name": "operations-dashboard-integration",
"title": "运营看板整合优化",
"description": "",
"status": "planning",
"status": "in_progress",
"dev_type": null,
"scope": null,
"package": null,