Skip to content

Commit

Permalink
Merge pull request #298 from hotwax/#296_release_api_product_store
Browse files Browse the repository at this point in the history
Improved: Passed productStoreId in the needed format (#296).
  • Loading branch information
ravilodhi authored Sep 3, 2024
2 parents 7b78c55 + cbcc900 commit d8139cd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/services/OrderService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { api } from '@/adapter';
import store from '@/store';

const findOrder = async (payload: any): Promise<any> => {
return api({
Expand All @@ -21,7 +20,7 @@ const releaseItems = async (payload: any): Promise<any> => {
return api({
url: "uploadJsonFile",
method: "post",
data: {...payload.data, "productStoreId": store.state.user.currentEComStore.productStoreId},
data: payload.data,
headers: payload.headers
});
}
Expand All @@ -30,7 +29,7 @@ const cancelItems = async (payload: any): Promise<any> => {
return api({
url: "uploadJsonFile",
method: "post",
data: {...payload.data, "productStoreId": store.state.user.currentEComStore.productStoreId},
data: payload.data,
headers: payload.headers
});
}
Expand All @@ -39,7 +38,7 @@ const updatePromiseDateItems = async (payload: any): Promise<any> => {
return api({
url: "uploadJsonFile",
method: "post",
data: {...payload.data, "productStoreId": store.state.user.currentEComStore.productStoreId},
data: payload.data,
headers: payload.headers
});
}
Expand Down
3 changes: 3 additions & 0 deletions src/views/orders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ export default defineComponent({
selectedItemsCount: 'order/getSelectedItemsCount',
userProfile: 'user/getUserProfile',
query: 'order/getQuery',
currentEComStore: 'user/getCurrentEComStore',
}),
},
async ionViewWillEnter() {
Expand Down Expand Up @@ -326,6 +327,7 @@ export default defineComponent({
const fileName = "ReleaseItems_" + Date.now() +".json";
formData.append("uploadedFile", blob, fileName);
formData.append("configId", "MDM_REL_ORD_ITM_JSON");
formData.append("param_productStoreId", this.currentEComStore.productStoreId);
this.deselectSelectedItems();
return this.store.dispatch("order/releaseItems", {
headers: {
Expand All @@ -346,6 +348,7 @@ export default defineComponent({
const fileName = "CancelItems_" + Date.now() +".json";
formData.append("uploadedFile", blob, fileName);
formData.append("configId", "MDM_CAN_ORD_ITM_JSON");
formData.append("param_productStoreId", this.currentEComStore.productStoreId);
this.deselectSelectedItems();
return this.store.dispatch("order/cancelItems", {
headers: {
Expand Down
3 changes: 3 additions & 0 deletions src/views/product-details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,8 @@ export default defineComponent({
const fileName = "ReleaseItems_" + Date.now() +".json";
formData.append("uploadedFile", blob, fileName);
formData.append("configId", "MDM_REL_ORD_ITM_JSON");
formData.append("param_productStoreId", this.currentEComStore.productStoreId);
return this.store.dispatch("order/releaseItems", {
headers: {
'Content-Type': 'multipart/form-data;'
Expand Down Expand Up @@ -475,6 +477,7 @@ export default defineComponent({
const fileName = "CancelItems_" + Date.now() +".json";
formData.append("uploadedFile", blob, fileName);
formData.append("configId", "MDM_CAN_ORD_ITM_JSON");
formData.append("param_productStoreId", this.currentEComStore.productStoreId);
return this.store.dispatch("order/cancelItems", {
headers: {
'Content-Type': 'multipart/form-data;'
Expand Down
2 changes: 2 additions & 0 deletions src/views/promise-date-modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default defineComponent({
...mapGetters({
jobTotal: 'job/getTotal',
getSelectedItemsToUpdatePromiseDate: 'order/getSelectedItemsToUpdatePromiseDate',
currentEComStore: 'user/getCurrentEComStore',
}),
disableUpdate(): boolean {
return this.promisedDatetime === '' || (this.item && this.item.promisedDatetime && DateTime.fromFormat(this.item.promisedDatetime, "yyyy-MM-dd hh:mm:ss.SSS").toFormat("yyyy-MM-dd") === this.promisedDatetime);
Expand Down Expand Up @@ -94,6 +95,7 @@ export default defineComponent({
const fileName = "UpdatePromiseDateItems_" + Date.now() +".json";
formData.append("uploadedFile", blob, fileName);
formData.append("configId", "MDM_UPD_ORD_ITM_JSON");
formData.append("param_productStoreId", this.currentEComStore.productStoreId);
return this.store.dispatch("order/updatePromiseDateItems", {
headers: {
'Content-Type': 'multipart/form-data;'
Expand Down
1 change: 1 addition & 0 deletions src/views/warehouse-modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export default defineComponent({
const fileName = "ReleaseItemsToWarehouse_" + Date.now() +".json";
formData.append("uploadedFile", blob, fileName);
formData.append("configId", "MDM_REL_ORD_ITM_JSON");
formData.append("param_productStoreId", this.currentEComStore.productStoreId);
return this.store.dispatch("order/releaseItems", {
headers: {
'Content-Type': 'multipart/form-data;'
Expand Down

0 comments on commit d8139cd

Please sign in to comment.