@extends('fragments.fullTemplate') @section('titulo') Mis notificaciones @endsection @section('contenido')
Historial de notificaciones
Total: {{ $estadisticas['total'] }} Sin ver: {{ $estadisticas['sin_ver'] }} Vistas: {{ $estadisticas['vistas'] }}
Limpiar
@forelse ($notificaciones_usuario as $notificacionUsuario) @php $notificacion = $notificacionUsuario->datos_notificacion; $config = $notificacion ? $notificacion->moduloConfig() : \App\Notificacion::configuracionVisualModulo(); $requiereAccion = $notificacion ? (int) $notificacion->requiere_accion === 1 : false; $textoPrincipal = $notificacion ? $notificacion->textoPrincipal() : 'Notificación no disponible.'; $mensaje = $notificacion ? $notificacion->mensajeVisual() : ''; $detalles = $notificacion ? $notificacion->detallesAdicionales() : []; $iconoImagen = $notificacion ? $notificacion->iconoModuloImagen() : null; $mensajeDetalle = isset($detalles['Mensaje']) ? trim((string) $detalles['Mensaje']) : ''; $mostrarTextoPrincipal = !($mensajeDetalle !== '' && trim((string) $textoPrincipal) === $mensajeDetalle); $contenidoHomologado = $notificacion ? $notificacion->contenidoVisualHomologado() : ['homologado' => false, 'titulo' => '', 'filas' => []]; $esInformePdfCobranza = $notificacion ? $notificacion->esInformePdfCobranza() : false; $datosInformePdfCobranza = $esInformePdfCobranza && !$contenidoHomologado['homologado'] ? $notificacion->datosVisualesInformePdfCobranza() : []; $esSolicitudReemplazoInformeCobranza = $notificacion ? $notificacion->esSolicitudReemplazoInformeCobranza() : false; $datosSolicitudReemplazoInformeCobranza = $esSolicitudReemplazoInformeCobranza && !$contenidoHomologado['homologado'] ? $notificacion->datosVisualesSolicitudReemplazoInformeCobranza() : []; $esInformeLiberadoCobranza = $notificacion ? $notificacion->esInformeLiberadoCobranza() : false; $datosInformeLiberadoCobranza = $esInformeLiberadoCobranza && !$contenidoHomologado['homologado'] ? $notificacion->datosVisualesInformeLiberadoCobranza() : []; $esInformePdfFacturacion = $notificacion ? $notificacion->esInformePdfFacturacion() : false; $datosInformePdfFacturacion = $esInformePdfFacturacion && !$contenidoHomologado['homologado'] ? $notificacion->datosVisualesInformePdfFacturacion() : []; $esBloqueNotificacionesGeneralesLineaPruebas = $notificacion ? $notificacion->esBloqueNotificacionesGeneralesLineaPruebas() : false; $datosNotificacionGeneralLineaPruebas = $esBloqueNotificacionesGeneralesLineaPruebas && !$contenidoHomologado['homologado'] ? $notificacion->datosVisualesNotificacionGeneralLineaPruebas() : []; $esNotificacionManualAlmacen = $notificacion ? $notificacion->esNotificacionManualAlmacen() : false; $datosNotificacionManualAlmacen = $esNotificacionManualAlmacen && !$contenidoHomologado['homologado'] ? $notificacion->datosVisualesNotificacionManualAlmacen() : []; $esNotificacionBancos = $notificacion ? $notificacion->moduloNamespace() === 'bancos' : false; $filasHomologadas = collect($contenidoHomologado['filas']); $generadoPorHomologado = $filasHomologadas ->first(function ($fila) { return isset($fila['label']) && $fila['label'] === 'Generado por'; }); $fechaHoraHomologada = $filasHomologadas ->first(function ($fila) { return isset($fila['label']) && $fila['label'] === 'Fecha y hora'; }); $fechaHistorial = $esNotificacionBancos ? ($notificacion ? $notificacion->fechaVisual(false) : 'Sin fecha') : ($fechaHoraHomologada ? $fechaHoraHomologada['value'] : ($notificacion ? $notificacion->fechaVisual(false) : 'Sin fecha')); @endphp @empty @endforelse
Módulo Tipo de notificación Mensaje Generado por Fecha Estado Acción
@if ($iconoImagen) {{ $notificacion ? $notificacion->moduloLabel() : 'General' }} @else @endif {{ $notificacion ? $notificacion->moduloLabel() : 'General' }} {{ $contenidoHomologado['titulo'] ?: 'Notificación del sistema' }} @if ($esNotificacionBancos) {{-- El historial oculta el contenido bancario sensible. --}}
Esta notificación contiene información sensible del módulo Bancos.
Para consultar el detalle y realizar las acciones correspondientes, ingrese al módulo Bancos.
@elseif ($contenidoHomologado['homologado']) {{-- El historial usa el mismo contenido sin repetir sus columnas. --}} @foreach ($contenidoHomologado['filas'] as $filaHomologada) @if (!in_array($filaHomologada['label'], ['Generado por', 'Fecha y hora'], true))
{{ $filaHomologada['label'] }}: @if (!empty($filaHomologada['href'])) {{ $filaHomologada['value'] }} @else {{ $filaHomologada['value'] }} @endif
@endif @endforeach @elseif ($esInformePdfCobranza)
No. de informe: @if (!empty($datosInformePdfCobranza['url_pdf'])) {{ $datosInformePdfCobranza['numero_informe'] }} @else {{ $datosInformePdfCobranza['numero_informe'] }} @endif
@elseif ($esSolicitudReemplazoInformeCobranza)
Mensaje: {{ $notificacion->mensajeVisual() }}
No. de informe: {{ $datosSolicitudReemplazoInformeCobranza['numero_informe'] }}
@elseif ($esInformeLiberadoCobranza)
Mensaje: {{ $notificacion->mensajeVisual() }}
@elseif ($esInformePdfFacturacion)
No. de informe: @if (!empty($datosInformePdfFacturacion['url_pdf'])) {{ $datosInformePdfFacturacion['numero_informe'] }} @else {{ $datosInformePdfFacturacion['numero_informe'] }} @endif
@elseif ($esNotificacionManualAlmacen)
Mensaje: {{ $datosNotificacionManualAlmacen['mensaje'] }}
No. de informe: {{ $datosNotificacionManualAlmacen['numero_informe'] }}
@elseif ($esBloqueNotificacionesGeneralesLineaPruebas) @if ($notificacion->esNotificacionGeneralLineaPruebas() && trim((string) $datosNotificacionGeneralLineaPruebas['mensaje']) !== '')
Mensaje: {{ $datosNotificacionGeneralLineaPruebas['mensaje'] }}
@endif
No. de informe: {{ $datosNotificacionGeneralLineaPruebas['numero_informe'] }}
@else @if ($mostrarTextoPrincipal)
{{ $textoPrincipal }}
@endif @if ($mensaje !== '' && $mensaje !== $textoPrincipal && $mensaje !== $mensajeDetalle)
Mensaje: {{ $mensaje }}
@endif @if (!empty($detalles))
    @foreach ($detalles as $label => $value) @if (strpos((string) $label, '__texto_') === 0)
  • {{ $value }}
  • @else
  • {{ $label }}: {{ $value }}
  • @endif @endforeach
@endif @endif
{{ $generadoPorHomologado ? $generadoPorHomologado['value'] : ($notificacion ? $notificacion->generadoPorNombre() : 'Sistema') }} {{ $fechaHistorial }} @if ($notificacionUsuario->estaVista()) Visto @else Sin ver @endif @if ($notificacion) {{ ($esInformePdfCobranza || $esSolicitudReemplazoInformeCobranza || $esInformeLiberadoCobranza || $esInformePdfFacturacion || $esNotificacionManualAlmacen || $esBloqueNotificacionesGeneralesLineaPruebas) ? 'Ver detalles' : 'Ver detalle' }} @endif
No hay notificaciones para los filtros seleccionados.
@if ($notificaciones_usuario->total() > 0)
Mostrando {{ $notificaciones_usuario->firstItem() }} a {{ $notificaciones_usuario->lastItem() }} de {{ $notificaciones_usuario->total() }} registros
{{ $notificaciones_usuario->links('pagination::bootstrap-4') }}
@endif
Atrás
@endsection