Skip to content

Notifications (Admin)

The admin Notifications page at /dashboard/notifications loads rows from admin_notifications via the Nest API (GET /api/v1/auth/admin/notifications). Admins can mark items read, mark all read, delete a single row, or delete selected rows in one call. Delivery preferences live under profile Settings → Notifications.


GoalsNon-goals
Inbox for Laravel-style admin database notificationsFull push/email delivery from this screen
Scoped reads/deletes to the signed-in adminCross-admin notification management

  • List, mark read, mark all read, and delete call the backend; the UI invalidates the query cache after success.
  • All and Unread use server pagination: query page, limit (1–100, default 15), and unread=true for the unread list. The response includes data, total, page, pageSize, totalPages, and unreadTotal (badge count, independent of the unread filter).
  • Category filters (Orders, Customers, System, Payments) load the first 100 rows without unread, then filter and paginate in the browser.
  • Delete (single) asks for confirmation, then DELETE /api/v1/auth/admin/notifications/{id}; a missing or other-admin row returns 404.
  • Delete selected asks for confirmation, then POST /api/v1/auth/admin/notifications/delete with body { "ids": ["…"] } (1–200 ids). The response includes deleted and skipped (ids that did not match a row for this admin).

  1. User opens Notifications → list loads from the API.
  2. Mark as readPATCH …/{id}/read → row shows as read.
  3. Delete → confirm → DELETE …/{id} → row disappears from the list.
  4. Delete selected → confirm → POST …/delete with selected ids → matching rows are removed; list refreshes.

  • Deletes are scoped to the current admin (notifiable_id + known notifiable_type); do not use notification IDs as opaque capabilities across tenants.
  • For operational alerting, still use monitoring, email, and on-call—not this inbox alone.

IDScenarioExpected
N1Open notificationsList loads or error message
N2Mark one readRow shows read; persists after refresh
N3Mark all readUnread count clears
N4Delete with confirmRow removed; persists after refresh
N5Delete cancelNo API call; row unchanged

  • /dashboard/notifications