@extends('layouts.admin-modern') @section('title', 'Gestion de l\'Inventaire') @section('page-title', 'Gestion de l\'Inventaire') @section('content')
Total produits
{{ $stats['total'] ?? 1245 }}
En stock
{{ $stats['in_stock'] ?? 987 }}
Stock faible
{{ $stats['low_stock'] ?? 58 }}
Rupture
{{ $stats['out_of_stock'] ?? 12 }}
@if(($stats['low_stock'] ?? 58) > 0)
Attention ! {{ $stats['low_stock'] ?? 58 }} produits ont un stock faible et nécessitent un réapprovisionnement. Voir la liste →
@endif
Filtres
Inventaire Global
@forelse($inventory ?? [] as $item) @empty @endforelse
SKU Produit Prestataire Catégorie Prix Stock Seuil alerte Statut Dernière MAJ Actions
{{ $item->sku ?? 'SKU-' . rand(10000, 99999) }}
{{ $item->name }} {{ $item->name ?? 'Produit' }}
{{ $item->prestataire->user->name ?? 'Prestataire' }} {{ $item->category ?? 'Équipement' }} {{ number_format($item->price ?? rand(50, 500), 2) }} € {{ $item->stock ?? rand(0, 100) }} {{ $item->alert_threshold ?? 10 }} @php $stock = $item->stock ?? rand(0, 100); $threshold = $item->alert_threshold ?? 10; if ($stock == 0) { $statusClass = 'danger'; $statusLabel = 'Rupture'; } elseif ($stock <= $threshold) { $statusClass = 'warning'; $statusLabel = 'Stock faible'; } else { $statusClass = 'success'; $statusLabel = 'En stock'; } @endphp {{ $statusLabel }} {{ $item->updated_at ? $item->updated_at->format('d/m/Y H:i') : now()->format('d/m/Y H:i') }}

Aucun article en inventaire

@endsection