@extends('layouts.adminlte') @section('title', 'Dashboard Super Admin') @section('content_header') {{-- CUSTOM HEADER: Sudah menggunakan Indigo, hanya penyesuaian sedikit --}}
{{-- Judul Halaman --}}

Dashboard Super Admin

{{-- Breadcrumb --}}
@stop @section('content') {{-- GRADIENT WELCOME HERO --}}
{{-- Abstract Pattern Overlay --}}

Selamat Datang, {{ Auth::user()->name }}! 👋

Pantau aktivitas sekolah secara Real-Time. Sistem berjalan optimal.

Jam Server

{{ \Carbon\Carbon::now()->format('H:i') }}

{{-- STATS GRID --}}
@php $stats = [ ['color' => 'indigo', 'icon' => 'fa-user-graduate', 'label' => 'Total Siswa', 'value' => $totalStudents, 'route' => route('students.index')], ['color' => 'cyan', 'icon' => 'fa-chalkboard', 'label' => 'Total Kelas', 'value' => $totalClasses, 'route' => route('classes.index')], ['color' => 'emerald','icon' => 'fa-check-circle', 'label' => 'Hadir Hari Ini', 'value' => $attendancePercentage . '%', 'route' => route('report.index')], ['color' => 'rose', 'icon' => 'fa-users', 'label' => 'Total User', 'value' => $totalUsers, 'route' => route('admin.users.index')], ]; // Handle Pending Users Alert if($pendingUsers > 0) { $stats[3] = ['color' => 'orange', 'icon' => 'fa-user-clock', 'label' => 'Menunggu Approval', 'value' => $pendingUsers, 'route' => route('admin.users.index', ['tab' => 'pending'])]; } @endphp @foreach($stats as $index => $stat)
{{-- Decorative Blur --}}

{{ $stat['label'] }}

{{ $stat['value'] }}

@endforeach
{{-- MAIN CONTENT GRID (Timeline & Info) --}}
{{-- ACTIVITY TIMELINE (2 Columns) --}}

Live Absensi Timeline

View All
@forelse($recentAbsences as $absence) @php $isOut = $absence->checkout_time; $status = $isOut ? 'PULANG' : $absence->status; $time = $isOut ? $absence->checkout_time->format('H:i') : $absence->attendance_time->format('H:i'); $colorMap = [ 'Hadir' => 'teal', 'Terlambat' => 'amber', 'Alpa' => 'red', 'Izin' => 'blue', 'Sakit' => 'purple', 'PULANG' => 'indigo' ]; $color = $colorMap[$status] ?? 'gray'; @endphp
{{-- Timeline Dot --}}
{{-- Content --}}

{{ $absence->student->name ?? 'Siswa Dihapus' }}

{{ $absence->student->class->name ?? '-' }}

Scan via QR Code

{{ $status }}

{{ $time }}

@empty

Belum ada aktivitas absensi hari ini.

@endforelse
{{-- SIDEBAR: SYSTEM & QUICK ACTIONS --}}
{{-- System Status Card --}}

System Health

Status Database
Connected

Environment

Laravel v{{ app()->version() }} PHP {{ $phpVersion }}
{{-- Quick Actions --}}
@stop @section('js') {{-- SweetAlert JS dan Logika Session Flash (TIDAK DIUBAH) --}} @stop