@php if (!function_exists('sortUrl')) { function sortUrl($field) { $currentSort = request('sort'); $currentDirection = request('direction', 'desc'); $newDirection = ($currentSort === $field && $currentDirection === 'asc') ? 'desc' : 'asc'; return request()->fullUrlWithQuery(['sort' => $field, 'direction' => $newDirection]); } } if (!function_exists('sortIcon')) { function sortIcon($field) { $currentSort = request('sort'); $currentDirection = request('direction', 'desc'); if ($currentSort !== $field) { return ''; } if ($currentDirection === 'asc') { return ''; } return ''; } } @endphp
| Emp ID {!! sortIcon('employee_id') !!} | First Name {!! sortIcon('first_name') !!} | Last Name {!! sortIcon('last_name') !!} | Department {!! sortIcon('department_id') !!} | Job Role {!! sortIcon('job_role_id') !!} | Wage Types | Car | Contact Info | Status | Actions | |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $employee->employee_id }} |
{{ $employee->first_name }}
@if(!$employee->isProfileComplete())
Complete Info
@else
Complete
@endif
|
{{ $employee->last_name }} | {{ $employee->department ? $employee->department->name : 'N/A' }} | {{ $employee->jobRole ? $employee->jobRole->name : 'N/A' }} |
@forelse($employee->wageTypes as $type)
{{ $type->name }}: ${{ number_format($type->pivot->rate, 2) }}
@empty
N/A
@endforelse
|
@if($employee->has_car)
|
|
|||
| No employees found. | ||||||||||