@extends("admin.layouts.app") @section("title", __("admin.tickets.title")) @section("content")
@foreach(["" => "All", "open" => "Open", "answered" => "Answered", "customer-reply" => "Customer Reply", "closed" => "Closed", "on hold" => "On Hold"] as $val => $label) @php $isActive = (request("status","") == $val); @endphp $val]) }}" style="display:inline-block;padding:8px 16px;font-size:13px;text-decoration:none;color:{{ $isActive ? "#1a4d80" : "#666" }};font-weight:{{ $isActive ? "700" : "400" }};border-bottom:{{ $isActive ? "3px solid #1a4d80" : "3px solid transparent" }};margin-bottom:-1px;"> {{ $label }} @endforeach
@forelse($tickets as $ticket) @php $statusBadge = match(strtolower($ticket->status ?? "")) { "open" => "badge-open", "answered" => "badge-answered", "customer-reply" => "badge-customer-reply", "closed" => "badge-terminated", "on hold" => "badge-suspended", "in progress" => "badge-pending", default => "badge-cancelled", }; $priorityBadge = match(strtolower($ticket->priority ?? "")) { "high", "critical" => "badge-terminated", "medium" => "badge-pending", "low" => "badge-active", default => "badge-cancelled", }; @endphp @empty @endforelse
{{ __('admin.tickets.ticket_num') }} {{ __('common.table.department') }} {{ __('common.table.subject') }} {{ __('common.table.client') }} {{ __('common.table.priority') }} {{ __('common.table.status') }} {{ __('common.table.last_reply') }}
#{{ $ticket->tid }} {{ $ticket->department->name ?? "N/A" }} {{ Str::limit($ticket->title, 55) }} {{ $ticket->client?->full_name ?? $ticket->name ?? $ticket->email }} {{ ucfirst($ticket->priority ?? "") }} {{ ucfirst($ticket->status ?? "") }} {{ $ticket->last_reply?->diffForHumans() ?? "-" }}
{{ __('admin.tickets.no_tickets') }}
{{ $tickets->withQueryString()->links() }}
@endsection