@php $configData = Helper::appClasses(); @endphp @extends('layouts/layoutMaster') @section('title', __('Apply for Leave')) @section('vendor-style') @vite([ 'resources/assets/vendor/libs/flatpickr/flatpickr.scss', 'resources/assets/vendor/libs/select2/select2.scss', 'resources/assets/vendor/libs/sweetalert2/sweetalert2.scss' ]) @endsection @section('vendor-script') @vite([ 'resources/assets/vendor/libs/flatpickr/flatpickr.js', 'resources/assets/vendor/libs/select2/select2.js', 'resources/assets/vendor/libs/sweetalert2/sweetalert2.js' ]) @endsection @section('page-script') @vite(['resources/assets/js/app/hrcore-leave-apply.js']) @endsection @section('content')
{{-- Breadcrumb --}}
{{ __('Leave Application Form') }}
@csrf {{-- Hidden user_id field for self application --}} {{-- @unless(auth()->user()->can('hrcore.create-leave-for-others')) --}} {{-- PERMISSION TEMPORARILY DISABLED --}} {{-- @endunless --}}
{{-- Leave Type --}}
{{-- Date Range --}}
{{-- Half Day Options --}}
{{-- Total Days --}}
{{-- Compensatory Off Section --}} {{-- Reason --}}
{{-- Emergency Contact --}}
{{-- Abroad Leave --}}
{{-- Document Upload --}}
{{ __('Upload medical certificate or other supporting documents (PDF, JPG, PNG - Max 2MB)') }}
{{-- Current Leave Balance Summary --}}
{{ __('Leave Balance Summary') }}

{{ __('Select a leave type to view balance details') }}

{{-- Leave Policy Card --}}
{{ __('Leave Policies') }}
@foreach($leaveTypes as $index => $type)

{{ $type->description ?? __('No description available') }}
{{ __('Annual Entitlement:') }} {{ $type->user_entitled ?? $type->days_allowed ?? 0 }} {{ __('days') }}
@if($type->carry_forward)
{{ __('Carry Forward:') }} {{ $type->user_carried ?? 0 }} {{ __('days') }}
@endif @if(isset($type->user_additional) && $type->user_additional > 0)
{{ __('Additional:') }} {{ $type->user_additional ?? 0 }} {{ __('days') }}
@endif
{{ __('Used:') }} {{ $type->user_used ?? 0 }} {{ __('days') }}

{{ __('Available:') }} {{ $type->user_available ?? $type->days_allowed ?? 0 }} {{ __('days') }}
@endforeach
{{-- Page Data for JavaScript --}} @endsection