major ui updates

This commit is contained in:
Mark Gregory
2026-06-12 15:11:51 +01:00
parent 3c9b39d83b
commit 7bc8f20ed5
154 changed files with 3796 additions and 4117 deletions
@@ -9,13 +9,11 @@ use Modules\Helpdesk\Models\Ticket;
final class TicketPolicy
{
/** @return bool */
public function viewAny(User $user): bool
{
return true;
}
/** @return bool */
public function view(User $user, Ticket $ticket): bool
{
return (bool) ($user->helpdesk_admin ?? false)
@@ -23,25 +21,21 @@ final class TicketPolicy
|| (int) $ticket->user_id === (int) $user->id;
}
/** @return bool */
public function create(User $user): bool
{
return true;
}
/** @return bool */
public function update(User $user, Ticket $ticket): bool
{
return (bool) ($user->helpdesk_admin ?? false) || (int) $ticket->agent_id === (int) $user->id;
}
/** @return bool */
public function comment(User $user, Ticket $ticket): bool
{
return $this->view($user, $ticket);
}
/** @return bool */
public function delete(User $user, Ticket $ticket): bool
{
return (bool) ($user->helpdesk_admin ?? false);