@extends('layouts.app')
@section('content')<div class="mb-4"><div class="text-danger small fw-bold">PENGAJUAN BARU</div><h1 class="page-title">Ajukan izin atau cuti</h1></div><div class="card p-4 col-lg-8"><form method="POST" action="{{ route('leaves.store') }}" enctype="multipart/form-data">@csrf<div class="mb-3"><label class="form-label">Pegawai</label><select name="employee_id" class="form-select" required>@foreach($employees as $employee)<option value="{{ $employee->id }}">{{ $employee->employee_code }} - {{ $employee->full_name }}</option>@endforeach</select></div><div class="row g-3 mb-3"><div class="col-md-6"><label class="form-label">Jenis</label><select name="type" class="form-select" required><option value="annual">Cuti tahunan</option><option value="sick">Sakit</option><option value="permission">Izin keperluan</option><option value="other">Lainnya</option></select></div><div class="col-md-3"><label class="form-label">Mulai</label><input type="date" name="start_date" class="form-control" required></div><div class="col-md-3"><label class="form-label">Selesai</label><input type="date" name="end_date" class="form-control" required></div></div><div class="mb-3"><label class="form-label">Alasan</label><textarea name="reason" class="form-control" rows="4" required></textarea></div><div class="mb-3"><label class="form-label">Lampiran surat sakit/izin</label><input type="file" name="attachment" class="form-control" accept=".pdf,.jpg,.jpeg,.png"></div><button class="btn btn-danger">Kirim pengajuan</button> <a class="btn btn-light" href="{{ route('leaves.index') }}">Batal</a></form></div>@endsection
