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.
24 lines
672 B
PHP
24 lines
672 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
class TeamMemberResource extends BaseResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*/
|
|
public function toArray($request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'name' => $this->name,
|
|
'role_id' => $this->role_id,
|
|
'role' => $this->whenLoaded('role', fn () => new RoleResource($this->role)),
|
|
'hourly_rate' => $this->formatDecimal($this->hourly_rate),
|
|
'active' => $this->active,
|
|
'created_at' => $this->formatDate($this->created_at),
|
|
'updated_at' => $this->formatDate($this->updated_at),
|
|
];
|
|
}
|
|
}
|