195 Commits

Author SHA1 Message Date
redz1029 e49b52949c Fixed Edit Port Dialog on Network Map 2026-06-06 18:30:58 +08:00
redz1029 65a42039ee Enhanced Leave and Pass Slip UI/UX 2026-06-06 18:29:56 +08:00
redz1029 d813ee45a2 Network map enhancements and fixes 2026-06-05 16:42:56 +08:00
redz1029 e2ddc9a3ae Enhanced UI of IT Job Checklist 2026-06-05 10:48:53 +08:00
redz1029 5e20d14f23 Fixed attendance 2026-06-05 10:34:26 +08:00
redz1029 5d818e0d4f Enhanced APK Update Screen 2026-06-05 09:15:48 +08:00
redz1029 a91c049353 Scrollable Navigation Rail 2026-06-05 09:15:22 +08:00
redz1029 c31187ef7c Added keyboard visibility dependency 2026-06-05 07:11:18 +08:00
redz1029 1768ed7b04 Fixed custom shift type not appearing in dropdown.
Fixed inconsitent time reflection on edit.
2026-06-05 07:10:38 +08:00
redz1029 ce0be25136 Fixed IT Service Request Saving 2026-06-04 11:28:55 +08:00
redz1029 7475dbca41 Package updates 2026-06-04 07:43:46 +08:00
redz1029 f39bc2cc06 Fixed overtime checkin not showing 2026-06-04 07:43:23 +08:00
redz1029 7f38086237 Migration fixes 2026-05-21 06:29:37 +08:00
redz1029 5d0a66bb52 Initial Commit : Network Map 2026-05-21 06:29:14 +08:00
redz1029 82141dd61c Improved attendance screen navigations on mobile 2026-05-18 23:53:08 +08:00
redz1029 425fe8e683 Weekly, Monthly and Custom Range Worklog 2026-05-16 05:10:04 +08:00
redz1029 4b9b0c7a20 Fixed report rendering in web 2026-05-14 22:08:15 +08:00
redz1029 e9d1af867a Notification Screen and tasq_adaptive_list enhancements 2026-05-11 11:34:34 +08:00
redz1029 30b301765b * Improved Task and Ticket Detail Screen
* Made Office assignment searchable in Task and Ticket Creation and Edit Screen
2026-05-10 17:54:03 +08:00
redz1029 4d0d4d5ab3 Attendance DTR and UI Improvement for Offline Rediness 2026-05-09 17:32:07 +08:00
redz1029 ccedf6e5f0 Worklog, anti geo spoofing and UI Polish 2026-05-05 05:51:19 +08:00
redz1029 d068887354 Clean up phantom files 2026-05-03 15:00:35 +08:00
redz1029 858520bd8d Offline rediness 2026-05-03 14:50:14 +08:00
redz1029 783c5eb0be * Task/Ticket desktop dialogs — widened from 520 → 600dp, and tasks now uses SizedBox(width: 600) instead of ConstrainedBox(maxWidth:) which was the root cause of the "still small" issue (max-only never forced expansion)
* Pass Slip + Leave — both dialogs gained an isSheet flag; callers now branch on AppBreakpoints.tablet: bottom sheet on mobile, dialog on desktop
2026-04-30 06:45:51 +08:00
redz1029 48cd3bcd60 Offline Support 2026-04-27 06:20:39 +08:00
redz1029 7d8851a94a Test Cases 2026-04-11 07:40:49 +08:00
redz1029 f223d1f958 iOS PWA and IT Job Checklist for IT Staff view 2026-04-11 07:40:12 +08:00
redz1029 5cb6561924 added ruflo 2026-04-09 19:01:53 +08:00
redz1029 872c2aab87 UI Enhancements in IT Service Request, Announcements, Workforce and notification fixes 2026-03-22 18:00:10 +08:00
redz1029 049ab2c794 Added My Schedule tab in attendance screen
Allow 1 Day, Whole Week and Date Range swapping
2026-03-22 11:52:25 +08:00
redz1029 ba155885c0 Immediate feedback on sending IT Job Reminder 2026-03-21 19:28:53 +08:00
redz1029 beb21e48d0 Announcements: Show snackbar on event and enhanced comment notification messages 2026-03-21 19:28:18 +08:00
redz1029 3fb6fd5c93 Announcements and IT Job Checklist 2026-03-21 18:51:04 +08:00
redz1029 7d9096963a finalized reminder notification system migrations 2026-03-21 12:58:38 +08:00
redz1029 b2c3202317 Enhaced m3 motion 2026-03-21 12:57:41 +08:00
redz1029 758869920c Fix push notifications never delivered — 3 root causes
1. CRITICAL: Double idempotency check silently discarded every notification.
   process_scheduled_notifications called try_mark_notification_pushed first,
   then send_fcm called it again and saw "already pushed" → skipped FCM send.
   Fix: Remove the check from process_scheduled_notifications; send_fcm's
   own check is sufficient (and needed for direct Flutter client calls).

2. SEND_FCM_URL env var crash: If not configured, edge function crashed on
   module load. Fix: Derive from SUPABASE_URL (always auto-set) as fallback.

3. Timing windows too narrow: ±30s windows with 60s cron intervals could
   miss events between runs. Fix: Widen to ±90s. ON CONFLICT DO NOTHING
   prevents duplicates, making wider windows safe.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 20:50:45 +08:00
redz1029 d81e2cde26 Fix RAISE NOTICE syntax in migration error handler
Use parameterized RAISE NOTICE with %L placeholders instead of trying to
concatenate strings inside quoted literals. This fixes the syntax error where
|| operators were being treated as string content instead of SQL operators.
2026-03-20 18:30:19 +08:00
redz1029 20720ba541 Fix SQL syntax error in pg_cron.schedule() calls
Replace dollar-quoted strings with simple single-quoted strings in cron.schedule()
function calls. The cron.schedule() function expects text literals, not dollar-quoted
blocks. Use quote_literal() for the interval value in the cleanup query to properly
escape the string.
2026-03-20 18:28:24 +08:00
redz1029 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
redz1029 74197c525d Enhanced material design 3 implementation 2026-03-20 15:15:38 +08:00
redz1029 27ebb89052 Added Claude Skills 2026-03-20 15:14:21 +08:00
redz1029 a39e33bc6b Added Team Activity Dashboard 2026-03-18 22:04:15 +08:00
redz1029 4b63b55812 Initial commit for shift push notification reminders 2026-03-18 22:03:50 +08:00
redz1029 3af7a1e348 Added configurable shift types and holiday settings 2026-03-18 16:51:34 +08:00
redz1029 4eaf9444f0 Enhanced Logbook layout 2026-03-18 10:56:31 +08:00
redz1029 84837c4bf2 Show overtime checkin when a user does not have a schedule for the day or the schedule ended for the day 2026-03-18 04:51:45 +08:00
redz1029 3e3e4d560e Ensures allowing assigned IT Staff to check in outside geofence when and IT Service Request venue is outside premise 2026-03-17 07:20:24 +08:00
redz1029 eeab3b1fcf render overtime anytime needed 2026-03-16 19:46:51 +08:00
redz1029 81853c4367 Added programmer role and fixed snackbar not showing 2026-03-16 07:23:20 +08:00
redz1029 9f7791e56f Migration to add leave_of_absence(id) and pass_slips(id) on notifications table 2026-03-15 22:37:42 +08:00