improvement: notify counter badge added to treatment and tasks tabs for upadted and edited cases.
This commit is contained in:
14
.cursor/rules/lab-notifications.mdc
Normal file
14
.cursor/rules/lab-notifications.mdc
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
description: Lab tab badges — activity model, tab-counts API, read cursors
|
||||
globs: backend/src/modules/notifications/**,backend/src/common/lab-case-activity.ts,frontend/src/lib/hooks/useTabBadgeCounts.ts,frontend/src/lib/tabBadgeUtils.ts,frontend/src/lib/api/notifications.ts,frontend/src/components/ui/shared/NavBadgePill.tsx,frontend/src/components/ui/shared/Sidebar.tsx
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
# Lab tab badges
|
||||
|
||||
- **Split counts (Option B):** Lab Cases = sent + clinic comments + important; Lab Tasks = completions + lab comments; Clinic Treatment = visible lab comments + completions.
|
||||
- **API:** `GET /notifications/tab-counts`; Tasks/Treatment mark read on tab visit; Cases uses per-case read + `hasUnread` on list cards.
|
||||
- **Pattern:** `useTabBadgeCounts` + `notifyTabBadgesChanged()` — same shape as `usePendingConnectionsCount`.
|
||||
- **Orgs connections badge** stays on separate `pending-count` endpoint.
|
||||
|
||||
Full map: `.cursor/skills/lab-notifications/SKILL.md`
|
||||
Reference in New Issue
Block a user