mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-24 06:28:34 +01:00
ProductBarcode: create a dedicated dialog for product selection
This commit is contained in:
@@ -93,47 +93,7 @@
|
||||
};
|
||||
|
||||
const handleButtonClick = () => {
|
||||
console.log("Button clicked!");
|
||||
|
||||
getQRCodeUrl();
|
||||
// console.log("Value::: ", productEAN);
|
||||
|
||||
/* const route2 = useRoute();
|
||||
|
||||
const currentURL = window.location.href;
|
||||
// Adjust route import as needed
|
||||
console.log(route2(`/getproductfromean`)); */
|
||||
};
|
||||
|
||||
/*
|
||||
function openCreateModal(ItemCreate ic) {
|
||||
this.$emit('open-modal', ic)
|
||||
}
|
||||
*/
|
||||
|
||||
async function getQRCodeUrl() {
|
||||
/* const { isCanceled } = await confirm.open(
|
||||
"Are you sure you want to ensure all assets have an ID? This can take a while and cannot be undone."
|
||||
);
|
||||
|
||||
if (isCanceled) {
|
||||
return;
|
||||
} */
|
||||
|
||||
const result = await api.actions.getEAN(detectedBarcode.value);
|
||||
|
||||
// this.$store.commit('setScannedData', result);
|
||||
|
||||
if(result.error)
|
||||
return
|
||||
|
||||
openDialog("create-item", result.data);
|
||||
|
||||
/* if (result.error) {
|
||||
toast.error("Failed to ensure asset IDs.");
|
||||
} */
|
||||
|
||||
// toast.success(`${result.data.completed} assets have been updated.`);
|
||||
openDialog("product-import", detectedBarcode.value);
|
||||
};
|
||||
|
||||
const startScanner = async () => {
|
||||
|
||||
Reference in New Issue
Block a user