@extends('layouts.app_gerant') @section('title', 'Page des Commandes') @section('content')
+ Nouvelle Commande
@forelse ($commandes as $commande) @empty @endforelse
ID Nom du Client Statut Commande Date de Commande Table Téléphone Actions
{{ $commande->id }} {{ $commande->client_name }} @php $badgeColor = ''; $textColor = '#fff'; // Couleur du texte par défaut switch (strtolower($commande->statut)) { case 'en_cours': $badgeColor = '#dfad0c'; // Jaune pour "en cours" $textColor = '#000'; // Noir pour le texte break; case 'terminee': $badgeColor = '#4BC54F'; // Vert pour "terminée" break; case 'annulee': $badgeColor = '#df3517'; // Rouge pour "annulé" break; default: $badgeColor = '#888'; // Gris pour les autres statuts break; } @endphp {{ ucfirst($commande->statut) }} {{ $commande->created_at->format('d/m/Y H:i') }} @if ($commande->table) {{ $commande->table->id }} @else NA @endif {{ $commande->telephone_client }}
Aucune commande trouvée.
{{ $commandes->links() }}
@endsection {{-- Encaissement --}}