{{-- KPI Cards Row 1 --}}
{{-- KPI Cards Row 2 --}}
{{-- Premium Visuals Row --}}
{{-- Enrollment Trend (Native Tailwind Flex Bars) --}}

{{ __('Enrollment Trend (12 Months)') }}

{{ __('Boys') }}
{{ __('Girls') }}
@php $months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; $boysData = array_slice($enrollmentChartData['boys'] ?? array_fill(0, 12, 0), -12); $girlsData = array_slice($enrollmentChartData['girls'] ?? array_fill(0, 12, 0), -12); $maxVal = max(1, max(array_merge($boysData, $girlsData)) * 1.2); // Add 20% headroom @endphp @foreach($months as $idx => $month) @php $bCount = $boysData[$idx] ?? 0; $gCount = $girlsData[$idx] ?? 0; $bHeight = ($bCount / $maxVal) * 100; $gHeight = ($gCount / $maxVal) * 100; @endphp
{{-- Hover Tooltip --}}
Boys: {{ $bCount }} | Girls: {{ $gCount }}
{{ $month }}
@endforeach
{{-- Attendance Overview (Native SVG Donut) --}}

{{ __('Attendance Overview') }}

@php $attendanceData = $attendanceChartData ?? [70, 10, 15, 5]; $total = array_sum($attendanceData); $total = $total > 0 ? $total : 1; $present = $attendanceData[0] ?? 0; $late = $attendanceData[1] ?? 0; $absent = $attendanceData[2] ?? 0; $excused = $attendanceData[3] ?? 0; $radius = 60; $circumference = 2 * 3.14159 * $radius; $pDash = ($present / $total) * $circumference; $lDash = ($late / $total) * $circumference; $aDash = ($absent / $total) * $circumference; $eDash = ($excused / $total) * $circumference; $pOffset = 0; $lOffset = $pDash; $aOffset = $pDash + $lDash; $eOffset = $pDash + $lDash + $aDash; @endphp
{{-- Background Ring --}} {{-- Data Rings --}} @if($pDash > 0) @endif @if($lDash > 0) @endif @if($aDash > 0) @endif @if($eDash > 0) @endif {{-- Center Text --}}
{{ round(($present / $total) * 100) }}% {{ __('Present') }}
{{-- Custom Legend --}}
{{ __('Present') }}
{{ $present }}
{{ __('Late') }}
{{ $late }}
{{ __('Absent') }}
{{ $absent }}
{{ __('Excused') }}
{{ $excused }}
{{-- Bottom Row --}}
{{-- Quick Actions --}} {{-- Recent Alerts --}}

{{ __('Recent Alerts') }}

{{ __('View All') }}
@forelse($alerts ?? [] as $alert)
{{ $alert['icon'] ?? '⚠️' }}

{{ $alert['title'] ?? '' }}

{{ $alert['time'] ?? '' }}

@empty

{{ __('No recent alerts') }}

{{ __('Everything looks good!') }}

@endforelse