@php $totalNormales = $total - $totalCriticas; $criticas = $notificaciones->where('prioridad', 'critica')->values(); $normales = $notificaciones->where('prioridad', 'normal')->groupBy('modulo'); @endphp {{-- Preheader: visible en bandeja antes de abrir --}}
{{ $total }} notificaciones pendientes{{ $totalCriticas > 0 ? ' · ' . $totalCriticas . ' críticas requieren atención inmediata' : '' }}. Resumen del {{ $fecha }}.
{{-- HEADER --}} {{-- FRASE RESUMEN --}} {{-- STATS --}} {{-- SECCIÓN CRÍTICAS --}} @if($criticas->count() > 0) @foreach($criticas as $notif) @endforeach {{-- Divisor --}} @endif {{-- RESTO DE PENDIENTES (normales agrupadas por módulo) --}} @if($normales->count() > 0) @foreach($normales as $modulo => $items) @endforeach @endif {{-- NOTA AL PIE --}} {{-- FOOTER OSCURO --}} {{-- Sub-footer --}}