Skip to content

Commit

Permalink
Added: check to only move items to rejected parking for specific prod…
Browse files Browse the repository at this point in the history
…store.
  • Loading branch information
ravilodhi committed Jul 22, 2024
1 parent 2ae4431 commit 0f32e71
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/views/order-popover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,27 @@ import {
alertController,
modalController,
} from "@ionic/vue";
import { defineComponent } from "vue";
import { computed, defineComponent } from "vue";
import WarehouseModal from "@/views/warehouse-modal.vue";
import { useStore } from "@/store";
import PromiseDateModal from "@/views/promise-date-modal.vue";
import { mapGetters } from "vuex";
export default defineComponent({
name: "OrderPopover",
props: ['item'],
computed: {
...mapGetters({
currentEComStore: 'user/getCurrentEComStore'
})
},
methods: {
async releaseItem (item: any) {
return this.store.dispatch("order/releaseItem", {
orderId: item.orderId,
orderItemSeqId: item.orderItemSeqId,
changeReasonEnumId: "RELEASED",
toFacilityId: "RELEASED_ORD_PARKING" // TODO Make it configurable, currently this is for SM only
toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable, currently this is for SM only
})
},
async cancelItem (item: any) {
Expand Down
3 changes: 2 additions & 1 deletion src/views/orders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ export default defineComponent({
selectedItemsCount: 'order/getSelectedItemsCount',
userProfile: 'user/getUserProfile',
query: 'order/getQuery',
currentEComStore: 'user/getCurrentEComStore'
}),
},
methods: {
Expand All @@ -294,7 +295,7 @@ export default defineComponent({
},
async releaseItems() {
emitter.emit("presentLoader")
const selectedItems = this.getSelectedItemsToRelease("RELEASED_ORD_PARKING", "RELEASED"); // TODO Make it configurable, currently this is for SM only
const selectedItems = this.getSelectedItemsToRelease(this.currentEComStore.productStoreId === "SM_STORE" ? "RELEASED_ORD_PARKING" : "_NA_", "RELEASED"); // TODO Make it configurable, currently this is for SM only
const json = JSON.stringify(selectedItems);
const blob = new Blob([json], { type: 'application/json'});
const formData = new FormData();
Expand Down
2 changes: 1 addition & 1 deletion src/views/product-details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export default defineComponent({
orderId: item.orderId,
orderItemSeqId: item.orderItemSeqId,
changeReasonEnumId: "RELEASED",
toFacilityId: "RELEASED_ORD_PARKING" // TODO Make it configurable, this is for SM only as of now
toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable, this is for SM only as of now
}
})
selectedItems = [...selectedItems, ...items];
Expand Down

0 comments on commit 0f32e71

Please sign in to comment.