@extends('layouts.app') @section('page-title', 'Commandes en Attente') @section('page-subtitle', 'Gestion des commandes en attente de confirmation') @section('content')
@include('pending-orders.partials.stats', ['stats' => $stats]) @include('pending-orders.partials.filters')
Commandes en Attente {{ $pendingOrders->total() }}
Total: {{ number_format($pendingOrders->sum('price'), 2) }} MAD
@if($pendingOrders->count() > 0)
{{-- ✅ Colonne Équipe --}} @if(auth()->user()->role === 'admin') @endif @foreach($pendingOrders as $order) {{-- ✅ Colonne Équipe --}} @if(auth()->user()->role === 'admin') @endif @endforeach
ID Client Téléphone Produit Prix Équipe Date Statut Actions
#{{ $order->id }}
{{ $order->client_name }} {{-- ✅ Utiliser city correct --}} @if($order->city) {{ $order->city }} @endif
{{ $order->client_phone }}
{{-- ✅ Utiliser products correct --}} {{ $order->products ?? 'Sans produit' }}
{{-- ✅ Utiliser price correct --}} {{ number_format($order->price, 2) }} MAD @if($order->equipe) {{ $order->equipe->name }} @else Non assignée @endif
{{ $order->created_at->format('d/m/Y') }}
{{ $order->created_at->format('H:i') }}
@if(auth()->user()->role === 'admin') @endif
Affichage de {{ $pendingOrders->firstItem() }} à {{ $pendingOrders->lastItem() }} sur {{ $pendingOrders->total() }} commandes
{{ $pendingOrders->links() }}
@else
Aucune commande en attente
@if(request()->hasAny(['search', 'category', 'price_min', 'price_max', 'date_filter']))

Essayez de modifier vos filtres

Réinitialiser les filtres @else

Les commandes en attente apparaîtront ici

@endif
@endif
@include('pending-orders.partials.edit-modal') @include('pending-orders.partials.notes-modal') @endsection @push('scripts') @endpush