M3 Integration fixes

This commit is contained in:
Mark Gregory
2026-09-21 10:14:57 +01:00
parent 4af997c465
commit 6d60cbff84
5853 changed files with 79032 additions and 1825 deletions
+8 -7
View File
@@ -17,6 +17,8 @@ use Modules\Helpdesk\Services\WorkflowNotificationService;
final class KanbanBoard extends Component
{
private const OWNER_RELATION = self::OWNER_RELATION;
public ?int $board_id = null;
public int $refreshNonce = 0;
@@ -98,7 +100,7 @@ final class KanbanBoard extends Component
public function moveTicketToBoard(int|string $ticketId, int|string|null $boardId, WorkflowNotificationService $workflow): void
{
$ticket = Ticket::query()->with('board')->visibleTo(Auth::user())->findOrFail((int) $ticketId);
$board = KanbanBoardModel::query()->with(['statuses', 'owner:id,name,email'])->findOrFail((int) $boardId);
$board = KanbanBoardModel::query()->with(['statuses', self::OWNER_RELATION])->findOrFail((int) $boardId);
$oldBoardName = $ticket->board?->name ?? 'No board';
$this->authorize('update', $ticket);
@@ -156,8 +158,7 @@ final class KanbanBoard extends Component
*/
public function selectBoard(int|string|null $value): void
{
$this->board_id = is_numeric($value) ? (int) $value : null;
$this->refreshBoard();
$this->updatedBoardId($value);
}
/**
@@ -166,7 +167,7 @@ final class KanbanBoard extends Component
public function render(): View
{
$boards = KanbanBoardModel::query()
->with(['statuses', 'owner:id,name,email'])
->with(['statuses', self::OWNER_RELATION])
->orderBy('sort_order')
->orderBy('name')
->get();
@@ -176,10 +177,10 @@ final class KanbanBoard extends Component
if ($board instanceof KanbanBoardModel && $board->statuses->isEmpty()) {
$this->ensureBoardHasStatuses($board);
$board->load(['statuses', 'owner:id,name,email']);
$board->load(['statuses', self::OWNER_RELATION]);
$boards = KanbanBoardModel::query()
->with(['statuses', 'owner:id,name,email'])
->with(['statuses', self::OWNER_RELATION])
->orderBy('sort_order')
->orderBy('name')
->get();
@@ -206,7 +207,7 @@ final class KanbanBoard extends Component
}
return Ticket::query()
->with(['user:id,name,email', 'owner:id,name,email', 'agent:id,name,email', 'status', 'priority', 'category', 'project', 'team', 'product', 'tags', 'checklistItems', 'board'])
->with(['user:id,name,email', self::OWNER_RELATION, 'agent:id,name,email', 'status', 'priority', 'category', 'project', 'team', 'product', 'tags', 'checklistItems', 'board'])
->visibleTo(Auth::user())
->where('board_id', $board->id)
->latest('last_activity_at')