@extends('layouts.adminlte') @section('title', 'Permintaan Izin Siswa') @section('content')
{{-- PAGE HEADER & BREADCRUMB --}}

Permintaan Izin/Sakit

{{-- Notifikasi Sukses/Error --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- INFO CARD --}}

Daftar Pengajuan Izin

Proses pengajuan izin atau sakit dari orang tua siswa kelas Anda.

{{-- Simple Stat Pill --}}
Total Request {{ $izinRequests->total() }}
{{-- MAIN CONTENT CARD --}}
{{-- TABLE --}}
@forelse($izinRequests as $request) {{-- Siswa --}} {{-- Tanggal --}} {{-- Jenis --}} {{-- Keterangan --}} {{-- Status --}} {{-- AKSI --}} {{-- AKSI --}} @empty @endforelse
Siswa Tanggal Izin Jenis Keterangan Status & Waktu Aksi
{{ substr($request->student->name, 0, 1) }}
{{ $request->student->name ?? '-' }} {{ $request->student->class->name ?? 'N/A' }}
{{ $request->request_date->translatedFormat('d M Y') }}
@php $typeClass = $request->type == 'Sakit' ? 'bg-rose-100 text-rose-700 border-rose-200' : 'bg-amber-100 text-amber-700 border-amber-200'; $icon = $request->type == 'Sakit' ? 'fa-procedures' : 'fa-clipboard-list'; @endphp {{ $request->type }}

"{{ $request->reason }}"

@if($request->attachment_path) Lihat Lampiran @endif
@php $statusBtn = match($request->status) { 'Pending' => 'bg-yellow-100 text-yellow-800 border-yellow-200', 'Approved' => 'bg-green-100 text-green-800 border-green-200', 'Rejected' => 'bg-red-100 text-red-800 border-red-200', default => 'bg-gray-100 text-gray-800' }; @endphp {{ $request->status }}
{{ $request->created_at->diffForHumans() }}
@if($request->status === 'Pending') @else {{-- Jika sudah diproses, tampilkan badge status kecil saja atau kosong --}} @endif {{-- Tombol Hapus: Selalu muncul (baik Pending maupun Selesai) --}}

Tidak ada permintaan baru

Belum ada data izin/sakit yang perlu diproses.

{{-- PAGINATION --}} @if($izinRequests->hasPages())
{{ $izinRequests->links('pagination::tailwind') }}
@endif
@stop @section('js') @endsection