{{-- Descripción original --}}
Descripción
{{ $ticket->descripcion }}
@if($ticket->adjuntos->count())
Adjuntos: @foreach($ticket->adjuntos as $adj) {{ $adj->nombre_original }}@if(!$loop->last), @endif @endforeach
@endif {{-- Datos de cierre --}} @if($ticket->estado === 'cerrado')
Datos de Cierre
@if($ticket->comentario_cierre) @endif
Motivo: {{ $ticket->motivo_cierre ? $ticket->motivo_cierre->nombre : '-' }} Cerrado: {{ $ticket->cerrado_at ? \Carbon\Carbon::parse($ticket->cerrado_at)->format('d/m/Y H:i') : '-' }}
Comentario: {{ $ticket->comentario_cierre }}
@endif {{-- Conversación --}} @if($ticket->mensajes->count())
Conversación ({{ $ticket->mensajes->count() }} mensajes)
@foreach($ticket->mensajes as $msg) @php $esAdmin = $msg->user_id != $ticket->user_id; $clase = $msg->es_nota_interna ? 'msg-nota' : ($esAdmin ? 'msg-soporte' : 'msg-cliente'); $tipo = $msg->es_nota_interna ? 'Nota interna' : ($esAdmin ? 'Soporte' : 'Cliente'); @endphp
{{ $msg->autor_nombre ?? 'Usuario' }} ({{ $tipo }}) {{ \Carbon\Carbon::parse($msg->created_at)->format('d/m/Y H:i') }}
{{ $msg->mensaje }}
@if($msg->adjuntos && $msg->adjuntos->count())
Adjuntos: @foreach($msg->adjuntos as $adj) {{ $adj->nombre_original }}@if(!$loop->last), @endif @endforeach
@endif
@endforeach
@endif {{-- Historial de actividad --}} @if($ticket->logs->count())
Historial de Actividad
@foreach($ticket->logs as $log) @endforeach
Fecha/Hora Usuario Acción Detalle
{{ \Carbon\Carbon::parse($log->created_at)->format('d/m/Y H:i') }} {{ $log->creado_por }} {{ $accionLabels[$log->accion] ?? $log->accion }} @if($log->valor_anterior && $log->valor_nuevo) {{ $log->valor_anterior }} → {{ $log->valor_nuevo }} @endif @if($log->comentario) {{ $log->comentario }} @endif
@endif