{{-- Danh sách đơn từ (/approval/order) - nạp lại bằng AJAX khi tìm kiếm / lọc trạng thái. Style bảng dùng chung .crm-list-table (components.css) + phần riêng .order-* (cuối components.css). Giữ hook JS: #checkAll, input[getdataitem] (chọn đơn để duyệt hàng loạt). --}} @php // Loại đơn: [nhãn, icon, modifier màu] $orderTypes = [ 0 => ['Đơn nghỉ', 'fas fa-calendar-times', 'leave'], 1 => ['Check-in/Check-out', 'fas fa-user-clock', 'checkin'], 2 => ['Tăng ca', 'fas fa-business-time', 'overtime'], ]; // Trạng thái: [nhãn, icon, modifier màu] $orderStatuses = [ 0 => ['Chờ duyệt', 'fas fa-hourglass-half', 'pending'], 1 => ['Đã duyệt', 'fas fa-check-circle', 'approved'], 2 => ['Không duyệt', 'fas fa-ban', 'rejected'], ]; @endphp
| Nhân viên | Loại đơn | Trạng thái | Phòng ban / Chức vụ | Lý do | Ngày tạo | Chi tiết | |
|---|---|---|---|---|---|---|---|
|
{{ $initial }}
{{ $fullName }}
@if(@$item->user->code)
{{ $item->user->code }}
@endif
|
{{ $type[0] }} | {{ $status[0] }} |
{{ @$item->user->department->name ?: '—' }}
{{ @$item->user->roles->name }}
|
{{ @$item->reason->name ?: '—' }} | @if($item->created_at) {{ \Carbon\Carbon::parse($item->created_at)->format('d/m/Y') }} {{ \Carbon\Carbon::parse($item->created_at)->format('H:i') }} @endif | ||
|
Không có đơn từ nào
|
|||||||