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 ?>