@include('includes/header') @include('includes/sidebar')

Leave Requests

@if (\Session::has('success')) @endif @if (\Session::has('error')) @endif
{{-- --}} {{-- --}} @php $i = 0; @endphp @foreach($data as $val) @php $i++; @endphp @endforeach
S.No. User Leave For Leave Date Leave Type Created On Image Status CommentsApproved ByAction By Action OnApproved OnAction
{{$i}} {{$val['FirstName']}} {{$val['LastName']}} @if( $val['day_type'] == 2 ) Half Day
@if( $val['half_day_type'] == 1 ) (First Half) @else (Second Half) @endif @else Full Day @endif
@if($val['day_type'] == 2 ) {{ date('d/m/Y', strtotime($val['FromDate']) ) }} @else {{ date('d/m/Y', strtotime($val['FromDate']) ) }} to {{ date('d/m/Y', strtotime($val['ToDate']) ) }} @endif {{$val['leave_name']}} {{ date('d/m/Y h:i A', strtotime($val['leave_created']) ) }} - @if($val['Status'] == 1) Approved @elseif($val['Status'] == 2) Rejected @else Pending @endif {{$val['Comments']}} @if($val['Status'] == 1) Approved By - {{ $val['approver_first_name'] }} {{ $val['approver_last_name'] }} @elseif( $val['Status'] == 2 ) Rejected By - {{ $val['rejector_first_name'] }} {{ $val['rejector_last_name'] }} @else Waiting for Action @endif @if($val['Status'] == 1) Approved On - {{ date('d/m/Y h:i A', strtotime($val['ApprovedOn']) ) }} @elseif( $val['Status'] == 2 ) Rejected On - {{ date('d/m/Y h:i A', strtotime($val['reject_on']) ) }} @else Waiting for Action @endif
@if($val['Status'] == 0) @endif
@if($data->count() == 0) No Data Found! @endif
{{ $data->appends(request()->except('page'))->render('custom_pagination') }}
@include('includes/footer')