@extends('layouts.support') @section('title', 'Ticket #' . $ticket->id) @section('page_title', 'Ticket #' . $ticket->id) @section('page_subtitle', Str::limit($ticket->subject, 60)) @section('content')
Back {{ $ticket->status }} {{ $ticket->priority }} priority @if($ticket->escalated_to_admin) Escalated to Admin @endif
@csrf

{{ $ticket->subject }}

{{ $ticket->user->name }} {{ $ticket->created_at->diffForHumans() }}
{!! nl2br(e($ticket->message)) !!}
@foreach($ticket->replies as $reply)
{{ $reply->user->name }}@if($reply->is_admin) (Staff)@endif {{ $reply->created_at->diffForHumans() }}
{!! nl2br(e($reply->message)) !!}
@endforeach
@csrf
@if($ticket->escalated_to_admin)
Admin ko bheja gaya

{{ $ticket->escalation_reason }}

{{ $ticket->escalatedBy?->name }} ยท {{ $ticket->escalated_at?->diffForHumans() }}
@endif

Customer

{{ strtoupper(substr($ticket->user->name, 0, 1)) }}
{{ $ticket->user->name }}
{{ $ticket->user->email }}
Full Data @if(auth()->user()->hasAdminRole('admin')) Admin Profile @endif
Status{{ $userContext['user']['status'] }}
Orders{{ $userContext['stats']['orders'] }}
Open Tickets{{ $userContext['stats']['open_tickets'] }}
Phone{{ $userContext['user']['phone'] ?? 'N/A' }}
@if($ticket->order) @endif

Ticket Info

Category{{ $ticket->category }}
Assigned{{ $ticket->assignedAgent?->name ?? 'Unassigned' }}
Created{{ $ticket->created_at->format('d M Y') }}
@if(!$ticket->escalated_to_admin)
@endif
@if(count($userContext['orders']))

Recent Orders

@include('support.partials.recent-orders-list', ['orders' => collect($userContext['orders'])->take(4)->all()])
@endif
@endsection @push('scripts') @endpush