Skip to content

Commit

Permalink
Improved: reverted unwanted changes in countDetail and simplified cyc…
Browse files Browse the repository at this point in the history
…leCount items fetching logic (#528)
  • Loading branch information
amansinghbais committed Dec 23, 2024
1 parent c6b01f6 commit 39943aa
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/views/CountDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,7 @@ const barcodeInput = ref();
let isScanningInProgress = ref(false);
onIonViewDidEnter(async() => {
await fetchCycleCount();
await fetchCycleCountItems();
await Promise.allSettled([await fetchCycleCount(), store.dispatch("count/fetchCycleCountItems", { inventoryCountImportId : props?.id })])
selectedSegment.value = 'all';
queryString.value = '';
previousItem = itemsList.value[0]
Expand Down Expand Up @@ -348,10 +347,6 @@ function inputCountValidation(event) {
if(/[`!@#$%^&*()_+\-=\\|,.<>?~e]/.test(event.key) && event.key !== 'Backspace') event.preventDefault();
}
async function fetchCycleCountItems() {
await store.dispatch("count/fetchCycleCountItems", { inventoryCountImportId : props?.id });
}
async function fetchCycleCount() {
emitter.emit("presentLoader");
let payload = props?.id
Expand Down Expand Up @@ -463,7 +458,6 @@ const onScroll = (event) => {
previousItem = currentProduct // Update the previousItem variable with the current item
if (currentProduct) {
const currentIndex = itemsList.value?.indexOf(currentProduct);
store.dispatch("product/currentProduct", currentProduct);
product.value.isRecounting = false;
}
Expand Down

0 comments on commit 39943aa

Please sign in to comment.