{{-- Liste de courses, partagée par l'écran des courses et la fiche d'un chauffeur. --}} @php $hideDriver = $hideDriver ?? false; @endphp
@unless($hideDriver) @endunless @foreach($courses as $course) @php $driver = $course->chauffeur; $driverName = $driver ? ($driver->company ?: trim(($driver->first_name ?? '') . ' ' . ($driver->last_name ?? '')) ?: $driver->name) : null; $status = $course->displayStatus(); $amount = $course->amountDue(); @endphp @unless($hideDriver) @endunless @endforeach
{{ __('chauffeur.booking_reference') }} {{ __('chauffeur.delivery_type') }}{{ __('chauffeur.booking_driver') }}{{ __('chauffeur.booking_client') }} {{ __('chauffeur.booking_pickup') }} → {{ __('chauffeur.booking_dropoff') }} {{ __('chauffeur.booking_when') }} {{ __('chauffeur.booking_amount') }} {{ __('surmesure.status') }}
#{{ $course->id }} {{ __('messages.admin_course_kind_' . $course->kind) }} @if($course->range_label)
{{ $course->range_label }}
@endif
@if($driver && ! $course->isRestaurantDelivery()) {{ $driverName }} @else {{ $driverName ?? '—' }} @endif {{ $course->client?->name ?? '—' }} @if($course->client_phone)
{{ $course->client_phone }}
@endif
{{ $course->pickup_address ?: '—' }} → {{ $course->dropoff_address ?: '—' }} @if($course->isImmediate()) {{ __('chauffeur.booking_mode_now') }} @else {{ $course->scheduled_at?->format('d/m/Y H:i') }} @endif
{{ __('messages.requested_on') }} {{ $course->created_at?->format('d/m/Y H:i') }}
{{ $amount ? number_format($amount, 2, ',', ' ') . ' ' . currency_symbol($course->currency) : '—' }} @php $statusClass = match ($status) { 'completed' => 'bg-success', 'in_progress', 'paid' => 'bg-primary', 'chauffeur_accepted' => 'bg-info', 'pending_chauffeur' => 'bg-warning text-dark', default => 'bg-secondary', }; @endphp {{ __('chauffeur.booking_status_' . $status) }} {{ __('restaurant.view') }}