1.1 KiB
1.1 KiB
Implementation Plan
1. Start Task And Read Specs
- Start the Trellis task.
- Reuse existing frontend/backend specs.
- Preserve existing uncommitted UI cleanup in elder and bed components.
2. Types And Server Helper
- Add context DTO types in
modules/operations/types.ts. - Add
modules/operations/server/context.ts. - Batch-load care, health, and incident context based on permissions.
- Avoid fabricating emergency links; match text only when the persisted incident names the elder/bed/room.
3. Wire Pages
- Update
app/(app)/app/elders/page.tsxto load and passelderContexts. - Update
app/(app)/app/beds/page.tsxto load and passbedContexts.
4. Update Client Components
- Extend
EldersClientwith optionalelderContexts. - Extend
BedsWorkspacewith optionalbedContexts. - Render compact read-only context lines.
- Preserve existing CRUD/admission behavior.
5. Verification
pnpm lintpnpm type-checkpnpm testpnpm build
Rollback
- Remove operations context helper/types.
- Remove context props and columns from elder/bed clients/pages.