@extends('layouts.app') @section('header', 'Detalle del Ticket') @section('content')

{{ $ticket->ticket_number ?? 'CRM-2025-001' }}

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

@php $estado = $ticket->estado ?? 'Recibida'; $estadoColors = [ 'Recibida' => 'bg-gray-100 text-gray-800', 'En revisión técnica' => 'bg-blue-100 text-blue-800', 'En evaluación del comité' => 'bg-purple-100 text-purple-800', 'Aprobada / Pendiente de presupuesto' => 'bg-indigo-100 text-indigo-800', 'En desarrollo' => 'bg-yellow-100 text-yellow-800', 'En pruebas' => 'bg-orange-100 text-orange-800', 'En confirmación del comité' => 'bg-pink-100 text-pink-800', 'Cerrada' => 'bg-green-100 text-green-800', 'Rechazada / En espera' => 'bg-red-100 text-red-800', ]; $colorClass = $estadoColors[$estado] ?? 'bg-gray-100 text-gray-800'; @endphp {{ $estado }}

Solicitante

{{ $ticket->solicitante_nombre ?? 'Juan Pérez' }}

{{ $ticket->solicitante_email ?? 'juan@example.com' }}

{{ $ticket->area_solicitante ?? 'Ventas' }}

Tipo de Solicitud

{{ $ticket->tipo_solicitud ?? 'Correctivo' }}

Prioridad

@php $prioridad = $ticket->prioridad ?? 'Media'; @endphp @if($prioridad === 'Alta') Alta @elseif($prioridad === 'Media') Media @else Baja @endif

Impacto

{{ $ticket->impacto ?? 'Medio' }}

@if(isset($ticket->responsable))

Responsable

{{ $ticket->responsable->name }}

@endif
@if(isset($ticket->fecha_estimada))

Fecha Estimada

{{ \Carbon\Carbon::parse($ticket->fecha_estimada)->format('d/m/Y') }}

@endif

Descripción

{{ $ticket->descripcion ?? 'Descripción del ticket...' }}

@if(isset($ticket->observaciones) && $ticket->observaciones)

Observaciones

{{ $ticket->observaciones }}

@endif
@if(in_array(auth()->user()->role, ['tech', 'committee', 'admin']))
@csrf @method('PATCH')
@if(auth()->user()->role === 'tech' || auth()->user()->role === 'admin')
--}}
@endif
@endif

Historial de Cambios

    @forelse($history ?? [] as $index => $item)
  • @if(!$loop->last) @endif
    {{--

    {{ $item->accion }}

    {{ $item->user->name }} - {{ $item->created_at->diffForHumans() }}

    @if($item->comentario)

    {{ $item->comentario }}

    @endif --}}
  • @empty
  • No hay historial disponible
  • @endforelse

Comentarios

@forelse($comments ?? [] as $comment)
{{-- {{ strtoupper(substr($comment->user->name ?? 'U', 0, 1)) }} --}}
{{--

{{ $comment->user->name ?? 'Usuario' }}

{{ $comment->created_at->diffForHumans() ?? 'Hace 1 hora' }}

{{ $comment->comentario ?? 'Comentario de ejemplo' }}

--}}
@empty

No hay comentarios aún

@endforelse
{{--
@csrf
--}}
@endsection