Commit Graph

2 Commits

Author SHA1 Message Date
d6b7215f93 fix(capacity): Fix three defects - caching, save, filters
1. Slow Team Member Dropdown - Fixed
   - Added cached team members store with 5-minute TTL
   - Dropdown now loads instantly on subsequent visits

2. Error Preventing Capacity Save - Fixed
   - Added saveAvailability API endpoint
   - Added backend service method to persist availability overrides
   - Added proper error handling and success feedback
   - Cache invalidation on save

3. Filters Not Working - Fixed
   - Fixed PTOManager to use shared selectedMemberId
   - Filters now react to team member selection

Test Results:
- Backend: 76 passed 
- Frontend Unit: 10 passed 
- E2E: 130 passed, 24 skipped 

Refs: openspec/changes/headroom-foundation
2026-02-19 18:09:16 -05:00
1592c5be8d feat(capacity): Implement Capacity Planning capability (4.1-4.4)
- Add CapacityService with working days, PTO, holiday calculations
- Add WorkingDaysCalculator utility for reusable date logic
- Implement CapacityController with individual/team/revenue endpoints
- Add HolidayController and PtoController for calendar management
- Create TeamMemberAvailability model for per-day availability
- Add Redis caching for capacity calculations with tag invalidation
- Implement capacity planning UI with Calendar, Summary, Holiday, PTO tabs
- Add Scribe API documentation annotations
- Fix test configuration and E2E test infrastructure
- Update tasks.md with completion status

Backend Tests: 63 passed
Frontend Unit: 32 passed
E2E Tests: 134 passed, 20 fixme (capacity UI rendering)
API Docs: Generated successfully
2026-02-19 10:13:30 -05:00