{{-- Shared admin analytics overview (KPIs, breakdowns, alerts). --}} @php $overview = $adminOverview ?? []; $kpis = $overview['kpis'] ?? []; $breakdowns = $overview['breakdowns'] ?? []; $alerts = $overview['alerts'] ?? []; $links = $overview['links'] ?? []; @endphp @if ($alerts !== [])
@foreach ($alerts as $alert) @php $tone = match ($alert['severity'] ?? 'info') { 'critical' => 'border-rose-200 bg-rose-50 text-rose-900', 'warning' => 'border-amber-200 bg-amber-50 text-amber-900', default => 'border-sky-200 bg-sky-50 text-sky-900', }; @endphp
{{ $alert['message'] }}
@endforeach
@endif @if ($kpis !== [])
@foreach ($kpis as $kpi)

{{ $kpi['label'] }}

{{ $kpi['value'] }}

@if (! empty($kpi['hint']))

{{ $kpi['hint'] }}

@endif
@endforeach
@endif @foreach ($breakdowns as $section)

{{ $section['title'] }}

@if (($section['rows'] ?? []) === [])

No data for this period.

@else @endif
@endforeach @if ($links !== [])
@foreach ($links as $link) {{ $link['label'] }} @endforeach
@endif