filtre sur la page demande de sortie

This commit is contained in:
Stephane 2025-07-24 22:00:10 +03:00
parent b415b9f501
commit 2764111fa4

View File

@ -124,7 +124,11 @@ class _DemandeSortiePersonnellePageState
try { try {
final products = await _database.getProducts(); final products = await _database.getProducts();
setState(() { setState(() {
_products = products.where((p) => (p.stock ?? 0) > 0).toList(); _products = products
.where((p) =>
(p.stock ?? 0) > 0 &&
p.pointDeVenteId == _userController.pointDeVenteId)
.toList();
_filteredProducts = _products; _filteredProducts = _products;
_isLoading = false; _isLoading = false;
}); });