{{ __('Admin') }} {{ __('Support inbox') }}
{{ __('Admin · Support · Inbox') }}

{{ __('Support') }} {{ __('inbox') }}

{{ __('Every customer ticket lands here. Click a row to open the thread, reply, assign, or change priority.') }}

@if (session('success'))
{{ session('success') }}
@endif
@foreach ([ ['Open', $kpi['open'], 'wa-green/40'], ['Unassigned', $kpi['unassigned'], 'accent-coral/40'], ['Resolved 24h', $kpi['resolved_24h'], 'paper-200'], ['All-time', $kpi['total'], 'paper-200'], ] as [$label, $val, $border])
{{ $label }}
{{ $val }}
@endforeach
@if ($status || $priority || $agent || $q) {{ __('Clear') }} @endif
@forelse ($tickets as $t) @php $prCls = ['urgent'=>'bg-accent-coral/15 text-accent-coral border-accent-coral/30','high'=>'bg-accent-amber/15 text-accent-amber border-accent-amber/30','normal'=>'bg-paper-100 text-ink-700 border-paper-200','low'=>'bg-paper-50 text-ink-500 border-paper-200'][$t->priority] ?? ''; $stCls = ['open'=>'bg-accent-amber/15 text-accent-amber','in_progress'=>'bg-wa-bubble text-wa-deep','pending'=>'bg-accent-coral/10 text-accent-coral','resolved'=>'bg-wa-mint text-wa-deep','closed'=>'bg-paper-100 text-ink-600'][$t->status] ?? ''; @endphp @empty @endforelse
{{ __('When') }} {{ __('Subject / Customer') }} {{ __('Priority') }} {{ __('Status') }} {{ __('Assignee') }}
{{ optional($t->created_at)->format('M j') }}
{{ optional($t->created_at)->format('H:i') }}
{{ $t->subject ?: '(no subject)' }}
#{{ $t->ticket_number }} · {{ $t->name ?: $t->email }}
{{ $t->priority }} {{ str_replace('_', ' ', $t->status) }} @if ($t->assigned_agent_id) {{ ($agentUsers[$t->assigned_agent_id] ?? null)?->name ?? 'User #' . $t->assigned_agent_id }} @else {{ __('unassigned') }} @endif {{ __('Open →') }}
{{ __('No tickets match the current filters.') }}
{{ $tickets->links() }}
{{-- Slide-in detail panel. Each action is a tiny inline form posting to the matching route. After submit the page reloads with ?open={id} so the panel re-opens on the same ticket — no SPA / AJAX layer needed. --}} @php $openId = (int) request('open', 0); @endphp