Skip to content

Commit

Permalink
Improved: reverted unused code, check in case order split not allowed (
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Sep 27, 2024
1 parent 22fec9d commit 4bda099
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/services/OrderService.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { api, client } from '@/adapter';
import store from '@/store';
import { hasError } from '@hotwax/oms-api';
import { api } from '@/adapter';

const getOrder = async (payload: any): Promise <any> => {
let baseURL = store.getters['user/getInstanceUrl'];
baseURL = baseURL && baseURL.startsWith('http') ? baseURL : `https://${baseURL}.hotwax.io/api/`;
return api({
url: "getRerouteOrder",
method: "post",
Expand Down
5 changes: 3 additions & 2 deletions src/views/Order.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
</ion-select>
</ion-item>

<template v-if="order.shipGroup.selectedShipmentMethodTypeId === 'STOREPICKUP'">
<ion-segment v-if="isSplitEnabled && nearbyStores.length" @ionChange="segmentChanged($event, order.shipGroup)" v-model="selectedSegment">
<template v-if="order.shipGroup.selectedShipmentMethodTypeId === 'STOREPICKUP' && isSplitEnabled">
<ion-segment v-if="nearbyStores.length" @ionChange="segmentChanged($event, order.shipGroup)" v-model="selectedSegment">
<ion-segment-button value="together">
<ion-label>{{ translate("Together") }}</ion-label>
</ion-segment-button>
Expand Down Expand Up @@ -442,6 +442,7 @@ export default defineComponent({
updateDeliveryMethod(event: any, shipGroup: any) {
shipGroup.selectedShipmentMethodTypeId = event.detail.value;
if(event.detail.value === "STOREPICKUP") this.updatedAddress = {};
else this.selectedFacility = {}
},
checkForOutOfStockItems(shipGroup: any) {
Expand Down

0 comments on commit 4bda099

Please sign in to comment.