Tag: pto

  • Time Clock – Daily Changelog – September 19, 2025

    Time Clock – Daily Changelog – September 19, 2025

    Daily Changelog – September 19, 2025

    Fixes

    • Fixed holiday date display issue in calendar settings where Labor Day showed as Aug 31 instead of Sep 1 by changing formatLocal() to formatDateOnlyLocal() in HolidaysSection.tsx, resolving timezone conversion error for date-only strings

    Improvements

    • Updated payroll export to include holiday_hours totals in total_holiday_hours and summed into total_hours on API api/payroll/export, improving accuracy for holiday weeks

    New

    • Added daily holiday hours generator API api/holiday-hours/generate to upsert paid holiday entries per eligible employee based on master schedules (8 or 10 hours), enabling automatic holiday population
    • Added script scripts/generate-holiday-hours.js with npm command npm run holiday:generate to trigger holiday generation via deployed app URL, allowing Heroku Scheduler or manual runs
    • Added unified time-off entries API api/time-off/entries to combine PTO requests and holiday hours into single dataset with employee names and filtering
    • Added time-off entries page time-off/entries with data table showing all vacation and holiday entries across employees, accessible from navigation menu
    • Backfilled holiday hours for Memorial Day 2025 and Labor Day 2025 for all eligible employees using deployed script

    Notes

    • Holiday generator script initially failed due to API changes not being deployed; resolved after deployment
    • Time-off entries page initially showed future empty holiday placeholders; fixed by defaulting includeCalendar=false to hide scheduled holidays until actual entries exist
  • Time Clock – Daily Changelog – September 16, 2025

    Time Clock – Daily Changelog – September 16, 2025

    Daily Changelog – September 16, 2025

    Improvements

    • Changed agent terminology from “PTO” to “vacation” throughout system prompts and interface to match company usage
    • Added confirmation step to agent time off requests – agent now presents request details for user approval before submitting
    • Improved agent response format to display natural text instead of raw JSON in conversation history
    • Enhanced agent system prompt to default to “vacation” type unless user specifies sick leave, personal time, or other types

    Fixes

    • Fixed 400+ linting violations across 70+ files by removing eslint.ignoreDuringBuilds and typescript.ignoreBuildErrors from next.config.ts
    • Replaced all Date instantiations with proper time library functions from src/lib/time.ts
    • Converted all date-fns imports to use centralized time utilities
    • Fixed TypeScript any types with proper type definitions
    • Removed unused variables and imports across codebase
    • Achieved 100% reduction in linting violations (400+ → 0)

    Notes

    • Agent now follows two-step process: confirm_time_off tool for user confirmation, then create_time_off_request after approval
    • Build process now properly enforces code quality standards and will fail on violations