Show empty results message on product filters

This commit is contained in:
beatz174-bit committed 2025-11-24 07:32:20 +10:00
1 parent 4e785a1680
commit 141c2af06f
2 files changed
+53 -9

No files matched your search

+15 -9
View File
@@ -352,15 +352,21 @@ export const ManageProductsScreen = () => {
Save Product
</Button>
</Stack>
{sortedFiltered.map((product) => (
<ProductRow
key={product.id}
product={product}
categories={categoryOptions}
onSave={updateProduct}
onDelete={deleteProduct}
/>
))}
{sortedFiltered.length === 0 ? (
<Typography variant="body2" color="text.secondary">
No products match your search and category filter.
</Typography>
) : (
sortedFiltered.map((product) => (
<ProductRow
key={product.id}
product={product}
categories={categoryOptions}
onSave={updateProduct}
onDelete={deleteProduct}
/>
))
)}
</Stack>
<Dialog open={scannerOpen} onClose={() => setScannerOpen(false)} fullWidth>
<DialogTitle>Scan Barcode</DialogTitle>