From aa7658b0d437c029d365a45744b0ed488b7b2485 Mon Sep 17 00:00:00 2001 From: Crumb Owl Date: Mon, 14 Jul 2025 21:23:40 +0000 Subject: [PATCH] ProductBarcode: fix barcode value not updated + fix search button not reset properly --- frontend/components/Item/BarcodeModal.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/components/Item/BarcodeModal.vue b/frontend/components/Item/BarcodeModal.vue index 63a03517..a31e462b 100644 --- a/frontend/components/Item/BarcodeModal.vue +++ b/frontend/components/Item/BarcodeModal.vue @@ -9,7 +9,7 @@ @@ -138,6 +138,7 @@ onMounted(() => { registerOpenDialogCallback(DialogID.ProductImport, params => { selectedRow.value = -1; + searching.value = false; if (params?.barcode) { // Reset if the barcode is different @@ -165,14 +166,14 @@ } async function retrieveProductInfo(barcode: string) { - products.value = null; - searching.value = true; - if (!barcode || barcode.trim().length === 0) { console.error("Invalid barcode provided"); return; } + products.value = null; + searching.value = true; + try { const result = await api.products.searchFromBarcode(barcode.trim()); if (result.error) {