@extends('layouts.userapp') @section('content') @php use Carbon\Carbon; @endphp @if(session('success'))
{{ session('success') }}
@endif

Leave Applied

@foreach($applied as $applied)
@csrf
Employee Name {{$user->username}}
Leave Type {{ $applied->leavetype_name }}
Leave Duration @if (($applied->halfday_on_startdate !== 'FULL' || $applied->halfday_on_enddate !== 'FULL') && !is_null($applied->halfday_on_startdate) && !is_null($applied->halfday_on_enddate)) HALFDAY ({{ $applied->halfday_on_startdate !== 'FULL' ? $applied->halfday_on_startdate : $applied->halfday_on_enddate }}) @else FULLDAY @endif
Applied On {{ \Carbon\Carbon::parse($applied->created_date)->format('l, d M Y') }}
To {{ $applied->employee_first_name }}
Total Days {{ $applied->total_days }}
Start Date {{ $applied->start_date ? \Carbon\Carbon::parse($applied->start_date)->format('l, d M Y') : 'NONE' }}
End Date {{ $applied->end_date ? \Carbon\Carbon::parse($applied->end_date)->format('l, d M Y') : 'NONE' }}
Return Date {{ $applied->return_date ? \Carbon\Carbon::parse($applied->return_date)->format('l, d M Y') : 'NONE' }}
Attachment @if($applied->attachment) Download @else @endif
Reason {{ $applied->reason }}
Leave Status {{ $applied->display_status }}
Leave History
@if($applied->display_status === 'Pending') @endif
@endforeach
@endsection