Daily Changelog – September 18, 2025
Fixes
- Fixed missing calendar entries causing schedule generation failures by adding auto-creation of calendar entries in generateWeeklySchedulesRefactored function
- Resolved “generate more weeks” functionality breaking when calendar entries don’t exist for future dates
- Added defensive programming to schedule generation to automatically create missing calendar dates instead of failing
- Fixed PTO requests API to return date fields as plain text strings using ::text casting to prevent timezone conversion of date-only values
- Resolved date display issues where manual PTO requests showed incorrect dates due to UTC timestamp conversion in API layer
Improvements
- Enhanced schedule generation robustness by ensuring calendar entries exist before attempting to generate schedules
- Added automatic calendar entry creation for any missing dates during schedule generation process
- Cleaned up import modal styling by removing unprofessional emojis and fixing contrast issues with yellow file upload button
- Improved schedule page layout with proper button grouping, spacing between header and content, and better department section separation
- Fixed cramped UI elements across multiple pages by adding appropriate gaps and breathing room
- Enhanced payroll export page to automatically select the most recent relevant pay period instead of defaulting to blank selection
- Fixed payroll export SQL GROUP BY error by adding missing columns to GROUP BY clause
- Added CSV export functionality to payroll export API with proper Content-Disposition headers for file downloads
- Simplified payroll export query to resolve complex recursive CTE issues causing data retrieval failures
- Added defensive programming to payroll export frontend to handle non-numeric values with Number() conversion
