{{-- Header Section --}}

Daftar Siswa

Kelola data siswa, pantau status akademik, dan administrasi kelas dalam satu tampilan kartu yang ringkas.

{{-- AREA KANAN: Tombol Download & Total Siswa --}}
{{-- [BARU] Tombol Download CSV --}} Export CSV Memproses... {{-- Total Siswa Badge (Existing) --}}
Total Siswa {{ $students->count() }}
{{-- Grid Container --}}
@if($students->count() > 0)
@foreach($students as $student) @php $status = $student->status ?? 'active'; $statusConfig = match($status) { 'active' => ['color' => 'success', 'bg' => 'bg-green-500', 'text' => 'text-green-600', 'border' => 'border-green-200', 'label' => 'Aktif'], 'pending' => ['color' => 'warning', 'bg' => 'bg-amber-500', 'text' => 'text-amber-600', 'border' => 'border-amber-200', 'label' => 'Menunggu'], 'inactive' => ['color' => 'danger', 'bg' => 'bg-red-500', 'text' => 'text-red-600', 'border' => 'border-red-200', 'label' => 'Nonaktif'], default => ['color' => 'gray', 'bg' => 'bg-gray-500', 'text' => 'text-gray-600', 'border' => 'border-gray-200', 'label' => ucfirst($status)], }; @endphp {{-- CARD ITEM --}}
{{-- Decorative Top Bar --}}
{{ $statusConfig['label'] }}
{{-- Avatar Section --}}
{{-- Content Body --}}
{{-- Nama --}}

{{ $student->name }}

{{-- ID Pill --}} ID: {{ $student->id }} {{-- Divider --}}
{{-- Single Metric: Kelas --}}
Kelas Saat Ini {{ $student->tingkat?->name ?? $student->tingkat_id ?? '-' }}
@endforeach
@else {{-- Empty State --}}

Tidak ada data siswa

Belum ada siswa yang terdaftar di kelas ini.

@endif
{{-- Footer Info --}}

Menampilkan {{ $students->count() }} Data