From 55e4938a57dfc9f280c552f18b861f342306e15c Mon Sep 17 00:00:00 2001 From: sdarbinyan Date: Sat, 15 Aug 2026 03:43:07 +0400 Subject: [PATCH] docs: spec update - reuse existing topbar bell instead of new sidebar badge Co-Authored-By: Claude Sonnet 5 --- ...-15-admin-purchase-notifications-design.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/superpowers/specs/2026-08-15-admin-purchase-notifications-design.md b/docs/superpowers/specs/2026-08-15-admin-purchase-notifications-design.md index c07b35a..fd27efa 100644 --- a/docs/superpowers/specs/2026-08-15-admin-purchase-notifications-design.md +++ b/docs/superpowers/specs/2026-08-15-admin-purchase-notifications-design.md @@ -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) then dismiss. -**Badge** +**Badge — reuses existing topbar bell** -- `unreadCount` signal (from `AdminOrderWatcherService`) rendered on the admin - sidebar's "Orders" nav item. -- Visiting the orders list marks all currently-known orders as seen → badge resets to 0. +`admin-layout.component.html:141-157` already has an unused bell icon + +dropdown panel (currently hardcoded to always show "no notifications"). +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** - 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