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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user