@extends('layouts.app') @section('content') @if (session('error'))

{{ session('error') }}

@endif
@if($products->isNotEmpty())
@foreach($products as $product) @include('inventory.products.partials.edit_quantity', ['product' => $product]) @endforeach
Produit Catégorie Prix Quantité Date d'expiration Créé par Actions
{{ $product->category->name ?? '-' }} {{ number_format($product->price, 0, ',', ' ') }} FCFA {{ $product->quantity }} {{ $product->date_expiration ?? '-' }} {{ $product->user ? ($product->user->nom . ' ' . $product->user->prenom) : '-' }}
@csrf @method('DELETE')
@else @include('partials.empty-state', [ 'icon' => 'calendar', 'title' => 'Aucun produit expiré', 'description' => 'Bonne nouvelle : aucun produit n’a dépassé sa date d’expiration' . (isset($magasin) && $magasin ? ' pour « ' . $magasin->name . ' »' : '') . '.', 'actionUrl' => route('inventory.add-product'), 'actionLabel' => 'Ajouter un produit', ]) @endif
@endsection