@extends('layouts.app') @section('title', 'Carte Pro – Livreur') @push('styles') @endpush @section('content')

Chargement de la carte...

{{ number_format($todayStats['earnings'] ?? 0, 2) }}€ Gains
{{ $todayStats['completed'] ?? 0 }} Courses
{{ number_format($todayStats['total_km'] ?? 0, 1) }} Km
@if(($surgeMultiplier ?? 1) > 1)
x{{ number_format($surgeMultiplier, 1) }} Surge
@endif
0
km/h
🍽️

Nouvelle commande

Adresse du restaurant

30
Distance
? km
Commission
? €
Articles
?
Montant
? €
@if($activeOrders->count() > 0)
🚀
{{ $activeOrders->count() }} course{{ $activeOrders->count() > 1 ? 's' : '' }} en cours
@php $nextOrder = $activeOrders->first(); @endphp {{ $nextOrder?->prestataire?->company_name ?? 'Prochaine livraison' }} · {{ $nextOrder->delivery_distance ?? '?' }} km · ~{{ $nextOrder->estimated_delivery_time ?? '?' }} min
+{{ number_format($activeOrders->sum('driver_commission'), 2) }}€
@elseif($pendingNearby->count() > 0)
📋
{{ $pendingNearby->count() }} commande{{ $pendingNearby->count() > 1 ? 's' : '' }} dispo
À proximité · Glissez pour voir
@else
Aucune commande
En attente… dernière vérif. à l'instant
@endif
@unless($internalOnlyMode) @endunless
@unless($internalOnlyMode)
@csrf
@endunless @if($internalOnlyMode)
Mode interne: vous voyez uniquement les tournées assignées par votre prestataire.
@endif
📊 Aujourd'hui
{{ $todayStats['completed'] ?? 0 }}
Livraisons
{{ number_format($todayStats['earnings'] ?? 0, 2) }}€
Gains
{{ number_format($todayStats['total_km'] ?? 0, 1) }}
Km total
~{{ $todayStats['avg_time'] ?? 0 }} min
Moy. temps
@if($activeOrders->count() > 0)
🚀 Mes courses {{ $activeOrders->count() }}
@foreach($activeOrders as $order)
@if($order->delivery_status === 'assigned')📍 @elseif($order->delivery_status === 'picked_up')✅ @else🚗@endif
--:--
{{ $order->prestataire?->company_name ?? 'Restaurant' }}
@if($order->delivery_status === 'assigned') 📍 {{ Str::limit($order->prestataire?->address ?? '', 35) }} @else 🏠 {{ Str::limit($order->delivery_address ?? '', 35) }} @endif
{{ $order->items->count() ?? 0 }} article(s) · #{{ $order->id }} · {{ $order->client->name ?? 'Client' }}
+{{ number_format($order->driver_commission ?? 2, 2) }}€ {{ $order->delivery_distance ?? '?' }} km ~{{ $order->estimated_delivery_time ?? '?' }} min @if($order->status === 'ready') ✓ Prêt @elseif($order->status === 'preparing') ⏳ Préparation @endif @if($order->payment_method ?? false) {{ $order->payment_method === 'cash' ? '💵 Espèces' : '💳 Carte' }} @endif
@if($order->delivery_status === 'assigned') @elseif($order->delivery_status === 'picked_up') @endif 🧭 GPS
@endforeach @endif @if($pendingNearby->count() > 0)
📋 Commandes à proximité {{ $pendingNearby->count() }}
@foreach($pendingNearby as $order)
🍽️
{{ $order->prestataire?->company_name ?? 'Restaurant' }}
📍 {{ Str::limit($order->prestataire?->address ?? '', 35) }}
{{ $order->items->count() ?? '?' }} article(s) · 🏠 {{ Str::limit($order->delivery_address ?? '', 25) }}
{{ number_format($order->distance_from_driver ?? 0, 1) }} km {{ number_format($order->total ?? 0, 2) }}€ ~+{{ number_format(($order->driver_commission ?? 0), 2) }}€ @if($order->status === 'ready') ✓ Prêt @endif
@endforeach @endif @if($activeOrders->count() === 0 && $pendingNearby->count() === 0)

Aucune commande à proximité

Restez en ligne, les commandes arrivent bientôt.
Rafraîchissement auto toutes les 30s.
@endif
👤 Mon profil
@if($driver->vehicle_type === 'bike')🚲 @elseif($driver->vehicle_type === 'scooter')🛵 @elseif($driver->vehicle_type === 'car')🚗 @else🚚@endif
{{ $driver->first_name }} {{ $driver->last_name }}
⭐ {{ number_format($driver->rating ?? 0, 1) }} · {{ $driver->completed_deliveries ?? 0 }} livraisons · {{ ucfirst($driver->vehicle_type ?? 'véhicule') }} @if($driver->vehicle_plate) · {{ $driver->vehicle_plate }} @endif
@endsection