Skip to content

Commit

Permalink
Implemented: support to display the storeName from group level instea…
Browse files Browse the repository at this point in the history
…d of the one selected in current context(#99)
  • Loading branch information
ymaheshwari1 committed Feb 15, 2024
1 parent 1a7d473 commit cf2f6d7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 5 additions & 2 deletions src/components/RoutingHistoryModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<p>{{ groupName }}</p>
</ion-label>
<ion-label slot="end">
{{ currentEComStore.productStoreId }}
{{ productStoreName }}
</ion-label>
</ion-item>
<div class="empty-state" v-if="!routingHistory.length">
Expand Down Expand Up @@ -72,7 +72,10 @@ defineProps({
}
})
const currentEComStore = computed(() => store.getters["user/getCurrentEComStore"])
const userProfile = computed(() => store.getters["user/getUserProfile"])
const currentRoutingGroup: any = computed(() => store.getters["orderRouting/getCurrentRoutingGroup"])
const productStoreName = computed(() => userProfile.value.stores.find((store: any) => store.productStoreId === currentRoutingGroup.value.productStoreId)?.storeName || currentRoutingGroup.value.productStoreId)
function closeModal() {
modalController.dismiss();
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/util/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const actions: ActionTree<UtilState, RootState> = {
commit(types.UTIL_SHIPPING_METHOD_UPDATED, {})
},

async udpateFacillityGroups({ commit }) {
async updateFacillityGroups({ commit }) {
commit(types.UTIL_FACILITY_GROUP_UPDATED, {})
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/views/BrokeringRoute.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ let orderRoutings = ref([]) as any
let groupHistory = ref([]) as any
const currentRoutingGroup: any = computed((): Group => store.getters["orderRouting/getCurrentRoutingGroup"])
const currentEComStore = computed(() => store.getters["user/getCurrentEComStore"])
const isOmsConnectionExist = computed(() => store.getters["util/isOmsConnectionExist"])
const getStatusDesc = computed(() => (id: string) => store.getters["util/getStatusDesc"](id))
const routingHistory = computed(() => store.getters["orderRouting/getRoutingHistory"])
Expand Down Expand Up @@ -447,7 +446,7 @@ function getArchivedOrderRoutings() {
async function updateGroupDescription() {
// Do not update description, if the desc is unchanged, and we do not have routingGroupId, and description is left empty
if(props.routingGroupId && currentRoutingGroup.value.description !== description.value) {
const routingGroupId = await updateRoutingGroup({ routingGroupId: props.routingGroupId, productStoreId: currentEComStore.value.productStoreId, description: description.value })
const routingGroupId = await updateRoutingGroup({ routingGroupId: props.routingGroupId, productStoreId: currentRoutingGroup.value.productStoreId, description: description.value })
if(routingGroupId) {
await store.dispatch("orderRouting/setCurrentGroup", { ...currentRoutingGroup.value, description: description.value })
}
Expand Down Expand Up @@ -576,7 +575,7 @@ async function saveRoutingGroup() {
const payload = {
routingGroupId: props.routingGroupId,
productStoreId: currentEComStore.value.productStoreId,
productStoreId: currentRoutingGroup.value.productStoreId,
routings
}
Expand Down

0 comments on commit cf2f6d7

Please sign in to comment.