feat: add low-stock dashboard alerts (#68) #74
@@ -83,12 +83,20 @@
|
|||||||
@updated="handleItemUpdated"
|
@updated="handleItemUpdated"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- Dashboard Cards -->
|
||||||
|
<div class="grid gap-6 mb-6 md:grid-cols-2">
|
||||||
<!-- Expiry Dashboard -->
|
<!-- Expiry Dashboard -->
|
||||||
<div class="mb-6">
|
|
||||||
<InventoryExpiryDashboard
|
<InventoryExpiryDashboard
|
||||||
:items="inventoryItems"
|
:items="inventoryItems"
|
||||||
@view-item="editingItem = $event"
|
@view-item="editingItem = $event"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- Low Stock Dashboard -->
|
||||||
|
<InventoryLowStockDashboard
|
||||||
|
:items="inventoryItems"
|
||||||
|
@view-item="editingItem = $event"
|
||||||
|
@restock-item="handleRestockFromDashboard"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Inventory List -->
|
<!-- Inventory List -->
|
||||||
@@ -169,4 +177,9 @@ const handleItemUpdated = async (item: any) => {
|
|||||||
inventoryListRef.value?.reload()
|
inventoryListRef.value?.reload()
|
||||||
await loadInventoryData()
|
await loadInventoryData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleRestockFromDashboard = (item: any) => {
|
||||||
|
// Open edit modal with the item (user can use Restock button there)
|
||||||
|
editingItem.value = item
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user