feat: add low-stock dashboard alerts (#68) #74

Merged
makiolaj merged 2 commits from feature/issue-68-lowstock-dashboard into develop 2026-02-25 01:28:34 +00:00
Showing only changes of commit d23644d90f - Show all commits

View File

@@ -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>