48 lines
2.5 KiB
PHP
48 lines
2.5 KiB
PHP
<div class="responsive-table m-0">
|
|
<table class="table" id="datatable">
|
|
<thead>
|
|
<tr>
|
|
<th class="d-print-none">{{ __('SL') }}.</th>
|
|
<th class="text-start">{{ __('Employee') }}</th>
|
|
<th class="text-start">{{ __('Month') }}</th>
|
|
<th class="text-start d-print-none">{{ __('Department') }}</th>
|
|
<th class="text-start">{{ __('Start Date') }}</th>
|
|
<th class="text-start">{{ __('End Date') }}</th>
|
|
<th class="text-start">{{ __('Leave Type') }}</th>
|
|
<th class="text-start d-print-none">{{ __('Leave Duration') }}</th>
|
|
<th class="text-center">{{ __('Status') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($leaves as $leave)
|
|
<tr>
|
|
<td class="d-print-none">{{ ($leaves->currentPage() - 1) * $leaves->perPage() + $loop->iteration }}</td>
|
|
<td class="text-start">{{ $leave->employee->name ?? '' }}</td>
|
|
<td class="text-start">{{ ucfirst($leave->month) }}</td>
|
|
<td class="text-start d-print-none">{{ $leave->department->name ?? '' }}</td>
|
|
<td class="text-start">{{ formatted_date($leave->start_date) }}</td>
|
|
<td class="text-start">{{ formatted_date($leave->end_date) }}</td>
|
|
<td class="text-start">{{ $leave->leave_type->name ?? '' }}</td>
|
|
<td class="text-start d-print-none">{{ $leave->leave_duration }} {{ __('Days') }}</td>
|
|
@if ($leave->status == 'pending')
|
|
<td class="text-warning text-center">
|
|
<div class="padding-status">{{__('Pending')}}</div>
|
|
</td>
|
|
@elseif ($leave->status == 'approved')
|
|
<td class="text-warning text-center">
|
|
<div class="approved-status">{{__('Approved')}}</div>
|
|
</td>
|
|
@elseif ($leave->status == 'rejected')
|
|
<td class="text-warning text-center">
|
|
<div class="rejected-status">{{__('Rejected')}}</div>
|
|
</td>
|
|
@endif
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="mt-3">
|
|
{{ $leaves->links('vendor.pagination.bootstrap-5') }}
|
|
</div>
|