@extends('layouts.app') @section('title', 'WHMCS Admin - Support Tickets') @section('page-title', 'View Ticket') @section('breadcrumb') Dashboard Support/View Ticket @endsection @push('styles') @endpush @section('content')
Ticket #{{ $ticket->id }}
{{ ucfirst($ticket->status) }}
Subject: {{ $ticket->subject }}

Created At: {{ $ticket->created_at->format('d M, Y h:i A') }}

@if ($ticket->user)

Submitted By: {{ $ticket->user->name }} ({{ $ticket->user->email }})

@endif
Description:

{{ $ticket->description }}

@if ($ticket->attachments && is_array($ticket->attachments))
Attachments:
@endif
@foreach ($ticket->replies as $reply) @php $isSelf = $reply->user_id === auth()->id(); $name = $reply->user->name ?? 'Staff'; $avatarInitials = collect(explode(' ', $name)) ->map(fn($word) => strtoupper(substr($word, 0, 1))) ->join(''); @endphp
@if (!$isSelf)
{{ $avatarInitials }}
@endif
{{ $reply->message }}
@if ($reply->attachments && is_array($reply->attachments))
@foreach ($reply->attachments as $file) 📎 {{ basename($file) }} @endforeach
@endif {{ $name }} • {{ $reply->created_at->diffForHumans() }}
@if ($isSelf)
{{ $avatarInitials }}
@endif
@endforeach
@if ($ticket->status !== 'closed')
@csrf
@endif
@endsection @push('scripts') @endpush