@extends('layouts.main') @section('title', 'Support Ticket - ' . $ticket->unique_id) @section('content')

{{ $ticket->subject }}

{{ $ticket->unique_id }} {{ $ticket->status_label }} {{ $ticket->type_label }}
@if(auth()->user()->hasRole('super-admin')) @endif @if(auth()->user()->hasRole('company') && in_array($ticket->status, [2, 3])) @endif Back to List
@if(session('success')) @endif @if(session('error')) @endif
Ticket Information
Created:
{{ $ticket->created_at->format('M d, Y h:i A') }}
Last Activity:
{{ $ticket->last_activity_at->diffForHumans() }}
Customer Information
{{ $ticket->user->name }}
{{ $ticket->user->email }} @if($ticket->user->company)
{{ $ticket->user->company }} @endif
Conversation
@foreach($ticket->threads as $thread) @php $isCurrentUser = $thread->added_by === auth()->id(); $isSupport = $thread->user->hasRole('super-admin'); @endphp
{!! $thread->description !!}
@if($thread->files->count() > 0) @endif
@if(!$isCurrentUser)
@endif @if($isCurrentUser) {{ $thread->created_at->format('M d, h:i A') }} @else {{ $isSupport ? 'Support Team' : $thread->user->name }} • {{ $thread->created_at->format('M d, h:i A') }} @endif @if($isCurrentUser)
@endif
@endforeach
@if(!in_array($ticket->status, [3]) || auth()->user()->hasRole('super-admin'))
Add Reply
@csrf
@error('description')
{{ $message }}
@enderror
You can upload multiple files (JPG, PNG, PDF, ZIP only). Maximum size: 10MB per file.
@error('attachments.*')
{{ $message }}
@enderror
@endif
@endsection @section('scripts') @endsection