@section('page-title', 'Ticket ' . $ticket->ticket_number)
Back
@if(session('success')) @endif
{{ ucfirst($ticket->department) }}

{{ $ticket->subject }}

Submitted {{ $ticket->created_at->format('M d, Y \a\t H:i') }}
@php $statusBadge = match($ticket->status) { 'open' => 'bg-danger text-white', 'pending' => 'bg-warning text-dark', 'waiting_for_client' => 'bg-indigo text-white', 'in_progress' => 'bg-info text-dark', 'resolved' => 'bg-success text-white', 'closed' => 'bg-secondary text-white', default => 'bg-secondary text-white' }; @endphp {{ str_replace('_', ' ', ucfirst($ticket->status)) }}
@foreach($ticket->replies as $reply) @php $bubbleBg = $reply->is_staff ? 'background-color: var(--bs-tertiary-bg); border-left: 4px solid var(--bs-indigo);' : 'background-color: rgba(6, 182, 212, 0.05); border-left: 4px solid #06b6d4;'; $authorName = $reply->is_staff ? ($reply->user->name ?? 'Staff') . ' (Support)' : ($ticket->client->name ?? $ticket->guest_name ?? 'You'); @endphp
{{ $authorName }}
{{ $reply->created_at->diffForHumans() }}
{{ $reply->message }}
@if(!empty($reply->attachments))
Attachments:
@foreach($reply->attachments as $path) {{ basename($path) }} @endforeach
@endif
@endforeach
@if($ticket->status !== 'closed')
Post Reply
@csrf
@else
This ticket thread has been closed by staff. You can open a new ticket if you need further help.
@endif
Ticket Info
Ticket ID {{ $ticket->ticket_number }}
Assigned Department {{ ucfirst($ticket->department) }}
Priority Level {{ ucfirst($ticket->priority) }}
Last Activity {{ $ticket->last_reply_at->diffForHumans() }}