Skip to content

Commit

Permalink
Fixed: clearing queryString on scanning, clearing current product on …
Browse files Browse the repository at this point in the history
…leaving current page, and condition to check whether current product exists (#494)
  • Loading branch information
amansinghbais committed Nov 12, 2024
1 parent f8f9677 commit 018b927
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/views/CountDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ onIonViewDidEnter(async() => {
onIonViewDidLeave(async() => {
await store.dispatch('count/updateCycleCountItems', []);
store.dispatch("product/currentProduct", {});
})
onBeforeRouteLeave(async (to) => {
Expand Down Expand Up @@ -403,6 +404,7 @@ async function scanProduct() {
if(!selectedItem) {
showToast(translate("Scanned item is not present in the count."))
queryString.value = ""
return;
}
Expand All @@ -423,6 +425,7 @@ async function scanProduct() {
inputCount.value++
}
}
queryString.value = ""
}
function updateFilteredItems() {
Expand Down
2 changes: 1 addition & 1 deletion src/views/ProductItemList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const productStoreSettings = computed(() => store.getters["user/getProductStoreS
const currentProduct = computed(() => store.getters["product/getCurrentProduct"])
onMounted(() => {
if (currentProduct.value) {
if (Object.keys(currentProduct.value).length) {
navigateToDetail(currentProduct.value);
}
})
Expand Down

0 comments on commit 018b927

Please sign in to comment.