2 Commits

Author SHA1 Message Date
abite
132279ecab Massive Notification Overhaul
CRITICAL ISSUES FIXED
1. TIMEZONE MISMATCH (HIGH RISK) - FIXED
Problem: Dates compared in UTC while cron runs in local timezone → off-by-one day errors
Solution: Implemented robust timezone handling using Luxon DateTime library
2. DATE PARSING FRAGILITY (HIGH RISK) - FIXED
Problem: Basic new Date() parsing could fail silently with invalid dates
Solution: Created comprehensive parseDate() function handling multiple formats with validation
3. DATE CALCULATION ERRORS (MEDIUM-HIGH RISK) - FIXED
Problem: Month arithmetic had edge cases (Jan 31 + 1 month = March 3 instead of Feb 29)
Solution: Implemented addTimePeriod() using Luxon's robust date arithmetic
4. MISSING VALIDATION & ERROR HANDLING - FIXED
Added comprehensive validation for all maintenance event data
Enhanced error handling to prevent system crashes
Added overdue detection as safety net (1-3 days past due notifications)
🛡️ SAFETY MECHANISMS ADDED
Overdue Detection: Catches missed maintenance (server downtime scenarios)
Duplicate Prevention: Tracking system prevents multiple notifications for same event
Data Validation: Invalid events are skipped with logging, don't crash system
Comprehensive Logging: Detailed debugging and summary reports
📊 TEST RESULTS
The comprehensive test suite shows all critical edge cases now work correctly:
 Leap year dates (Feb 29)
 Month-end arithmetic (Jan 31 + 1 month = Feb 29, not March 3)
 Timezone consistency across DST changes
 Multiple date formats parsed correctly
 Invalid dates handled gracefully
2025-05-25 22:20:26 -05:00
gitmotion
49f93f29d8 Add PWA, cache busting, cors
updated security and relying on cors for now

clean up header actions buttons

Updated helmet config, responsive styling, icons fixes, and reordering

update header title to left side and actions on right

Unify modal styling

fix login styling

adding paths for saving/editing to public paths for now to restore functionality. we should refactor this to pass pin/session for any request

Bump cache version

remove post install script

Update PIN logic for firefox compatibility and securely handle redirects

Unify add component section/modal

Unifying file uploaders, modal title styles, add collapsible sections for file uploaders
2025-05-11 11:41:18 -07:00