tasq/lib/widgets
Marc Rejohn Castillano d484f62cbd Implement push notification reminder system with 9 notification types
Adds comprehensive push notification reminders using pg_cron + pg_net:
- Shift check-in reminder (15 min before, with countdown banner)
- Shift check-out reminder (hourly, persistent until checkout)
- Overtime idle reminder (15 min without task)
- Overtime checkout reminder (30 min after task completion)
- IT service request event reminder (1 hour before event)
- IT service request evidence reminder (daily)
- Paused task reminder (daily)
- Backlog reminder (15 min before shift end)
- Pass slip expiry reminder (15 min before 1-hour limit, with countdown banner)

Database: Extended scheduled_notifications table to support polymorphic references
(schedule_id, task_id, it_service_request_id, pass_slip_id) with unique constraint
and epoch column for deduplication. Implemented 8 enqueue functions + master dispatcher.
Uses pg_cron every minute to enqueue and pg_net to trigger process_scheduled_notifications
edge function, eliminating need for external cron job. Credentials stored in vault with
GUC fallback for flexibility.

Flutter: Added ShiftCountdownBanner and PassSlipCountdownBanner widgets that display
persistent countdown timers for active shifts and pass slips. Both auto-dismiss when
user completes the action. FCM handler triggers shift countdown on start_15 messages.
navigate_to field in data payload enables flexible routing to any screen.

Edge function: Updated process_scheduled_notifications to handle all 9 types with
appropriate titles, bodies, and routing. Includes pass_slip_id in idempotency tracking.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-20 18:26:48 +08:00
..
app_breakpoints.dart Major UI overhaul 2026-02-10 23:11:45 +08:00
app_page_header.dart Enhanced material design 3 implementation 2026-03-20 15:15:38 +08:00
app_shell.dart Implement push notification reminder system with 9 notification types 2026-03-20 18:26:48 +08:00
app_state_view.dart Enhanced material design 3 implementation 2026-03-20 15:15:38 +08:00
face_verification_overlay.dart Attendance log now record both check in and out photos and allow IT Staffs, Dispatchers and Admins to view for verification 2026-03-08 18:45:31 +08:00
gemini_animated_text_field.dart Still some AI integration issues 2026-03-03 23:35:07 +08:00
gemini_button.dart Used awesome snackbar and fixed gemini_ico.png not found 2026-03-04 06:44:55 +08:00
m3_card.dart M3 Overhaul 2026-03-06 20:03:32 +08:00
mono_text.dart Major UI overhaul 2026-02-10 23:11:45 +08:00
multi_select_picker.dart M3 Overhaul 2026-03-06 20:03:32 +08:00
pass_slip_countdown_banner.dart Implement push notification reminder system with 9 notification types 2026-03-20 18:26:48 +08:00
profile_avatar.dart Enhanced material design 3 implementation 2026-03-20 15:15:38 +08:00
qr_verification_dialog.dart Minor layout fixes 2026-03-08 04:26:33 +08:00
reconnect_overlay.dart Per channel skeleton 2026-03-01 20:10:38 +08:00
responsive_body.dart Major UI overhaul 2026-02-10 23:11:45 +08:00
shift_countdown_banner.dart Implement push notification reminder system with 9 notification types 2026-03-20 18:26:48 +08:00
status_pill.dart Enhanced material design 3 implementation 2026-03-20 15:15:38 +08:00
task_assignment_section.dart M3 Overhaul 2026-03-06 20:03:32 +08:00
tasq_adaptive_list.dart Enhanced material design 3 implementation 2026-03-20 15:15:38 +08:00
typing_dots.dart Initial commit 2026-02-09 20:10:42 +08:00
update_dialog.dart Enhanced material design 3 implementation 2026-03-20 15:15:38 +08:00