fixed missing features
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Projects;
|
||||
|
||||
use App\Models\Project;
|
||||
|
||||
class BuildProjectBoardPageProps
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function handle(
|
||||
Project $project,
|
||||
bool $canEditTickets,
|
||||
bool $canCreateTickets,
|
||||
?string $status,
|
||||
): array {
|
||||
return [
|
||||
'boardColumns' => $project->boardColumns()
|
||||
->with([
|
||||
'ticketStatuses',
|
||||
'tickets' => fn ($query) => $query
|
||||
->with([
|
||||
'ticketPriority',
|
||||
'ticketStatus.allowedTargetStatuses.boardColumn',
|
||||
'ticketStatus.boardColumn',
|
||||
'ticketType',
|
||||
]),
|
||||
])
|
||||
->get(),
|
||||
'canCreateTickets' => $canCreateTickets,
|
||||
'canEditTickets' => $canEditTickets,
|
||||
'project' => $project,
|
||||
'status' => $status,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user