@extends('layouts.app') @section('content') @php $locale = app()->getLocale(); $dir = $locale === 'ar' ? 'rtl' : 'ltr'; @endphp
{{ __('site.map_alt') }}
{{ __('site.concours_results_title') }} {{-- dynamic title: try trans_field then fallback to common columns --}}

{{ function_exists('trans_field') ? trans_field($concours, 'titre') : ($concours->titre ?? $concours->titre_G ?? '') }}

{{ __('site.registration_ends') }}: {{ optional($concours->date_fin)->format('Y-m-d') ?? '—' }}

{{ __('site.reset_button') }}
{{-- Show a prompt if user didn't search yet --}} @if(! ($searchRan ?? false) )

{{ __('site.results_prompt') }}

{{ __('site.results_prompt_note') }}
@else {{-- search was run: show table (may be empty if no matches) --}}
@forelse($candidates as $cand) @empty @endforelse
{{ __('site.table_name') }} {{ __('site.table_cin') }} {{ __('site.table_email') }} {{ __('site.table_status') }} {{ __('site.table_created_at') }}
{{ $cand->nom }} {{ $cand->prenom }}
{{ $cand->gouvernorat ?? '—' }}
{{ $cand->cin ?? '—' }} @if($cand->email) {{ $cand->email }} @else — @endif {{-- try explicit label, else translation by key --}} {{ $cand->etat_label ?? __('site.status_'.$cand->etat) }} {{ optional($cand->created_at)->format('Y-m-d') }}
{{ __('site.no_results') }}
{{ $candidates->appends(request()->except('page'))->links('pagination::bootstrap-5') }}
@endif
@endsection