@extends('layouts.backend') @section('title', 'Leave Approvals') @section('content')

{{ __('Leave Approvals') }}

{{ __('Export Excel (CSV)') }}
@include('partials.flash')
@forelse($applications as $application) @php($empName = trim(($application->employee?->first_name ?? '').' '.($application->employee?->last_name ?? ''))) @empty @endforelse
{{ __('Employee') }} {{ __('Category') }} {{ __('Date Range') }} {{ __('Days') }} {{ __('Reason') }} {{ __('Status') }} {{ __('Action') }}
{{ $empName !== '' ? $empName : '-' }} ({{ $application->employee?->employee_code ?? '-' }}) {{ $application->leaveCategory?->name ?? '-' }} {{ $application->start_date }} to {{ $application->end_date }} {{ number_format((float) $application->total_days, 2) }} {{ \Illuminate\Support\Str::limit((string) $application->reason, 80) }} @if($application->status === 'approved') {{ __('Approved') }} @elseif($application->status === 'rejected') {{ __('Rejected') }} @else {{ __('Pending') }} @endif @if($application->status === 'pending')
@csrf
@csrf
@else {{ $application->approval_remarks ?: '-' }} @endif
{{ __('No leave requests found.') }}
{{ $applications->links('pagination::bootstrap-5') }}
@endsection @push('scripts') @endpush