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:
41
backend/app/Http/Controllers/Api/RolesController.php
Normal file
41
backend/app/Http/Controllers/Api/RolesController.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\RoleResource;
|
||||
use App\Models\Role;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/**
|
||||
* @group Roles
|
||||
*
|
||||
* Endpoints for managing roles.
|
||||
*/
|
||||
class RolesController extends Controller
|
||||
{
|
||||
/**
|
||||
* List all roles
|
||||
*
|
||||
* Get a list of all available roles for team members.
|
||||
*
|
||||
* @authenticated
|
||||
*
|
||||
* @response 200 {
|
||||
* "data": [
|
||||
* {
|
||||
* "id": 1,
|
||||
* "name": "Frontend Dev",
|
||||
* "description": "Frontend Developer - specializes in UI/UX and client-side development"
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
*/
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
$roles = Role::orderBy('name')->get(['id', 'name', 'description']);
|
||||
|
||||
return $this->wrapResource(RoleResource::collection($roles));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user