## Why Resource planning is only effective when planned allocations can be compared against actual hours worked. Without actuals tracking, managers cannot identify estimation errors, understand team utilization, or improve future planning accuracy. This capability completes the core monthly workflow: plan → allocate → track actuals → compare. ## What Changes - **New**: Actuals tracking page with Cartesian grid (projects × team members) - **New**: API endpoints for CRUD operations on actuals - **New**: Variance calculation comparing allocated vs actual hours with indicators - **New**: Month-by-month navigation for historical actuals review - **New**: Filtering by projects, team members, and inactive status - **New**: Support for untracked actuals (external team time) - **New**: Validation preventing logging to completed/cancelled projects - **New**: Validation preventing logging to future months ## Capabilities ### New Capabilities - `actuals-grid`: Cartesian grid view displaying projects vs team members with allocated hours, actual hours, and variance indicators - `actuals-logging`: Ability to log, update, and delete actual hours for project-member-month combinations - `actuals-variance`: Calculation and display of variance percentages with color-coded indicators (green/yellow/red/gray) ### Modified Capabilities - None - this is a new feature with no requirement changes to existing capabilities ## Impact **Frontend:** - New route: `/actuals` with full page implementation - New service: `actualsService.ts` for API communication - New types: `Actual`, `ActualGridItem`, variance-related interfaces **Backend:** - New controller: `ActualController` with index/store/show/update/destroy - New service: `ActualsService` for variance calculation - New model: `Actual` with relationships to Project and TeamMember - New migration: `actuals` table with `notes` field added later **Database:** - `actuals` table: id, project_id, team_member_id, month, hours_logged, notes **Business Rules:** - Cannot log hours to projects with status Done/Cancelled/Closed - Cannot log hours for future months - Hours are additive when logging to existing actuals (accumulates) - Variance indicator thresholds: green (±5%), yellow (±20%), red (>20%)