@extends('layouts.adminlte') @section('title', 'Form Pengajuan Izin/Sakit') @section('content_header')

Pengajuan Izin

Ajukan izin atau sakit untuk putra/putri Anda secara online.

@stop @section('content')
{{-- KOLOM KIRI: FORM CONFIG (5/12) --}}

Form Pengajuan

@csrf @php $inputClass = 'w-full px-4 py-3 rounded-xl border border-gray-200 focus:border-purple-500 focus:ring-4 focus:ring-purple-500/10 transition duration-200 bg-gray-50 focus:bg-white text-gray-800 shadow-sm'; $inputErrorClass = 'w-full px-4 py-3 rounded-xl border border-red-300 focus:border-red-500 focus:ring-4 focus:ring-red-500/10 transition duration-200 bg-red-50 text-red-900'; $labelClass = 'block text-sm font-bold text-gray-700 mb-2'; @endphp {{-- Pilih Siswa --}}
@error('student_id')

{{ $message }}

@enderror
{{-- Tanggal & Jenis --}}
@error('request_date')

{{ $message }}

@enderror
@error('type')

{{ $message }}

@enderror
{{-- Keterangan --}}
@error('reason')

{{ $message }}

@enderror
{{-- Lampiran --}}

Max 2MB (JPG, PNG, PDF). Wajib untuk Sakit (Surat Dokter).

@error('attachment')

{{ $message }}

@enderror
{{-- Button Simpan --}}
{{-- KOLOM KANAN: RIWAYAT (7/12) --}}

Riwayat Pengajuan

@if($requests->isEmpty())

Belum ada riwayat pengajuan izin.

@else
@foreach($requests as $req) @endforeach
Info Keterangan Status Lampiran
{{ $req->student->name ?? '-' }}
{{ \Carbon\Carbon::parse($req->request_date)->translatedFormat('d F Y') }}
{{ $req->type }}

{{ $req->reason }}

@php $statusClass = [ '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', ][$req->status] ?? 'bg-gray-100 text-gray-800'; $icon = [ 'Pending' => 'fa-clock', 'Approved' => 'fa-check-circle', 'Rejected' => 'fa-times-circle', ][$req->status] ?? 'fa-question'; @endphp {{ $req->status }} @if($req->attachment_path) @else - @endif
{{ $requests->links('pagination::tailwind') }}
@endif
@stop @section('js') @stop @section('css') @stop