Files
eko54r 3e1b64e008
Some checks failed
Build, Push and Deploy / build-and-push (push) Failing after 3m30s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 15s
Build, Push and Deploy / deploy-staging (push) Has been skipped
Build, Push and Deploy / deploy-production (push) Has been skipped
update addon HRM
2026-05-04 23:04:09 +07:00

80 lines
4.2 KiB
PHP

<div class="responsive-table m-0">
<table class="table" id="datatable">
<thead>
<tr>
@usercan('attendances.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">{{ __('Employee') }}</th>
<th class="text-start">{{ __('Month') }}</th>
<th class="text-start">{{ __('Shift') }}</th>
<th class="text-start">{{ __('date') }}</th>
<th class="text-start">{{ __('Time In') }}</th>
<th class="text-start">{{ __('Time Out') }}</th>
<th class="text-start">{{ __('Duration') }}</th>
<th>{{ __('Action') }}</th>
</tr>
</thead>
<tbody>
@foreach ($attendances as $attendance)
<tr>
@usercan('attendances.delete')
<td class="w-60 checkbox">
<input type="checkbox" name="ids[]" class="delete-checkbox-item multi-delete" value="{{ $attendance->id }}">
</td>
@endusercan
<td>{{ ($attendances->currentPage() - 1) * $attendances->perPage() + $loop->iteration }}</td>
<td class="text-start">{{ $attendance->employee->name ?? '' }}</td>
<td class="text-start">{{ ucfirst($attendance->month ?? '') }}</td>
<td class="text-start">{{ $attendance->shift->name ?? '' }}</td>
<td class="text-start">{{ formatted_date($attendance->date) }}</td>
<td class="text-start">{{ formatted_time($attendance->time_in) }}</td>
<td class="text-start">{{ formatted_time($attendance->time_out) }}</td>
<td class="text-start">{{ formatTimeToWords($attendance->duration) }}</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('attendances.update')
<li>
<a href="#attendances-edit-modal" data-bs-toggle="modal"
class="attendances-edit-btn"
data-url="{{ route('hrm.attendances.update', $attendance->id) }}"
data-employee-id="{{ $attendance->employee_id }}"
data-month="{{ $attendance->month }}" data-date="{{ $attendance->date }}"
data-time-in="{{ $attendance->time_in }}"
data-time-out="{{ $attendance->time_out }}"
data-note="{{ $attendance->note }}">
<i class="fal fa-pencil-alt"></i>{{ __('Edit') }}</a>
</li>
@endusercan
@usercan('attendances.delete')
<li>
<a href="{{ route('hrm.attendances.destroy', $attendance->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">
{{ $attendances->links('vendor.pagination.bootstrap-5') }}
</div>