@extends('voyager::master') @section('content')

{{ $ticket->title }} #{{ $ticket->id }}

Usuario: {{ $ticket->user->name ?? $ticket->user->email ?? 'Desconocido' }}

Categoría: {{ $ticket->category->name ?? 'General' }}

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


{!! nl2br(e($ticket->description)) !!}

@if($ticket->attachments)
@foreach($ticket->attachments as $att) Adjunto @endforeach
@endif

Conversación

@forelse($ticket->messages as $msg)
{{ $msg->type == 'support' ? 'Agente de Soporte' : 'Usuario' }}
{!! nl2br(e($msg->message)) !!}
@if($msg->attachments)
@foreach($msg->attachments as $att) Archivo @endforeach
@endif
{{ $msg->created_at->format('M d, h:i A') }}
@empty

No hay mensajes aún.

Inicia la conversación abajo.

@endforelse

@if($ticket->status != 'closed')
@csrf
@else
Este ticket está cerrado. La respuesta está deshabilitada.
@endif
@php $statusLabels = [ 'waiting' => ['class' => 'waiting', 'text' => 'En Espera'], 'in_progress' => ['class' => 'in_progress', 'text' => 'En Progreso'], 'closed' => ['class' => 'closed', 'text' => 'Cerrado'], ]; $currentStatus = $statusLabels[$ticket->status] ?? ['class' => 'default', 'text' => $ticket->status]; @endphp

Estado Actual

{{ $currentStatus['text'] }}

Plataforma: {{ ucfirst($ticket->platform) }}

@if(in_array(Auth::user()->role_id, [1, 4]))

Gestión

@csrf

@if($ticket->status != 'in_progress')
@csrf
@endif @if($ticket->status != 'closed')
@csrf
@endif
@csrf @method('DELETE')
@endif
@endsection