From a57b83c52d538650e7eb8744b87598f9dd7d1dd8 Mon Sep 17 00:00:00 2001 From: Crumb Owl Date: Tue, 15 Jul 2025 13:21:19 +0000 Subject: [PATCH] ProductBarcode: various fix requested by Tonya - fix many missing translations - properly reset QR scanner when reopening - add error message on BarcodeModal when no item is found - fix icon size in item CreateModal - remove useless closeDialog --- frontend/components/App/ScannerModal.vue | 1 + frontend/components/Item/BarcodeModal.vue | 14 ++++++++++---- frontend/components/Item/CreateModal.vue | 6 ++---- frontend/locales/en.json | 9 ++++++++- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/frontend/components/App/ScannerModal.vue b/frontend/components/App/ScannerModal.vue index ef6ca129..a5ba56c5 100644 --- a/frontend/components/App/ScannerModal.vue +++ b/frontend/components/App/ScannerModal.vue @@ -137,6 +137,7 @@ watch(open, async isOpen => { if (isOpen) { + detectedBarcode.value = ""; await startScanner(); } else { stopScanner(); diff --git a/frontend/components/Item/BarcodeModal.vue b/frontend/components/Item/BarcodeModal.vue index a174b705..f2deee7f 100644 --- a/frontend/components/Item/BarcodeModal.vue +++ b/frontend/components/Item/BarcodeModal.vue @@ -107,6 +107,7 @@ diff --git a/frontend/locales/en.json b/frontend/locales/en.json index 9024299d..9c3aafcd 100644 --- a/frontend/locales/en.json +++ b/frontend/locales/en.json @@ -130,7 +130,11 @@ "product_import": { "title": "Import product", "barcode": "Product's barcode", - "search_item": "Search product" + "db_source": "DB source", + "search_item": "Search product", + "error_invalid_barcode": "Invalid barcode provided", + "error_exception": "Exception occured while retrieving item barcode: ", + "error_not_found": "No product found with give barcode." }, "view": { "selectable": { @@ -191,6 +195,9 @@ "shortcut_hint": "Use the number keys to quickly select an action." } }, + "errors": { + "api_failure": "Backend API call failed: " + }, "global": { "add": "Add", "archived": "Archived",