Skip to content

Commit

Permalink
Merge pull request #49 from hotwax/oms-to-moqui
Browse files Browse the repository at this point in the history
WIP Updated method type as per changes in rest api.
  • Loading branch information
ravilodhi authored Dec 24, 2024
2 parents 83c7d37 + 304485b commit 667376f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/services/ProductStoreService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ const fetchProductStoresFacilityCount = async (payload: any): Promise <any> => {
const updateProductStore = async (payload: any): Promise <any> => {
return api({
url: `productStores/${payload.productStoreId}`,
method: "post",
method: "put",
data: payload
});
}

const updateDBICCountries = async (payload: any): Promise <any> => {
const addDBICCountries = async (payload: any): Promise <any> => {
return api({
url: "countries/dbic",
method: "post",
Expand Down Expand Up @@ -100,6 +100,6 @@ export const ProductStoreService = {
fetchProductStoresFacilityCount,
updateCompany,
updateCurrentStoreSettings,
updateDBICCountries,
addDBICCountries,
updateProductStore
}
4 changes: 2 additions & 2 deletions src/store/modules/util/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const actions: ActionTree<UtilState, RootState> = {
let countries = [] as any;

try {
const resp = await UtilService.fetchDBICCountries({ geoIdTo: "DBIC", pageSize: 200 })
const resp = await UtilService.fetchDBICCountries({toGeoId: "DBIC", pageSize: 200 })
if(!hasError(resp)) {
countries = resp.data;
} else {
Expand All @@ -47,7 +47,7 @@ const actions: ActionTree<UtilState, RootState> = {
let operatingCountries = [] as any;

try {
const resp = await UtilService.fetchOperatingCountries({ pageSize: 200 })
const resp = await UtilService.fetchOperatingCountries({ pageSize: 300, geoTypeEnumId: 'GEOT_COUNTRY' })
if(!hasError(resp)) {
operatingCountries = resp.data;
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/views/CreateProductStore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ async function manageConfigurations() {
const productStoreId = resp.data.productStoreId;
if(!dbicCountriesCount.value) {
const responses = await Promise.allSettled(selectedCountries.value.map((country: any) => ProductStoreService.updateDBICCountries({
const responses = await Promise.allSettled(selectedCountries.value.map((country: any) => ProductStoreService.addDBICCountries({
geoId: country.geoId,
geoIdTo: "DBIC",
toGeoId: "DBIC",
geoAssocTypeId: "GROUP_MEMBER"
}))
)
Expand Down
4 changes: 2 additions & 2 deletions src/views/ProductStoreDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,11 @@

<ion-list>
<ion-item>
<ion-toggle :checked="getBooleanValue(settings['CUST_DLVR_MTHD_UPD']?.settingValue)" @click.prevent="updateProductStoreSettings($event, 'CUST_DLVR_MTHD_UPD', true)" >{{ translate("Delivery method") }}</ion-toggle>
<ion-toggle :checked="getBooleanValue(settings['CUST_DLVRMTHD_UPDATE']?.settingValue)" @click.prevent="updateProductStoreSettings($event, 'CUST_DLVRMTHD_UPDATE', true)" >{{ translate("Delivery method") }}</ion-toggle>
</ion-item>

<ion-item>
<ion-select :label="translate('Shipment method')" interface="popover" :placeholder="translate('Select')" :value="settings['RF_SHIP_MTHD']?.settingValue" @ionChange="updateProductStoreSettings($event, 'RF_SHIP_MTHD', false)" >
<ion-select :label="translate('Shipment method')" interface="popover" :placeholder="translate('Select')" :value="settings['RF_SHIPPING_METHOD']?.settingValue" @ionChange="updateProductStoreSettings($event, 'RF_SHIPPING_METHOD', false)" >
<ion-select-option v-for="shipmentMethod in shipmentMethodTypes" :key="shipmentMethod.shipmentMethodTypeId" :value="shipmentMethod.shipmentMethodTypeId">{{ shipmentMethod.description ? shipmentMethod.description : shipmentMethod.shipmentMethodTypeId }}</ion-select-option>
</ion-select>
</ion-item>
Expand Down

0 comments on commit 667376f

Please sign in to comment.