@extends('layouts.adminlte') @section('title', 'Detail Siswa: ' . ($student->name ?? 'N/A')) @section('content')
{{-- PAGE HEADER --}}

Detail Siswa

Kembali
{{-- Notifikasi Sukses/Error (Styling Tailwind) --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
{{-- KOLOM KIRI: FOTO & INFORMASI UTAMA (1/3) --}}
{{-- Background Decoration --}}
{{-- Foto Siswa --}} @php $photoPath = $student->photo && \Illuminate\Support\Facades\Storage::disk('public')->exists($student->photo) ? asset('storage/' . $student->photo) : asset('images/default_avatar.png'); @endphp
Foto {{ $student->name }}

{{ $student->name }}

{{ $student->class->name ?? 'N/A' }}

NISN {{ $student->nisn }}
NIS {{ $student->nis ?? '-' }}
Status @if($student->status == 'active') Aktif @else Non-Aktif @endif
{{-- Tombol Aksi --}}
{{-- KOLOM KANAN: DETAIL, RELASI, & RIWAYAT (2/3) --}}
{{-- 1. Informasi Pribadi --}}

Informasi Pribadi

Email
{{ $student->email ?? '-' }}
Jenis Kelamin
{{ $student->gender }}
No. HP Siswa
{{ $student->phone_number ?? '-' }}
Tempat, Tanggal Lahir
{{ $student->birth_place ?? '-' }}, {{ $student->birth_date ? \Carbon\Carbon::parse($student->birth_date)->isoFormat('D MMMM YYYY') : '-' }}
Alamat
{{ $student->address ?? '-' }}
{{-- 2. RELASI ORANG TUA/WALI --}}

Kontak Orang Tua / Wali

@forelse($student->parents as $parent)
{{ $parent->name }}
{{ $parent->relation_status }}

{{ $parent->phone_number }}

{{-- Edit Button (If exists route) --}} @if(Route::has('walikelas.parents.edit')) @endif
@empty

Belum ada data orang tua yang terhubung.

@endforelse
{{-- 3. Riwayat Absensi Terakhir --}}

Riwayat Absensi (Terakhir)

@if($historyAbsences->isEmpty())

Belum ada riwayat absensi.

@else @foreach($historyAbsences as $absence) @endforeach
Tanggal Masuk Pulang Status
{{ $absence->attendance_time->format('d M Y') }} {{ $absence->attendance_time->format('H:i') }} {{ $absence->checkout_time ? $absence->checkout_time->format('H:i') : '-' }} {{ $absence->status }}
@endif
@stop @section('js') @endsection