{{-- resources/views/client/tickets/show.blade.php --}} @extends('client.layouts.client') @section('title','Ticket #' . $ticket->id) @section('page-title','Ticket #' . $ticket->id) @section('client-content')
← All Tickets @if(!in_array($ticket->status,['closed']))
@csrf @method('PATCH')
@endif

{{ $ticket->subject }}

{{ ucfirst($ticket->status) }} {{ ucfirst($ticket->priority) }} @if($ticket->category){{ ucfirst($ticket->category) }}@endif Opened {{ $ticket->created_at->format('d M Y') }}
{{-- Thread --}}
{{-- Original message --}}
{{ strtoupper(substr(auth()->user()->name,0,2)) }}
{{ auth()->user()->name }} {{ $ticket->created_at->format('d M Y, H:i') }} You
{{ $ticket->body }}
{{-- Replies --}} @foreach($ticket->replies as $reply)
{{ strtoupper(substr($reply->author?->name ?? 'K', 0, 2)) }}
{{ $reply->is_staff ? ($reply->author?->name ?? 'KiruDev Team') : auth()->user()->name }} {{ $reply->created_at->format('d M Y, H:i') }} @if($reply->is_staff) KiruDev Support @endif
{{ $reply->body }}
@endforeach
{{-- Reply form --}} @if(!in_array($ticket->status,['closed']))
@csrf
@else
This ticket is closed.
@endif
@endsection