@extends('layouts.app') @section('title', 'Ajukan Cuti') @section('content')

Ajukan Cuti

Kembali
@csrf @php if (!isset($pegawai)) { $pegawai = auth()->user()->pegawai; } @endphp @if($pegawai)
Pegawai: {{ $pegawai->nama_lengkap }} ({{ $pegawai->nip }}) - Status: {{ $pegawai->status_pegawai ?? 'Kontrak' }}
@endif {{-- Informasi Kuota Cuti --}} @php if (!isset($currentYear)) { $currentYear = date('Y'); } @endphp @if(isset($quotas) && $pegawai && !empty($quotas))
Informasi Kuota Cuti Tahun {{ $currentYear }}
@foreach($quotas as $jenisCuti => $quota) @if($quota['available'])
{{ $jenisCuti }} @if($quota['remaining'] === 0 || ($quota['remaining'] !== null && $quota['remaining'] < 1)) Habis @elseif($quota['remaining'] !== null) {{ $quota['remaining'] }} hari tersisa @endif
{{ $quota['rule']['description'] }} @if($quota['max'] !== null)
Kuota: {{ $quota['max'] }} hari | Terpakai: {{ $quota['taken'] }} hari | Sisa: @if($quota['remaining'] !== null) {{ $quota['remaining'] }} hari @else Unlimited @endif
@else
Terpakai: {{ $quota['taken'] }} hari | Sisa: Unlimited (dengan surat dokter)
@endif
@else
{{ $jenisCuti }} Tidak Tersedia
{{ $quota['rule']['description'] }}
@endif @endforeach
@endif
@error('jenis_cuti')
{{ $message }}
@enderror
Jumlah hari akan dihitung otomatis berdasarkan tanggal mulai dan selesai
@error('tanggal_mulai')
{{ $message }}
@enderror
@error('tanggal_selesai')
{{ $message }}
@enderror
@error('alasan')
{{ $message }}
@enderror
@error('alamat_cuti')
{{ $message }}
@enderror
@error('no_telepon_cuti')
{{ $message }}
@enderror
Batal
@push('scripts') @endpush @endsection