@foreach ($workers as $worker)
{{-- Status + Photo --}}
{{
$worker->status === 'available' ? 'Available' :
($worker->status === 'processing' ? 'Processing' :
($worker->status === 'employee' ? 'Employee' : 'Back Out'))
}}
{{-- Info --}}
Full Name
{{ $worker->surname }} {{ $worker->given_names }}
Religion
{{ $worker->religion ?? 'N/A' }}
Passport No
{{ $worker->passport_number ?? 'N/A' }}
Occupation
{{ $worker->occupation ?? 'N/A' }}
Mobile
{{ $worker->mobile_number ?? 'N/A' }}
Location
{{ $worker->city ?? 'N/A' }}, {{ $worker->country ?? 'N/A' }}
{{-- Actions --}}
Details
@php
// Normalize the worker's status to lowercase and trim any whitespace
$normalizedStatus = strtolower(trim($worker->status));
@endphp
@if ($normalizedStatus === 'available')
Edit
@elseif ($normalizedStatus === 'back_out')
@endif
@php
$canDelete = in_array(strtolower($worker->status), ['available', 'back_out']);
@endphp
@if ($canDelete)
@endif
@endforeach
{{-- No Results --}}
No results match your search.
{{-- Pagination --}}
{{ $workers->appends(request()->query())->links('pagination::bootstrap-4') }}