Skip to content

Commit

Permalink
Improved: updated the parameter name for the check of hard count whil…
Browse files Browse the repository at this point in the history
…e fetching items (#647)
  • Loading branch information
amansinghbais committed Jan 20, 2025
1 parent ebcfbe0 commit b077081
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/store/modules/count/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ const actions: ActionTree<CountState, RootState> = {
if(payload.isSortingRequired) items = sortListByField(items, "parentProductName");

this.dispatch("product/fetchProducts", { productIds: [...new Set(items.map((item: any) => item.productId))] })
if(payload.hasCachedProducts) {
if(payload.isHardCount) {
const cachedProducts = state.cachedUnmatchProducts[payload.inventoryCountImportId]?.length ? JSON.parse(JSON.stringify(state.cachedUnmatchProducts[payload.inventoryCountImportId])) : [];
if(cachedProducts?.length) items = items.concat(cachedProducts)
}
Expand Down
2 changes: 1 addition & 1 deletion src/views/HardCountDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ const isSubmittingForReview = ref(false);
onIonViewDidEnter(async() => {
emitter.emit("presentLoader");
await Promise.allSettled([fetchCycleCount(), await store.dispatch("count/fetchCycleCountItems", { inventoryCountImportId : props?.id, isSortingRequired: false, hasCachedProducts: true }), store.dispatch("user/getProductStoreSetting", currentFacility.value?.productStore?.productStoreId)])
await Promise.allSettled([fetchCycleCount(), await store.dispatch("count/fetchCycleCountItems", { inventoryCountImportId : props?.id, isSortingRequired: false, isHardCount: true }), store.dispatch("user/getProductStoreSetting", currentFacility.value?.productStore?.productStoreId)])
previousItem = itemsList.value[0];
await store.dispatch("product/currentProduct", itemsList.value?.length ? itemsList.value[0] : {})
barcodeInputRef.value?.$el?.setFocus();
Expand Down

0 comments on commit b077081

Please sign in to comment.