86 lines
4.4 KiB
PHP
86 lines
4.4 KiB
PHP
<div class="responsive-table m-0">
|
|
<table class="table" id="datatable">
|
|
<thead>
|
|
<tr>
|
|
@usercan('shifts.delete')
|
|
<th class="w-60">
|
|
<div class="d-flex align-items-center gap-3">
|
|
<input type="checkbox" class="select-all-delete multi-delete">
|
|
</div>
|
|
</th>
|
|
@endusercan
|
|
<th>{{ __('SL') }}.</th>
|
|
<th class="text-start">{{ __('Name') }}</th>
|
|
<th class="text-start">{{ __('Start Time') }}</th>
|
|
<th class="text-start">{{ __('End Time') }}</th>
|
|
<th class="text-start">{{ __('Break Time') }}</th>
|
|
<th class="text-start">{{ __('Break Duration') }}</th>
|
|
<th>{{ __('Status') }}</th>
|
|
<th>{{ __('Action') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($shifts as $shift)
|
|
<tr>
|
|
@usercan('shifts.delete')
|
|
<td class="w-60 checkbox">
|
|
<input type="checkbox" name="ids[]" class="delete-checkbox-item multi-delete"
|
|
value="{{ $shift->id }}">
|
|
</td>
|
|
@endusercan
|
|
<td>{{ ($shifts->currentPage() - 1) * $shifts->perPage() + $loop->iteration }}</td>
|
|
<td class="text-start">{{ $shift->name }}</td>
|
|
<td class="text-start">{{ formatted_time($shift->start_time) }}</td>
|
|
<td class="text-start">{{ formatted_time($shift->end_time) }}</td>
|
|
<td class="text-start">{{ formatted_time($shift->start_break_time ?? '') }} -
|
|
{{ formatted_time($shift->end_break_time ?? '') }} </td>
|
|
<td class="text-start">{{ formatTimeToWords($shift->break_time) }}</td>
|
|
<td>
|
|
<label class="switch">
|
|
<input type="checkbox" {{ $shift->status == 1 ? 'checked' : '' }} class="status"
|
|
data-url="{{ route('hrm.shifts.status', $shift->id) }}">
|
|
<span class="slider round"></span>
|
|
</label>
|
|
</td>
|
|
<td class="print-d-none">
|
|
<div class="dropdown table-action">
|
|
<button type="button" data-bs-toggle="dropdown">
|
|
<i class="far fa-ellipsis-v"></i>
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
@usercan('shifts.update')
|
|
<li>
|
|
<a href="#shifts-edit-modal" data-bs-toggle="modal" class="shifts-edit-btn"
|
|
data-url="{{ route('hrm.shifts.update', $shift->id) }}"
|
|
data-shifts-name="{{ $shift->name }}"
|
|
data-shifts-break-status="{{ $shift->break_status }}"
|
|
data-shifts-start="{{ $shift->start_time }}"
|
|
data-shifts-end="{{ $shift->end_time }}"
|
|
data-start-break-time="{{ $shift->start_break_time }}"
|
|
data-end-break-time="{{ $shift->end_break_time }}">
|
|
<i class="fal fa-pencil-alt"></i>{{ __('Edit') }}</a>
|
|
</li>
|
|
@endusercan
|
|
|
|
@usercan('shifts.delete')
|
|
<li>
|
|
<a href="{{ route('hrm.shifts.destroy', $shift->id) }}" class="confirm-action"
|
|
data-method="DELETE">
|
|
<i class="fal fa-trash-alt"></i>
|
|
{{ __('Delete') }}
|
|
</a>
|
|
</li>
|
|
@endusercan
|
|
</ul>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="mt-3">
|
|
{{ $shifts->links('vendor.pagination.bootstrap-5') }}
|
|
</div>
|