Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Updated method type as per changes in rest api. #49

Merged
merged 4 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading