Bug Fixes
-
Shift Time Display
- Replaced
'--'string fallbacks withnullfor missingshift_start_timeandshift_end_timeacross all overtime fetch endpoints. - Added null checks before calling
to12hr()and display "N/A" when schedule times are unavailable.
- Replaced
-
Configuration Staleness
- Added a
forceparameter toloadConfig()to bypass cached configuration data. - Moved forced configuration refresh into
loadMonthData()to ensure schedule data is refreshed on every month load.
- Added a
-
Enhance State Leak
- Added
resetEnhanceState()and integrated it into relevant flows. - Clears the original reason and cooldown timer to ensure a clean state between actions.
- Added
-
Password Input
- Removed the password visibility toggle.
- Simplified password input type handling.
-
Textarea Read-Only State
- Fixed textarea behavior to correctly respect the
readonlyprop when the glowing state is enabled.
- Fixed textarea behavior to correctly respect the
-
Session Persistence
- Overtime filing queue is now properly cleared from
sessionStorageon logout usingclearAll()fromuseOvertimeQueue.
- Overtime filing queue is now properly cleared from
-
Error Persistence
- Preserved errors during session persistence and hydration instead of discarding them.
New Features
-
useOvertimeQueueComposable- Introduced a centralized overtime filing queue with:
sessionStoragepersistence- Automatic hydration on page load
clearAll()support for logout cleanup
- Replaces local queue references and UID counters.
- Introduced a centralized overtime filing queue with:
-
Server-Side Filter Counts
- Stat cards now use server-provided
info.countsvalues:total_hoursfiledpendingapprovedrejected
- Counts are refreshed on every fetch and filter operation.
- Stat cards now use server-provided
Refinements
- Renamed the "Actions" column to "Default Shift".
- Added a primary badge highlight for the current date.
- Added JSDoc typings to
useOvertimeQueue. - Removed unused imports and dead code:
removeWeekLinkIconbuildShiftReference
- Ensured all status values are persisted in application state.
Tests
- Added backend test coverage for
info.counts, including:- Total counts
- Filtered counts
- Count calculations independent of pagination