@extends('layouts.app') @section('title', 'Detalle de Notificación') @section('content')

Detalle de Notificación #{{ $notificacion->id }}

Volver @php $num = preg_replace('/[^0-9]/', '', $notificacion->destinatario); if (!str_starts_with($num, '591')) { $num = '591' . $num; } $waUrl = 'https://wa.me/' . $num . '?text=' . urlencode($notificacion->mensaje); @endphp Abrir en WhatsApp @if($notificacion->estado === 'pendiente') @elseif($notificacion->estado === 'fallido') @endif
Información principal
Cliente:
{{ $notificacion->cliente->nombre ?? 'N/A' }}
Teléfono:
{{ $notificacion->destinatario }}
Tipo:
{{ \App\Models\Notificacion::TIPOS[$notificacion->tipo] ?? $notificacion->tipo }}
Canal:
{{ \App\Models\Notificacion::CANALES[$notificacion->canal] ?? $notificacion->canal }}
Prioridad:
@php $prioridadClass = match($notificacion->prioridad) { 'urgente' => 'bg-danger', 'alta' => 'bg-warning', 'normal' => 'bg-info', 'baja' => 'bg-secondary', default => 'bg-light' }; @endphp {{ \App\Models\Notificacion::PRIORIDADES[$notificacion->prioridad] ?? $notificacion->prioridad }}
Estado:
@php $badgeClass = match($notificacion->estado) { 'pendiente' => 'bg-warning', 'enviado' => 'bg-success', 'fallido' => 'bg-danger', 'cancelado' => 'bg-secondary', default => 'bg-light' }; @endphp {{ \App\Models\Notificacion::ESTADOS[$notificacion->estado] ?? $notificacion->estado }}
Intentos:
{{ $notificacion->intentos }}
Enviado en:
{{ $notificacion->enviado_at ? $notificacion->enviado_at->format('d/m/Y H:i') : '—' }}
Mensaje
{{ $notificacion->titulo }}
{{ $notificacion->mensaje }}
Datos adicionales
@if(is_array($notificacion->datos_adicionales) && count($notificacion->datos_adicionales))
    @foreach($notificacion->datos_adicionales as $k => $v)
  • {{ \Illuminate\Support\Str::title(str_replace('_', ' ', $k)) }} {{ is_array($v) ? json_encode($v) : (string) $v }}
  • @endforeach
@else Sin datos adicionales @endif
@if($notificacion->error_mensaje)
Último error
{{ $notificacion->error_mensaje }}
@endif
@endsection