@extends('backoffice.dashboard') @section('content') @php $etatKey = $concours_ext->etat ?? 'en_cours'; $etatLabel = match($etatKey) { 'en_cours' => 'قيد الدراسة', 'refuse' => 'مرفوض', 'acceptation_primaire' => 'قبول أولي', 'acceptation_definitif' => 'قبول نهائي', default => $etatKey, }; @endphp
{{-- Header --}}
عرض الطلب
تفاصيل الطلب المعرّف رقم #{{ $concours_ext->id }}
{{ $etatLabel }}
{{-- Body --}}
{{-- Status widget: select (keeps previous behavior but visually separated) --}}
{{-- Build unified list of fields (static + dynamic) --}} @php $staticFields = [ ['label'=>'الاسم', 'value'=>($concours_ext->nom . ' ' . $concours_ext->prenom)], ['label'=>'رقم بطاقة التعريف', 'value'=>$concours_ext->cin], ['label'=>'الهاتف', 'value'=>$concours_ext->tel], ['label'=>'البريد', 'value'=>$concours_ext->email], ['label'=>'العنوان', 'value'=>$concours_ext->adresse], ['label'=>'الولاية', 'value'=>$concours_ext->gouvernorat], ['label'=>'الرمز البريدي', 'value'=>$concours_ext->code_postale], ['label'=>'أنشئ في', 'value'=> optional($concours_ext->created_at)->format('Y-m-d H:i')], ]; $allFields = $staticFields; if (!empty($dynamic)) { foreach($dynamic as $d) { $allFields[] = ['label' => $d['label'], 'value' => $d['value']]; } } @endphp {{-- Render fields uniformly --}}
@foreach($allFields as $f)
{{ $f['label'] }}
{!! nl2br(e($f['value'] ?? '—')) !!}
@endforeach
{{-- Files --}} @if(!empty($files))
الملفات المرفوعة
{{ count($files) }} ملف
@foreach($files as $f)
{{ $f['original_name'] }}
{{ $f['definition_label'] ?? $f['definition_key'] ?? '' }} • {{ $f['mime'] ?? '' }} • {{ number_format($f['size'] ?? 0) }} bytes
@endforeach
@endif
{{-- Footer actions: return on left, save on right --}}
{{-- end card --}}
@endsection