@extends('layouts.app') @section('title', __('Delegation Approval')) @section('content')

{{ __('Delegation Approval') }}

@can('delegation.create') {{ __('New Record') }} @endcan
{{-- Pipeline Status Tabs --}} @if(($awaiting ?? collect())->isNotEmpty())
{{ __('Selected candidates awaiting delegation') }} {{ $awaiting->count() }}
@foreach($awaiting as $item) @endforeach
{{ __('Tracking') }} {{ __('Candidate') }} {{ __('Country') }} {{ __('Selected on') }} {{ __('Actions') }}
{{ $item->tracking_number }} {{ $item->passportHolder?->full_name ?? '—' }} {{ $item->country?->name ?? '—' }} {{ ($item->selection?->decided_at ?? $item->selection?->updated_at)?->format('Y-m-d') ?? '—' }} @can('delegation.create') {{ __('Create Delegation') }} @endcan
@endif
@forelse($records as $record) @empty @endforelse
{{ __('Tracking') }} {{ __('Candidate') }} {{ __('Status') }} {{ __('Updated') }} {{ __('Actions') }}
{{ $record->recruitment?->tracking_number ?? '—' }} {{ $record->recruitment?->passportHolder?->full_name ?? '—' }} {{ $record->updated_at?->format('Y-m-d') }} @if ($record->status === 'approved') @if ($record->recruitment?->medical) {{ __('Medical') }} @else {{ __('Next: Medical') }} @endif @elseif ($record->status === 'pending') @can('delegation.edit')
@csrf
@csrf
@endcan @endif {{ __('View') }} @can('delegation.edit') {{ __('Edit') }} @endcan
{{ __('No records found.') }}
{{ $records->links() }}

{{ __(':count records', ['count' => $records->total()]) }}

@endsection