Commit Graph

23 Commits

Author SHA1 Message Date
f223d1f958 iOS PWA and IT Job Checklist for IT Staff view 2026-04-11 07:40:12 +08:00
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
6fd3b66251 OTA Updates for adnroid app and web apk uploader 2026-03-15 19:24:34 +08:00
9bbaf67fef A more robust self hosted OTA updates implementation 2026-03-13 07:15:28 +08:00
0bd2a94ece OTA Update attempt 2026-03-11 22:28:38 +08:00
ccc1c62262 Background location tracking 2026-03-09 22:33:35 +08:00
1e1c7d9552 Fixed freezing on start up for some devices 2026-03-09 18:24:44 +08:00
8bf0dc13d7 Workforce rotation settings and location permission handling 2026-03-08 17:31:39 +08:00
c6f536edeb Initial Commit: Duty Schedule and Attendance Logbook 2026-03-07 10:16:28 +08:00
5713581992 Push notification tap redirect to corressponding ticket or task 2026-03-02 21:09:38 +08:00
294d3f7470 Initial implementation of navigation from notification(not yet working) 2026-03-01 17:59:23 +08:00
e99b87bd20 Activity logs 2026-02-28 18:04:31 +08:00
5a74299a1c Added Task Number filter 2026-02-28 16:45:17 +08:00
0a8e388757 Move push notification to client instead of db trigger 2026-02-28 16:19:08 +08:00
dab43a7f30 A much more detailed notification 2026-02-27 07:05:08 +08:00
9cc99e612a Allow background sound notification 2026-02-26 21:43:05 +08:00
6ccf820438 FCM push Notifications 2026-02-25 23:37:08 +08:00
db14ec3916 A more robust pdf generation > preview > print workflow 2026-02-25 20:59:21 +08:00
aef88de54b No notification permission enforcement on web 2026-02-25 18:39:39 +08:00
5979a04254 * Push Notification Setup and attempt
* Office Ordering
* Allow editing of Task and Ticket Details after creation
2026-02-24 21:06:46 +08:00
cc6fda0e79 Allow OS notifications 2026-02-23 22:19:23 +08:00
678a73a696 Implement Asia/Manila Time Zone
Handled saving of Relievers
2026-02-11 20:12:48 +08:00
1f16da8f88 Initial commit 2026-02-09 20:10:42 +08:00