@php $statusChip = [ 'open' => 'bg-blue-500/15 text-blue-400', 'answered' => 'bg-green-500/15 text-green-400', 'closed' => 'bg-slate-500/15 text-slate-400', ]; @endphp
{{-- Title row --}}

Support Tickets

Customer tickets from the portal — replies appear in their Support page and are emailed to them.

{{-- List --}}
@foreach (['open' => 'Open', 'answered' => 'Answered', 'closed' => 'Closed', 'all' => 'All'] as $key => $label) @endforeach
@if ($rows->count())
@foreach ($rows as $t)
#{{ $t->id }} {{ $t->subject }} {{ ucfirst($t->status) }} {{ $t->categoryLabel() }} {{ $t->created_at->diffForHumans() }}
{{ $t->user?->name ?? '—' }} · {{ $t->user?->email }}

{{ $t->message }}

@if ($t->admin_reply)
Replied {{ $t->replied_at?->diffForHumans() }}

{{ $t->admin_reply }}

@endif
@if ($t->status !== 'closed') @else @endif
@endforeach
@if ($rows->hasPages())
{{ $rows->links('pagination.dark') }}
@endif @else

{{ $status === 'open' ? 'No open tickets' : 'Nothing here' }}

{{ $status === 'open' ? 'The inbox is clear — nice.' : 'No tickets match this filter.' }}

@endif
{{-- Reply modal --}} @if ($replyingTicket)

Reply to ticket #{{ $replyingTicket->id }}

{{ $replyingTicket->user?->email }} · {{ $replyingTicket->subject }}

{{ $replyingTicket->message }}
@error('reply')

{{ $message }}

@enderror
@endif