ProductBarcode: create a dedicated dialog for product selection

This commit is contained in:
Crumb Owl
2025-07-02 11:58:23 +02:00
parent a3c13a8a74
commit fb17b56f09
4 changed files with 207 additions and 41 deletions

View File

@@ -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 () => {