@extends('layouts.app') @section('title', 'Ticket #' . $ticket->id . ' - Gletra Support') @section('content')
Support Desk
Back to Tickets

Ticket #{{ $ticket->id }}

@csrf
{{ $ticket->subject }}
{{ $ticket->priority }} Priority
{{-- Initial Message --}}
{{ strtoupper(substr($ticket->user->name, 0, 1)) }}
{{ $ticket->user->name }} {{ $ticket->created_at->diffForHumans() }}
{{ $ticket->message }}
{{-- Sequential Replies --}} @foreach($ticket->replies as $reply)
@if(!$reply->is_admin)
{{ strtoupper(substr($reply->user->name, 0, 1)) }}
@endif
{{ $reply->user->name }} @if($reply->is_admin) (Staff) @endif {{ $reply->created_at->diffForHumans() }}
{{ $reply->message }}
@if($reply->is_admin)
A
@endif
@endforeach
Ticket Intelligence
@if($ticket->escalated_to_admin)
Admin ko bheja gaya

{{ $ticket->escalation_reason }}

{{ $ticket->escalatedBy?->name }} ยท {{ $ticket->escalated_at?->diffForHumans() }}
@endif
{{ strtoupper(substr($ticket->user->name, 0, 1)) }}
{{ $ticket->user->name }}
{{ $ticket->user->email }}
{{ $ticket->user->role }} Full Data Profile
Account Status {{ ucfirst($userContext['user']['status']) }}
Total Orders {{ $userContext['stats']['orders'] }}
Open Tickets {{ $userContext['stats']['open_tickets'] }}
Phone {{ $userContext['user']['phone'] ?? 'N/A' }}
Member Since {{ $ticket->user->created_at->format('M Y') }}
@if($ticket->order) @endif
@if(count($userContext['orders']))
Recent Orders
@foreach($userContext['orders']->take(4) as $order)
#{{ $order['order_number'] }} {{ $order['total'] }}
{{ $order['status'] }}
@endforeach
@endif
MetaData
Classification {{ $ticket->category }}
Assigned To {{ $ticket->assignedAgent?->name ?? 'Unassigned' }}
Opening Date {{ $ticket->created_at->format('d M, Y') }}
Last Interaction {{ $ticket->updated_at->diffForHumans() }}

@if(!$ticket->escalated_to_admin)
@endif
{{-- Escalate Modal --}} @endsection