@if (session('admin-apps-flash'))
{{ session('admin-apps-flash') }}
@endif {{-- Stat cards --}} @php $stats = $this->stats; $cards = [ [ 'key' => 'total', 'label' => 'Total Applications', 'value' => $stats['total'], 'sub' => 'All time applications', 'icon' => 'fa-clipboard', 'color' => 'sky', ], [ 'key' => 'pending', 'label' => 'Pending', 'value' => $stats['pending'], 'sub' => 'Awaiting review', 'icon' => 'fa-clock', 'color' => 'amber', ], [ 'key' => 'in_process', 'label' => 'In Process', 'value' => $stats['in_process'], 'sub' => 'Currently in process', 'icon' => 'fa-arrows-rotate', 'color' => 'blue', ], [ 'key' => 'approved', 'label' => 'Approved', 'value' => $stats['approved'], 'sub' => 'Successfully approved', 'icon' => 'fa-circle-check', 'color' => 'emerald', ], [ 'key' => 'rejected', 'label' => 'Rejected', 'value' => $stats['rejected'], 'sub' => 'Applications rejected', 'icon' => 'fa-circle-xmark', 'color' => 'rose', ], ]; $palette = [ 'sky' => ['ring' => 'ring-sky-100', 'bg' => 'bg-sky-50', 'text' => 'text-sky-600'], 'amber' => ['ring' => 'ring-amber-100', 'bg' => 'bg-amber-50', 'text' => 'text-amber-600'], 'blue' => ['ring' => 'ring-blue-100', 'bg' => 'bg-blue-50', 'text' => 'text-blue-600'], 'emerald' => ['ring' => 'ring-emerald-100', 'bg' => 'bg-emerald-50', 'text' => 'text-emerald-600'], 'rose' => ['ring' => 'ring-rose-100', 'bg' => 'bg-rose-50', 'text' => 'text-rose-600'], ]; @endphp
@foreach ($cards as $card) @php($c = $palette[$card['color']]) @endforeach
{{-- Toolbar + table --}}

All Applications

Filter by step: @foreach (ApplicationsTable::statusFilterOptions() as $option) @if ($option['group'] !== 'workflow') @continue @endif @endforeach
@if ($range === 'custom')
@if ($date_from !== '' || $date_to !== '') @endif

@if ($date_from !== '' && $date_to !== '') Showing applications from {{ \Illuminate\Support\Carbon::parse($date_from)->format('d M Y') }} to {{ \Illuminate\Support\Carbon::parse($date_to)->format('d M Y') }}. @elseif ($date_from !== '') Showing applications on or after {{ \Illuminate\Support\Carbon::parse($date_from)->format('d M Y') }}. @elseif ($date_to !== '') Showing applications on or before {{ \Illuminate\Support\Carbon::parse($date_to)->format('d M Y') }}. @else Pick a start and end date — filter applies live; export uses the same range. @endif

@endif
@forelse ($this->applications as $app) @empty @endforelse
Application ID Applicant Name Visa Type Entry Type Passport No. Travel agency Status Applied On Action
{{ ApplicationsTable::displayCode($app) }} {{ $app->full_name }} {{ $app->visa_type ?: '—' }} {{ VisaEntryType::labelFor($app->entry_type) }} {{ $app->passport_number ?: '—' }} @if ($app->agent) @php($agencyLabel = $app->agent->agency_name ?: $app->agent->name)
@if ($app->agent->profile_photo_path) @else {{ strtoupper(substr($agencyLabel, 0, 1)) }} @endif {{ $agencyLabel }}
@else @endif
{{ optional($app->created_at)->format('M d, Y') }}
No applications found.

@if ($this->applications->total()) Showing {{ $this->applications->firstItem() }} to {{ $this->applications->lastItem() }} of {{ $this->applications->total() }} applications @else Showing 0 applications @endif

{{ $this->applications->onEachSide(1)->links() }}