- Add AllocationController with CRUD + bulk endpoints - Add AllocationValidationService for capacity/estimate validation - Add AllocationMatrixService for optimized matrix queries - Add AllocationPolicy for authorization - Add AllocationResource for API responses - Add frontend allocationService and matrix UI - Add E2E tests for allocation matrix (20 tests) - Add unit tests for validation service and policies - Fix month format conversion (YYYY-MM to YYYY-MM-01)
2.4 KiB
2.4 KiB
Why
Capacity planning today requires switching between team members one at a time in a calendar card view — too slow for a daily standup. Managers need a spreadsheet-style grid where the entire team's availability for the month is visible and editable at a glance, in under a minute.
What Changes
- Add an Expert Mode toggle to the Capacity Planning page (right-aligned on the tabs row), persisted in
localStorage. - When Expert Mode is ON, replace the per-member calendar card view with a dense planning grid: team members as rows, days-of-month as columns.
- Each cell accepts exactly one of:
H,O,0,.5,0.5,1— any other value is invalid (red on blur, submit disabled globally). HandOare interchangeable display tokens that both normalize to0for math; the frontend always preserves and displays the typed token.- Typing
0on a weekend column auto-renders asO; typing0on a holiday column auto-renders asH. - Live KPI bar above the grid shows Capacity (person-days) and Projected Revenue updating as cells change.
- Batch save: a single Submit button commits all pending changes; disabled while any invalid cell exists.
- Backend gains a new batch availability endpoint to accept multiple
{team_member_id, date, availability}entries in one request.
Capabilities
New Capabilities
capacity-expert-mode: Spreadsheet-style planning grid for bulk team availability editing with token-based input, live KPI bar, and batch save.
Modified Capabilities
capacity-planning: Existing per-member calendar and summary remain unchanged; Expert Mode is purely additive. No requirement changes to existing scenarios.
Impact
- Frontend: New
CapacityExpertGridcomponent;capacity/+page.sveltegains mode toggle + localStorage persistence;capacity.tsAPI client gains batch update function; newexpertModeStoreor localStorage util. - Backend: New
POST /api/capacity/availability/batchendpoint inCapacityController;CapacityServicegainsbatchUpsertAvailability()with consolidated cache invalidation. - No schema changes:
team_member_daily_availabilitiestable is unchanged; values stored remain0,0.5,1. - No breaking changes: Existing calendar mode, summary, holidays, and PTO tabs are unaffected.
- Tests: New unit tests for token normalization/validation; new feature test for batch endpoint; new component tests for grid and toggle.