docs: spec update - reuse existing topbar bell instead of new sidebar badge
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
sdarbinyan
2026-08-15 03:43:07 +04:00
parent cfee91355b
commit 55e4938a57

View File

@@ -39,16 +39,25 @@ status, is plain polling), so this has to be poll-based like the rest of the app
- `FloatingNotificationsComponent` gets a click handler: navigate to `route` (if set) - `FloatingNotificationsComponent` gets a click handler: navigate to `route` (if set)
then dismiss. then dismiss.
**Badge** **Badge — reuses existing topbar bell**
- `unreadCount` signal (from `AdminOrderWatcherService`) rendered on the admin `admin-layout.component.html:141-157` already has an unused bell icon +
sidebar's "Orders" nav item. dropdown panel (currently hardcoded to always show "no notifications").
- Visiting the orders list marks all currently-known orders as seen → badge resets to 0. Wire the watcher's data into it instead of adding a new indicator:
- `unreadCount` signal (from `AdminOrderWatcherService`) rendered as a badge
on the bell icon (`admin-layout__icon-button`).
- Opening the panel (`notificationsOpen()`, already wired to the bell click)
lists the unread new orders instead of the static "notificationsEmpty"
text.
- Opening the panel marks all currently-known orders as seen → badge resets
to 0 (same trigger `AdminLayoutComponent.toggleNotifications()` already
has).
**Click behavior** **Click behavior**
- Toast click → `/admin/orders/:id` (the new order's detail page). - Toast click → `/admin/orders/:id` (the new order's detail page).
- Badge click → orders list. - Clicking an order row inside the bell panel → same, then closes the panel.
## Data flow ## Data flow