@php
$currentRoute = auth()->user()->hasRole('employee') ? 'attendance_penalties_list_employee' : 'attendance_penalties_list';
$currentSort = request('sort', 'date');
$currentOrder = request('order', 'desc');
$nextOrder = $currentOrder == 'asc' ? 'desc' : 'asc';
@endphp
|
Tên nhân viên
@if($currentSort == 'name')
@else
@endif
|
Ngày
@if($currentSort == 'date')
@else
@endif
|
Vi phạm |
Số phút vi phạm |
Số tiền phạt |
Ghi chú |
@forelse ($attendances as $attendance)
| {{ $attendance->employee->name ?? '' }} |
{{ \Carbon\Carbon::parse($attendance->date)->format('d/m/Y') }} |
@php
$labels = [
'late' => 'Đi muộn',
'early_leave' => 'Về sớm',
'missing_punch' => 'Quên chấm công',
'absent' => 'Vắng mặt',
'leave_unpaid' => 'Nghỉ không phép'
];
echo $labels[$attendance->type] ?? $attendance->type;
@endphp
|
{{ $attendance->minutes ?? '-' }}
|
{{ number_format($attendance->amount, 0) }}đ |
{{ $attendance->note }} |
{{--
@if (!(auth()->user()->hasRole('manager') || auth()->user()->hasRole('employee')))
@endif
| --}}
@empty
| Không có dữ liệu vi phạm |
@endforelse
{{ $attendances->links() }}