@extends('layouts.admin') @section('title', 'Ticket ' . $ticket->ticket_no) @section('content')
{{-- Header --}}
Volver a Tickets

{{ $ticket->ticket_no }} {{ $ticket->subject }}

{!! $ticket->statusBadge() !!} {!! $ticket->priorityBadge() !!} {{ ucfirst($ticket->channel) }}
@if(!in_array($ticket->status, ['resolved', 'closed'])) @else
@csrf
@endif
{{-- Client Info + SLA --}}

Cliente

{{ $ticket->visitor_name ?? '—' }}

{{ $ticket->visitor_email ?? '—' }}

{{ $ticket->visitor_phone ?? '—' }}

@if($ticket->product)

{{ $ticket->product }}

@endif

SLA

Creado: {{ $ticket->created_at->format('d/m/Y H:i') }}

@if($ticket->first_response_at)

1era respuesta: {{ $ticket->responseTime() }}

@else

Sin responder ({{ $ticket->created_at->diffForHumans() }})

@endif @if($ticket->resolved_at)

Resuelto: {{ $ticket->resolutionTime() }}

@endif {{-- Priority changer --}}
@csrf
{{-- Resolution Evidence (if closed) --}} @if($ticket->resolution_notes)

Evidencia de Cierre

{{ $ticket->resolution_notes }}

@if($ticket->resolution_attachments)
@foreach($ticket->resolution_attachments as $url) 📎 Adjunto @endforeach
@endif
@endif {{-- Description --}} @if($ticket->description)

Descripción

{{ $ticket->description }}
@endif {{-- Timeline --}}

Conversación ({{ $ticket->replies->count() }})

@forelse($ticket->replies as $reply)
{{ $reply->author_type === 'admin' ? '👤 ' : ($reply->author_type === 'system' ? '⚙️ ' : '🙋 ') }} {{ $reply->author_name ?? ucfirst($reply->author_type) }} @if($reply->is_internal) (nota interna) @endif {{ $reply->created_at->format('d/m H:i') }}

{{ $reply->content }}

@if($reply->attachments)
@foreach($reply->attachments as $att) @if(str_starts_with($att['mime'] ?? '', 'image/')) {{ $att['name'] }} @elseif(str_starts_with($att['mime'] ?? '', 'video/')) @else {{ $att['name'] }} ({{ number_format(($att['size'] ?? 0) / 1024) }}KB) @endif @endforeach
@endif
@empty
Sin respuestas aún
@endforelse
{{-- Reply Form --}} @if(!in_array($ticket->status, ['resolved', 'closed']))
@csrf

Responder

@endif
{{-- Close Modal --}} @endsection