feat(backend): enhance allocation and project management
Update controllers and services for allocation fidelity: - AllocationController: variance data in responses, bulk operations - ProjectController: include plan data in responses - ProjectMonthPlanController: planning grid API - AllocationMatrixService: support untracked allocations - ProjectResource/TeamMemberResource: include reconciliation data Improved test coverage for allocation flows.
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Models\Project;
|
||||
use App\Models\Role;
|
||||
use App\Models\TeamMember;
|
||||
use App\Services\AllocationMatrixService;
|
||||
use App\Services\VarianceCalculator;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -24,11 +25,11 @@ class AllocationCacheInvalidationTest extends TestCase
|
||||
Allocation::factory()->create([
|
||||
'project_id' => $project->id,
|
||||
'team_member_id' => $teamMember->id,
|
||||
'month' => '2026-02',
|
||||
'month' => '2026-02-01',
|
||||
'allocated_hours' => 40,
|
||||
]);
|
||||
|
||||
$matrixService = new AllocationMatrixService;
|
||||
$matrixService = new AllocationMatrixService(new VarianceCalculator);
|
||||
$result = $matrixService->getMatrix('2026-02');
|
||||
|
||||
$this->assertArrayHasKey('allocations', $result);
|
||||
|
||||
Reference in New Issue
Block a user