@extends('layout.mainlayout') @section('content')
@foreach($records as $leave) @endforeach
Applied On Date Range Total Days Project / Local Lead Manager Reason Status Action
{{ $leave->created_at->format('d M Y') }} {{ \Carbon\Carbon::parse($leave->start_date)->format('d M Y') }} → {{ \Carbon\Carbon::parse($leave->end_date)->format('d M Y') }} {{ $leave->total_days }} @if($leave->projectLead) {{ $leave->projectLead->name }} @elseif($leave->localLead) {{ $leave->localLead->name }} @else — @endif {{ optional($leave->manager)->name ?? '—' }} {{ $leave->getForm('reason') ?? '—' }} @if($leave->status_lead === 'approved' && $leave->status_manager === 'approved') Approved @elseif($leave->status_lead === 'rejected' || $leave->status_manager === 'rejected') Rejected @else Pending @endif @if($leave->status_lead === 'pending' && $leave->status_manager === 'pending')
@csrf @method('DELETE')
@else @endif
@endsection @push('scripts') @endpush