@extends('layouts.admin-modern') @section('page-title', 'Gestion des Commandes') @section('content')
Gérez toutes les commandes et transactions de votre plateforme
| Commande | Client | Prestataire | Service | Montant | Statut | Date | Actions | |
|---|---|---|---|---|---|---|---|---|
|
#{{ $order['type'] === 'service' ? 'SRV' : 'EQP' }}-{{ str_pad($order['id'], 6, '0', STR_PAD_LEFT) }}
{{ $order['type'] === 'service' ? 'Réservation de service' : 'Location d\'équipement' }}
|
{{ strtoupper(substr($order['client_name'] ?? 'U', 0, 1)) }}
{{ $order['client_name'] ?? 'Client inconnu' }}
Client
|
{{ strtoupper(substr($order['prestataire_name'] ?? 'P', 0, 1)) }}
{{ $order['prestataire_name'] ?? 'Prestataire inconnu' }}
Prestataire
|
{{ $order['service_name'] ?? 'N/A' }}
{{ $order['type'] === 'service' ? 'Service' : 'Équipement' }}
|
{{ number_format($order['amount'] ?? 0, 2, ',', ' ') }}€
|
@php $statusConfig = [ 'pending' => ['color' => 'var(--warning)', 'bg' => 'rgba(245, 158, 11, 0.1)', 'icon' => 'fas fa-clock', 'text' => 'En attente'], 'confirmed' => ['color' => 'var(--info)', 'bg' => 'rgba(59, 130, 246, 0.1)', 'icon' => 'fas fa-check', 'text' => 'Confirmée'], 'in_progress' => ['color' => 'var(--primary)', 'bg' => 'rgba(99, 102, 241, 0.1)', 'icon' => 'fas fa-play', 'text' => 'En cours'], 'completed' => ['color' => 'var(--success)', 'bg' => 'rgba(16, 185, 129, 0.1)', 'icon' => 'fas fa-check-circle', 'text' => 'Terminée'], 'cancelled' => ['color' => 'var(--danger)', 'bg' => 'rgba(239, 68, 68, 0.1)', 'icon' => 'fas fa-times-circle', 'text' => 'Annulée'], 'accepted' => ['color' => 'var(--info)', 'bg' => 'rgba(59, 130, 246, 0.1)', 'icon' => 'fas fa-check', 'text' => 'Acceptée'], 'active' => ['color' => 'var(--primary)', 'bg' => 'rgba(99, 102, 241, 0.1)', 'icon' => 'fas fa-play', 'text' => 'Active'] ]; $status = $statusConfig[$order['status'] ?? 'pending'] ?? $statusConfig['pending']; @endphp {{ $status['text'] }} |
{{ \Carbon\Carbon::parse($order['created_at'])->format('d/m/Y') }}
{{ \Carbon\Carbon::parse($order['created_at'])->format('H:i') }}
|
||
|
Aucune commande trouvée
Les commandes apparaîtront ici une fois créées
|
||||||||