@php
$currentDepartment = null;
$rowCount = 0;
@endphp
@foreach($emp_data as $list)
@if($currentDepartment != $list->department_name)
@php
$currentDepartment = $list->department_name;
$rowCount = $list->dept_count;
@endphp
{{-- {{$rowCount}}--}}
| {{ $loop->iteration }} |
{{ $list->department_name }} |
{{-- {{ $currentDepartment }} | --}}
{{ $list->employee_name }} |
{{ $list->designation }} |
@if($status == 'Absent')
{{ isset($list->absent_st_date) ? date('d-m-Y',strtotime($list->absent_st_date)) : ''}} |
{{ $list->absent_total_days }} |
@endif
@if($status == 'Deputation')
{{ isset($list->emp_join_date) ? date('d-m-Y',strtotime($list->emp_join_date)) : '' }} |
{{ $list->depu_total_days }} |
@endif
@if($status == 'Hold')
{{ isset($list->hold_start_date) ? date('d-m-Y',strtotime($list->hold_start_date)) : '' }} |
{{ $list->hold_total_days }} |
@endif
@if($status == 'Leave')
{{ $list->leave_type }} |
{{ isset($list->leave_start_date) ? date('d-m-Y',strtotime($list->leave_start_date)) : '' }} |
{{ isset($list->leave_start_date) ? date('d-m-Y',strtotime($list->leave_end_date)) : '' }} |
{{ $list->leave_total_days }} |
@endif
@if($status == 'On Roll')
{{ isset($list->emp_join_date) ? date('d-m-Y',strtotime($list->emp_join_date)) : '' }} |
{{ isset($list->emp_lpr_date) ? date('d-m-Y',strtotime($list->emp_lpr_date)) : '' }} |
{{ $list->service_period }} |
@endif
@if($status == 'Suspended')
{{ isset($list->suspended_start_date) ? date('d-m-Y',strtotime($list->suspended_start_date)) : '' }} |
{{ $list->suspended_total_days }} |
@endif
@else
| {{ $loop->iteration }} |
{{ $list->department_name }} |
{{ $list->employee_name }} |
{{ $list->designation }} |
@if($status == 'Absent')
{{ isset($list->absent_st_date) ? date('d-m-Y',strtotime($list->absent_st_date)) : ''}} |
{{ $list->absent_total_days }} |
@endif
@if($status == 'Deputation')
{{ isset($list->emp_join_date) ? date('d-m-Y',strtotime($list->emp_join_date)) : '' }} |
{{ $list->depu_total_days }} |
@endif
@if($status == 'Hold')
{{ isset($list->hold_start_date) ? date('d-m-Y',strtotime($list->hold_start_date)) : '' }} |
{{ $list->hold_total_days }} |
@endif
@if($status == 'Leave')
{{ $list->leave_type }} |
{{ isset($list->leave_start_date) ? date('d-m-Y',strtotime($list->leave_start_date)) : '' }} |
{{ isset($list->leave_start_date) ? date('d-m-Y',strtotime($list->leave_end_date)) : '' }} |
{{ $list->leave_total_days }} |
@endif
@if($status == 'On Roll')
{{ isset($list->emp_join_date) ? date('d-m-Y',strtotime($list->emp_join_date)) : '' }} |
{{ isset($list->emp_lpr_date) ? date('d-m-Y',strtotime($list->emp_lpr_date)) : '' }} |
{{ $list->service_period }} |
@endif
@if($status == 'Suspended')
{{ isset($list->suspended_start_date) ? date('d-m-Y',strtotime($list->suspended_start_date)) : '' }} |
{{ $list->suspended_total_days }} |
@endif
@endif
@endforeach