@extends('layouts.admin-modern') @section('title', 'Livreur - ' . ($driver->first_name ?? '') . ' ' . ($driver->last_name ?? '')) @section('page-title', 'Détail du Livreur') @section('content')
Retour à la liste
{{ strtoupper(substr($driver->first_name ?? 'L', 0, 1)) }}{{ strtoupper(substr($driver->last_name ?? '', 0, 1)) }}

{{ $driver->first_name }} {{ $driver->last_name }}

{{ $driver->user->email ?? '—' }} {{ $driver->phone ?? '—' }} @php $vehicleIcons = ['bicycle' => 'fa-bicycle', 'scooter' => 'fa-motorcycle', 'car' => 'fa-car', 'van' => 'fa-shuttle-van']; @endphp {{ ucfirst($driver->vehicle_type ?? '—') }}
@if($driver->is_suspended) Suspendu @elseif($driver->is_active) Actif @else En attente d'approbation @endif
Statistiques
  • Note {{ number_format($driver->rating ?? 0, 1) }}/5
  • Livraisons totales {{ $driver->total_deliveries ?? 0 }}
  • Livraisons ce mois {{ $monthlyStats['deliveries'] ?? 0 }}
  • Gains ce mois {{ number_format($monthlyStats['earnings'] ?? 0, 2) }}€
  • Temps moyen {{ $monthlyStats['avg_time'] ?? 0 }} min
  • Inscrit le {{ $driver->created_at?->format('d/m/Y') ?? '—' }}
Stripe Connect
@if($driver->stripe_onboarding_complete)
Compte Stripe vérifié
ID: {{ $driver->stripe_account_id }} @elseif($driver->stripe_account_id)
Onboarding Stripe incomplet
@else
Stripe non configuré
@endif
@if($driver->sponsor_prestataire_id)
Parrainage

Parrainé par : {{ $driver->sponsorPrestataire->business_name ?? $driver->sponsorPrestataire->user->name ?? 'Prestataire #' . $driver->sponsor_prestataire_id }}

Depuis : {{ $driver->sponsored_at ? \Carbon\Carbon::parse($driver->sponsored_at)->format('d/m/Y') : '—' }}

@endif
Actions
@if(!$driver->is_active && !$driver->is_suspended)
@csrf
@endif @if($driver->is_active && !$driver->is_suspended) @endif @if($driver->is_suspended)
@csrf
@endif
@csrf @method('DELETE')
Dernières livraisons
@forelse($recentOrders as $order) @empty @endforelse
Commande Client Prestataire Total Commission Statut Date
#{{ $order->order_number ?? $order->id }} {{ $order->client->name ?? '—' }} {{ $order->prestataire->business_name ?? $order->prestataire->user->name ?? '—' }} {{ number_format($order->total ?? 0, 2) }}€ {{ number_format($order->driver_commission ?? 0, 2) }}€ @php $dsClass = match($order->delivery_status ?? 'pending') { 'delivered' => 'success', 'in_transit' => 'primary', 'picked_up' => 'info', 'assigned' => 'warning', 'failed' => 'danger', default => 'secondary' }; $dsLabel = match($order->delivery_status ?? 'pending') { 'delivered' => 'Livrée', 'in_transit' => 'En route', 'picked_up' => 'Récupérée', 'assigned' => 'Assignée', 'failed' => 'Échouée', default => 'En attente' }; @endphp {{ $dsLabel }} {{ $order->created_at?->format('d/m H:i') ?? '—' }}
Aucune livraison
@endsection