43 lines
2.1 KiB
PHP
43 lines
2.1 KiB
PHP
<table class="table" id="datatable">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ __('SL') }}.</th>
|
|
<th class="text-start">{{ __('Employee') }}</th>
|
|
<th class="text-start">{{ __('Month') }}</th>
|
|
<th class="text-start">{{ __('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">{{ __('Leave Duration') }}</th>
|
|
<th class="text-center">{{ __('Status') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($leaves as $leave)
|
|
<tr>
|
|
<td>{{ $loop->iteration }}</td>
|
|
<td class="text-start">{{ $leave->employee->name ?? '' }}</td>
|
|
<td class="text-start">{{ ucfirst($leave->month) }}</td>
|
|
<td class="text-start">{{ $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">{{ $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>
|