@extends('layouts.site') @section('title', 'SYG - Dashboard') @section('content') @php $dashboardDatePl = \Carbon\Carbon::now()->locale('pl')->translatedFormat('l, d F'); $deadline7Rate = (int) ($stats['deadlines_7_total'] ?? 0) > 0 ? ((int) ($stats['deadlines_7_risk'] ?? 0) / max(1, (int) ($stats['deadlines_7_total'] ?? 0))) * 100 : 0; $deadline90Rate = (int) ($stats['deadlines_90_total'] ?? 0) > 0 ? ((int) ($stats['deadlines_90_risk'] ?? 0) / max(1, (int) ($stats['deadlines_90_total'] ?? 0))) * 100 : 0; $deadlineAllRate = (int) ($stats['deadlines_all_total'] ?? 0) > 0 ? ((int) ($stats['deadlines_all_risk'] ?? 0) / max(1, (int) ($stats['deadlines_all_total'] ?? 0))) * 100 : 0; $sygListBaseUrl = url('/m_syg_zgloszenia_list'); $scopeDeadlines7RiskUrl = $sygListBaseUrl . '?dashboard_scope=deadlines_7_risk&nav_reset=1'; $scopeDeadlines90RiskUrl = $sygListBaseUrl . '?dashboard_scope=deadlines_90_risk&nav_reset=1'; $scopeDeadlinesAllRiskUrl = $sygListBaseUrl . '?dashboard_scope=deadlines_all_risk&nav_reset=1'; $dashboardTiles = [ [ 'label' => 'NOWE (DO_POTWIERDZENIA)', 'value' => (int) ($stats['status_1'] ?? 0), 'icon' => 'fas fa-inbox', 'class' => 'syg-kpi-new', 'color' => 'blue', 'href' => route('m_syg_zgloszenia_list_filter', 1), ], [ 'label' => 'POTWIERDZONE', 'value' => (int) ($stats['status_2'] ?? 0), 'icon' => 'fas fa-check-circle', 'class' => 'syg-kpi-confirmed', 'color' => 'mint', 'href' => route('m_syg_zgloszenia_list_filter', 2), ], [ 'label' => 'WYSLANA ODPOWIEDZ', 'value' => (int) ($stats['status_5'] ?? 0), 'icon' => 'far fa-envelope', 'class' => 'syg-kpi-feedback', 'color' => 'lilac', 'href' => route('m_syg_zgloszenia_list_filter', 5), ], [ 'label' => 'ZAKONCZONE', 'value' => (int) ($stats['status_7'] ?? 0), 'icon' => 'far fa-flag', 'class' => 'syg-kpi-closed', 'color' => 'rose', 'href' => route('m_syg_zgloszenia_list_filter', 7), ], [ 'label' => 'AKTYWNE SPRAWY', 'value' => (int) ($stats['reports_open'] ?? 0), 'icon' => 'fas fa-bullhorn', 'class' => 'syg-kpi-open', 'color' => 'sand', 'href' => url('/m_syg_zgloszenia_list'), ], [ 'label' => 'WSZYSTKIE ZGLOSZENIA', 'value' => (int) ($stats['reports_total'] ?? 0), 'icon' => 'fas fa-layer-group', 'class' => 'syg-kpi-total', 'color' => 'apricot', 'href' => route('m_syg_zgloszenia_list_filter', 0), ], ]; @endphp

Centrum monitoringu spraw sygnalistycznych.

{{ $dashboardDatePl }}
@foreach($dashboardTiles as $tileIndex => $tile)
@endforeach
Najnowsze zgloszenia
@forelse($latestReports as $report) @php $statusItem = $statusMap[(int) ($report->status ?? 0)] ?? null; $statusName = $statusItem->nazwa ?? ('Status #' . (int) ($report->status ?? 0)); $statusColor = $statusItem->kolor ?? 'secondary'; @endphp @empty @endforelse
ID Identyfikator sprawy Status Utworzono
{{ (int) ($report->id ?? 0) }} {{ (string) ($report->sprawa_identyfikator ?? '-') }} {{ $statusName }} {{ (string) ($report->created_at ?? '-') }}
Brak danych do wyswietlenia.
Do zrobienia
Nowe sprawy do potwierdzenia {{ (int) ($stats['status_1'] ?? 0) }}
Zagrozone SLA 7 dni {{ (int) ($stats['deadlines_7_risk'] ?? 0) }}
Zagrozone SLA 90 dni {{ (int) ($stats['deadlines_90_risk'] ?? 0) }}
Otwarte bez opisu dzialan {{ (int) ($stats['without_actions'] ?? 0) }}

Szybkie akcje
Najczestsze obszary zgloszen
@forelse($domainSummary as $domain)
{{ (string) ($domain->domain_name ?? '-') }} {{ (int) ($domain->total ?? 0) }}
@empty
Brak danych o obszarach zgloszen.
@endforelse
Terminy ustawowe
Potwierdzenie przyjecia (7 dni) {{ number_format((float) $deadline7Rate, 2, '.', ' ') }}%
Zagrozone: {{ (int) ($stats['deadlines_7_risk'] ?? 0) }}, pozostale: {{ (int) ($stats['deadlines_7_remaining'] ?? 0) }}, razem: {{ (int) ($stats['deadlines_7_total'] ?? 0) }}
Informacja zwrotna (90 dni) {{ number_format((float) $deadline90Rate, 2, '.', ' ') }}%
Zagrozone: {{ (int) ($stats['deadlines_90_risk'] ?? 0) }}, pozostale: {{ (int) ($stats['deadlines_90_remaining'] ?? 0) }}, razem: {{ (int) ($stats['deadlines_90_total'] ?? 0) }}
Informacja zwrotna (Ogółem) {{ number_format((float) $deadlineAllRate, 2, '.', ' ') }}%
Zagrozone: {{ (int) ($stats['deadlines_all_risk'] ?? 0) }}, pozostale: {{ (int) ($stats['deadlines_all_remaining'] ?? 0) }}, razem: {{ (int) ($stats['deadlines_all_total'] ?? 0) }}
@endsection @section('menu') @include('sites.syg.menu_syg') @endsection @section('navbar') @include('sites.syg._navbar_syg') Dashboard SYG @endsection