diff --git a/src/components/Controls/Barcode.vue b/src/components/Controls/Barcode.vue index ac38f640..4dfd06ab 100644 --- a/src/components/Controls/Barcode.vue +++ b/src/components/Controls/Barcode.vue @@ -8,7 +8,10 @@ border rounded bg-gray-50 - dark:border-gray-800 dark:bg-gray-890 dark:focus-within:bg-gray-900 + dark:text-gray-200 + dark:border-gray-800 + dark:bg-gray-890 + dark:focus-within:bg-gray-900 focus-within:bg-gray-100 " > @@ -84,6 +87,8 @@ export default defineComponent({ })) as { name: string }[]; const name = items?.[0]?.name; + console.log(name, 'name'); + if (!name) { return this.error(this.t`Item with barcode ${barcode} not found.`); } diff --git a/src/components/Controls/weightEnabledBarcode.vue b/src/components/Controls/weightEnabledBarcode.vue index 4388006e..f55cdcd8 100644 --- a/src/components/Controls/weightEnabledBarcode.vue +++ b/src/components/Controls/weightEnabledBarcode.vue @@ -8,7 +8,10 @@ border rounded bg-gray-50 - dark:border-gray-800 dark:bg-gray-890 dark:focus-within:bg-gray-900 + dark:text-gray-200 + dark:border-gray-800 + dark:bg-gray-890 + dark:focus-within:bg-gray-900 focus-within:bg-gray-100 " > @@ -84,10 +87,7 @@ export default defineComponent({ const filters: Record = isWeightEnabled ? { - weightBarcode: barcode.slice( - checkDigit, - checkDigit + itemCodeDigits - ), + barcode: barcode.slice(checkDigit, checkDigit + itemCodeDigits), } : { barcode }; const fields = isWeightEnabled ? ['name', 'unit'] : ['name'];