{{ 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))
@endif
@endforeach
@if($ticket->status !== 'closed')