{{-- HEADER --}}
←
EMI CREDITS
Support Ticket
{{-- TICKET --}}
{{ $ticket->subject }}
Ticket #{{ $ticket->id }} · {{ $ticket->created_at?->format('d M Y, h:i A') }}
@php $status = strtolower($ticket->status ?? 'open'); @endphp
{{ ucfirst($status) }}
{{-- MESSAGES --}}
{{-- Original ticket message --}} @if(!empty($ticket->message))
You
{!! nl2br(e($ticket->message)) !!}
{{ $ticket->created_at?->format('d M Y, h:i A') }}
@endif {{-- Replies --}} @if(isset($ticket->messages) && $ticket->messages->count()) @foreach($ticket->messages as $message) @php $isClient = false; if (isset($message->user_id)) { $isClient = $message->user_id == auth()->id(); } if (isset($message->sender_type)) { $isClient = strtolower($message->sender_type) === 'client'; } @endphp
{{ $isClient ? 'You' : 'Support Team' }}
{!! nl2br(e($message->message ?? '')) !!}
{{ $message->created_at?->format('d M Y, h:i A') }}
@endforeach @endif
{{-- REPLY --}} @if($status !== 'closed')
Reply to Support
@csrf
{{ old('message') }}
@error('message')
{{ $message }}
@enderror
Send Reply
@else
This support ticket has been closed. You cannot send new replies to this ticket.
@endif
{{-- EXISTING CLIENT BOTTOM NAV --}} @include('client.partials.bottom-nav')