@extends('layouts.app') @section('title', 'Alertas del Sistema') @section('page-title', 'Alertas y Notificaciones') @section('breadcrumb') @endsection @push('styles') @endpush @section('content')
{{-- Estadísticas --}}

{{ $estadisticas['criticas'] }}

Alertas Críticas

{{ $estadisticas['activas'] }}

Alertas Activas

{{ $estadisticas['en_proceso'] }}

En Proceso

{{ $estadisticas['resueltas_hoy'] }}

Resueltas Hoy
{{-- Resumen por tipo --}} @if(count($estadisticas['por_tipo']) > 0)
@foreach($estadisticas['por_tipo'] as $tipo => $count) {{ $tiposAlerta[$tipo] ?? $tipo }} {{ $count }} @endforeach
@endif {{-- Filtros --}}
Limpiar
{{-- Listado de alertas --}} @forelse($alertas as $alerta)
@switch($alerta->tipo_alerta) @case('NO_INICIO_11AM') @break @case('SIN_MOVIMIENTO') @break @case('GPS_PERDIDO') @break @case('PEND_APROBACION') @break @case('CHECKLIST_INCOMPLETO') @break @case('FOTOS_INSUFICIENTES') @break @default @endswitch
{{ $alerta->titulo }}
{{ $tiposAlerta[$alerta->tipo_alerta] ?? $alerta->tipo_alerta }}
{{ $alerta->prioridad }} {{ str_replace('_', ' ', $alerta->estado) }}
{{ $alerta->mensaje }}
@if($alerta->programacion)
{{ $alerta->programacion->centro->nombre_centro ?? 'N/A' }}
@endif @if($alerta->usuarioAfectado)
{{ $alerta->usuarioAfectado->usu_nombre }} {{ $alerta->usuarioAfectado->usu_apellido }}
@endif
{{ $alerta->fecha_genera ? $alerta->fecha_genera->format('d/m/Y H:i') : 'N/A' }}
@empty

Sin alertas pendientes

No hay alertas activas en este momento.

@endforelse {{-- Paginación --}} @if($alertas->hasPages())
{{ $alertas->links() }}
@endif
@endsection