feat(notifications): day sheet notification types

Add daySheetId field to NotificationItem model (Brick-managed), extract
notificationTitle/notificationIcon to top-level testable functions, add
five day-sheet notification cases, and wire tap/banner routing for
day-sheet detail and approvals tab.
Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
2026-09-28 14:54:19 +08:00
parent 54ce528b02
commit 5af0ce62d9
8 changed files with 219 additions and 38 deletions
+12 -1
View File
@@ -106,6 +106,11 @@ class _NotificationBridgeState extends ConsumerState<NotificationBridge>
'isr_approved' => 'IT Service Request approved',
'isr_status_changed' => 'IT Service Request updated',
'isr_assigned' => 'New IT Service Request assigned',
'day_sheet_submitted' => 'Day sheet submitted',
'day_sheet_disapproved' => 'Day sheet disapproved',
'day_sheet_justified' => 'Day sheet justified',
'day_sheet_approved' => 'Day sheet approved',
'day_sheet_digest' => 'Day sheets awaiting review',
_ => 'New notification',
};
@@ -121,7 +126,13 @@ class _NotificationBridgeState extends ConsumerState<NotificationBridge>
action: SnackBarAction(
label: 'View',
onPressed: () => _goToDetail(
route: item.announcementId != null ? '/announcements' : null,
route: item.announcementId != null
? '/announcements'
: item.type == 'day_sheet_digest'
? '/programmer-tasks?tab=approvals'
: item.daySheetId != null
? '/programmer-tasks/day-sheets/${item.daySheetId}'
: null,
taskId: item.taskId,
ticketId: item.ticketId,
itServiceRequestId: item.itServiceRequestId,