diff --git a/src/components/displays/department/pos/steps/mobile/PosDepartmentStepMobile1.vue b/src/components/displays/department/pos/steps/mobile/PosDepartmentStepMobile1.vue index fb8b4e6b..05db30cc 100644 --- a/src/components/displays/department/pos/steps/mobile/PosDepartmentStepMobile1.vue +++ b/src/components/displays/department/pos/steps/mobile/PosDepartmentStepMobile1.vue @@ -25,6 +25,10 @@ import PosDepartmentStepMobileFixedBottomControl from "@/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobileFixedBottomControl.vue"; import PosDepartmentStepMobile1Location from "@/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobile1Location.vue"; +import PosDepartmentStepMobile1Debug + from "@/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobile1Debug.vue"; +//TODO: Remove this +const debug_request_results = ref([]); const lastParsedImage = ref(null); const setLastCapturedImage = (image: string) => { @@ -86,14 +90,20 @@ const parseImage = (image: string) => { base64_image: image }, ).then((response) => { + debug_request_results.value.push(response); // TODO: Remove this debug line + // If the response is not successful, log an error and return + if (!response.data.success) { + console.error("LPR request was not successful:", response); + return; + } latestLPRResponse.value = response.data.data as LPRResponse; console.log("LPR Response:", latestLPRResponse.value); // Set the last successful capture time camera.setLastSuccess(); // Handle parsed result. handleLPRResult() - }).catch((error) => { + debug_request_results.value.push(error); // TODO: Remove this debug line console.error("Error parsing image:", error); }); }; @@ -224,6 +234,8 @@ onUnmounted(() => {