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

Improved: Passed productStoreId in the needed format (#296). #298

Merged
merged 1 commit into from
Sep 3, 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
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
Loading