From 6eb3169be394fb575733faa74cd93d8f7aa34510 Mon Sep 17 00:00:00 2001 From: Pantry Lead Agent Date: Wed, 25 Feb 2026 01:27:07 +0000 Subject: [PATCH 1/2] feat: create ExpiryDashboard component (#69) --- app/components/inventory/ExpiryDashboard.vue | 130 +++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 app/components/inventory/ExpiryDashboard.vue diff --git a/app/components/inventory/ExpiryDashboard.vue b/app/components/inventory/ExpiryDashboard.vue new file mode 100644 index 0000000..88d639a --- /dev/null +++ b/app/components/inventory/ExpiryDashboard.vue @@ -0,0 +1,130 @@ + + + -- 2.49.1 From bf4d365357493e716eaacdaf3053ed7547aaa308 Mon Sep 17 00:00:00 2001 From: Pantry Lead Agent Date: Wed, 25 Feb 2026 01:27:27 +0000 Subject: [PATCH 2/2] feat: integrate ExpiryDashboard into inventory page (#69) --- app/pages/index.vue | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/app/pages/index.vue b/app/pages/index.vue index 75cea09..d71f6e2 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -83,6 +83,14 @@ @updated="handleItemUpdated" /> + +
+ +
+ (null) const selectedTagFilters = ref([]) const searchQuery = ref('') +const inventoryItems = ref([]) + +// Load inventory for dashboard +const { getInventory } = useInventory() + +const loadInventoryData = async () => { + const { data } = await getInventory() + inventoryItems.value = data || [] +} // Handle scan-to-add flow (Issue #25) -onMounted(() => { +onMounted(async () => { + // Load inventory for dashboard + await loadInventoryData() + if (route.query.action === 'add') { // Pre-fill data from query params (from scan) prefilledData.value = { @@ -136,15 +156,17 @@ const handleCloseAddForm = () => { prefilledData.value = null } -const handleItemAdded = (item: any) => { +const handleItemAdded = async (item: any) => { showAddForm.value = false prefilledData.value = null - // Reload the inventory list + // Reload the inventory list and dashboard inventoryListRef.value?.reload() + await loadInventoryData() } -const handleItemUpdated = (item: any) => { +const handleItemUpdated = async (item: any) => { editingItem.value = null inventoryListRef.value?.reload() + await loadInventoryData() } -- 2.49.1