Add application API and OpenAPI docs
linter / quality (pull_request) Successful in 1m18s
tests / ci (8.4) (pull_request) Successful in 1m28s

This commit is contained in:
2026-04-20 13:22:56 +02:00
parent 70d760e3a6
commit 8b25421e7c
80 changed files with 6908 additions and 1277 deletions
@@ -0,0 +1,26 @@
<?php
namespace App\Actions\Projects;
use App\Http\Resources\TicketStatusResource;
use App\Models\Ticket;
class BuildProjectTicketStatusTargetsPayload
{
/**
* @return array<string, mixed>
*/
public function handle(Ticket $ticket): array
{
$ticket->loadMissing('ticketStatus.allowedTargetStatuses.boardColumn');
return [
'current_status' => $ticket->ticketStatus === null
? null
: TicketStatusResource::make($ticket->ticketStatus->loadMissing('boardColumn'))->resolve(),
'target_statuses' => TicketStatusResource::collection(
$ticket->ticketStatus?->allowedTargetStatuses ?? collect(),
)->resolve(),
];
}
}