From 83e56e35e0b69f826a0e8b277d9d2886b8025881 Mon Sep 17 00:00:00 2001 From: = Date: Mon, 22 Jun 2026 08:43:23 +0000 Subject: [PATCH] Refactor: simplify ticket role checks and remove redundant debug calls --- resources/views/pages/tickets/⚡index.blade.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/resources/views/pages/tickets/⚡index.blade.php b/resources/views/pages/tickets/⚡index.blade.php index 5cd7c4d..19da1ca 100644 --- a/resources/views/pages/tickets/⚡index.blade.php +++ b/resources/views/pages/tickets/⚡index.blade.php @@ -112,7 +112,6 @@ public function mount(): void if ($this->ticketParam && (int) $this->ticketParam > 0) { $this->showTicket((int) $this->ticketParam); } - ds($this->appId); } /** @@ -141,17 +140,12 @@ public function rendering(): void public function tickets(): PaginatedDataCollection { $user = auth()->user(); - if (!$user) { - return TicketListData::collect(collect(), PaginatedDataCollection::class); - } - $search = trim($this->search); $search = empty($search) ? null : $search; - if ($user->hasRole('Admin') || $user->hasRole('admin') || $user->can(TicketPermissionEnum::Read->value)) { + if ($user->hasRole(DefaultUserRole::Admin) || $user->can(TicketPermissionEnum::Read->value)) { return $this->ticketService->getList($search, $this->statusFilter, 10); } - return $this->ticketService->getListForUser($user->id, $search, $this->statusFilter, 10); } @@ -523,7 +517,7 @@ public function toggleDrawer(): void ?>
- @if(!auth()->user()->hasRole('Admin') && !auth()->user()->hasRole('admin') && $this->eligibleApps->isEmpty()) + @if(!auth()->user()->hasRole(DefaultUserRole::Admin) && $this->eligibleApps->isEmpty()) You do not currently have any active services expiring within 3 days. You can still submit a general inquiry ticket without choosing a service. @@ -681,8 +675,6 @@ class="w-11/12 md:w-5/12 p-6 bg-white" searchable option-value="id" /> - @ds($appsSearchable) -