From 375f71699cedc82ee0868854a2ded8b582af9a29 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Wed, 17 Jan 2024 16:29:38 +0530 Subject: [PATCH 01/14] Improved: permission management and app access restrictions (#263) --- .env.example | 2 +- src/authorization/Rules.ts | 4 +++- src/services/UserService.ts | 12 ++++++++---- src/store/modules/user/actions.ts | 8 +++++--- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.env.example b/.env.example index 6002fc9c..0e210be3 100644 --- a/.env.example +++ b/.env.example @@ -9,7 +9,7 @@ VUE_APP_POLL_TIME=10000 VUE_APP_ORDER_FILTERS=["orderTypeId: SALES_ORDER", "facilityId:PRE_ORDER_PARKING OR facilityId:BACKORDER_PARKING", "orderStatusId: ORDER_APPROVED", "!orderItemStatusId: ITEM_CANCELLED" ] VUE_APP_BASE_URL= VUE_APP_ORDER_IN_BRKRNG_FILTERS=["orderTypeId: SALES_ORDER", "facilityId: _NA_", "orderStatusId: ORDER_APPROVED", "!orderItemStatusId: ITEM_CANCELLED" ] -VUE_APP_PERMISSION_ID= +VUE_APP_PERMISSION_ID="PREORDER_APP_VIEW" VUE_APP_ALIAS= VUE_APP_CTGRY_AND_BRKRNG_JOB=["JOB_REL_PREODR_CAT", "JOB_BKR_ORD", "JOB_RLS_ORD_DTE"] VUE_APP_DEFAULT_ALIAS= diff --git a/src/authorization/Rules.ts b/src/authorization/Rules.ts index d2e8f294..a94b75b9 100644 --- a/src/authorization/Rules.ts +++ b/src/authorization/Rules.ts @@ -4,5 +4,7 @@ export default { "APP_CATALOG_VIEW": "", "APP_PRDT_DTLS_VIEW": "", "APP_CTLG_PRDT_DTLS_VIEW": "", - "APP_INV_CNFG_UPDT": "COMMON_ADMIN" + "APP_INV_CNFG_UPDT": "COMMON_ADMIN", + "MERCHANDISING_ADMIN": "MERCHANDISING_ADMIN", + "PREORDER_APP_VIEW": "PREORDER_APP_VIEW" } as any \ No newline at end of file diff --git a/src/services/UserService.ts b/src/services/UserService.ts index d5262262..775b3c94 100644 --- a/src/services/UserService.ts +++ b/src/services/UserService.ts @@ -35,17 +35,21 @@ const setUserPreference = async (payload: any): Promise => { }); } -const getEComStores = async (token: any, partyId: any): Promise => { +const getEComStores = async (token: any, partyId: any, isAdminUser = false): Promise => { try { const params = { "inputFields": { - "storeName_op": "not-empty", - "partyId": partyId + "storeName_op": "not-empty" }, "fieldList": ["productStoreId", "storeName"], "entityName": "ProductStoreAndRole", "distinct": "Y", - "noConditionFind": "Y" + "noConditionFind": "Y", + "filterByDate": 'Y' + } as any; + + if(!isAdminUser) { + params.inputFields['partyId'] = partyId } const baseURL = store.getters['user/getBaseUrl']; diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index 02f2eb0d..8e3fd5e0 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -39,9 +39,9 @@ const actions: ActionTree = { if (permissionId) { // As the token is not yet set in the state passing token headers explicitly // TODO Abstract this out, how token is handled should be part of the method not the callee - const hasPermission = appPermissions.some((appPermissionId: any) => appPermissionId === permissionId ); + const hasPermission = appPermissions.some((appPermission: any) => appPermission.action === permissionId ); // If there are any errors or permission check fails do not allow user to login - if (hasPermission) { + if (!hasPermission) { const permissionError = 'You do not have permission to access the app.'; showToast(translate(permissionError)); console.error("error", permissionError); @@ -49,9 +49,11 @@ const actions: ActionTree = { } } + const isAdminUser = appPermissions.some((appPermission: any) => appPermission?.action === "MERCHANDISING_ADMIN"); + // Getting user profile const userProfile = await UserService.getUserProfile(token); - userProfile.stores = await UserService.getEComStores(token, userProfile.partyId); + userProfile.stores = await UserService.getEComStores(token, userProfile.partyId, isAdminUser); // Getting user preferred store let preferredStore = userProfile.stores[0]; From 6cec6d611af9d96a18db340e101e44396ad4adda Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Mon, 8 Apr 2024 19:03:34 +0530 Subject: [PATCH 02/14] Updated: app version for minor release (v1.18.0). --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 362e29ae..82326be0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "preorder-app", - "version": "1.17.0", + "version": "1.18.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "preorder-app", - "version": "1.17.0", + "version": "1.18.0", "dependencies": { "@capacitor/android": "^2.5.0", "@capacitor/core": "^2.4.7", diff --git a/package.json b/package.json index 69230ff9..b352e80c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "preorder-app", - "version": "1.17.0", + "version": "1.18.0", "private": true, "description": "HotWax Commece Pre-order App", "scripts": { From ce132a9c0fd4825f410bb9839a06c3b73837c61f Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Mon, 22 Jul 2024 12:29:09 +0530 Subject: [PATCH 03/14] Improved: toFacilityId when releasing items manually from the app(#290) --- src/views/order-popover.vue | 2 +- src/views/orders.vue | 2 +- src/views/product-details.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/order-popover.vue b/src/views/order-popover.vue index a17073d3..0b7b7871 100644 --- a/src/views/order-popover.vue +++ b/src/views/order-popover.vue @@ -32,7 +32,7 @@ export default defineComponent({ orderId: item.orderId, orderItemSeqId: item.orderItemSeqId, changeReasonEnumId: "RELEASED", - toFacilityId: "_NA_" // TODO Make it configurable + toFacilityId: "RELEASED_ORD_PARKING" // TODO Make it configurable }) }, async cancelItem (item: any) { diff --git a/src/views/orders.vue b/src/views/orders.vue index f85d2297..68dbd304 100644 --- a/src/views/orders.vue +++ b/src/views/orders.vue @@ -319,7 +319,7 @@ export default defineComponent({ }, async releaseItems() { emitter.emit("presentLoader") - const selectedItems = this.getSelectedItemsToRelease("_NA_", "RELEASED"); // TODO Make it configurable + const selectedItems = this.getSelectedItemsToRelease("RELEASED_ORD_PARKING", "RELEASED"); // TODO Make it configurable const json = JSON.stringify(selectedItems); const blob = new Blob([json], { type: 'application/json'}); const formData = new FormData(); diff --git a/src/views/product-details.vue b/src/views/product-details.vue index 5df0ab15..d4ae5e14 100644 --- a/src/views/product-details.vue +++ b/src/views/product-details.vue @@ -436,7 +436,7 @@ export default defineComponent({ orderId: item.orderId, orderItemSeqId: item.orderItemSeqId, changeReasonEnumId: "RELEASED", - toFacilityId: "_NA_" // TODO Make it configurable + toFacilityId: "RELEASED_ORD_PARKING" // TODO Make it configurable } }) selectedItems = [...selectedItems, ...items]; From 11ec2f2db9eba445c39ec08306d610c382b39810 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Mon, 22 Jul 2024 19:23:30 +0530 Subject: [PATCH 04/14] Added: check to only move items to rejected parking for specific productStore(#290) --- src/views/order-popover.vue | 10 ++++++++-- src/views/orders.vue | 3 ++- src/views/product-details.vue | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/views/order-popover.vue b/src/views/order-popover.vue index 0b7b7871..eadfb1b7 100644 --- a/src/views/order-popover.vue +++ b/src/views/order-popover.vue @@ -18,21 +18,27 @@ import { alertController, modalController, } from "@ionic/vue"; -import { defineComponent } from "vue"; +import { computed, defineComponent } from "vue"; import WarehouseModal from "@/views/warehouse-modal.vue"; import { useStore } from "@/store"; import PromiseDateModal from "@/views/promise-date-modal.vue"; +import { mapGetters } from "vuex"; export default defineComponent({ name: "OrderPopover", props: ['item'], + computed: { + ...mapGetters({ + currentEComStore: 'user/getCurrentEComStore' + }) + }, methods: { async releaseItem (item: any) { return this.store.dispatch("order/releaseItem", { orderId: item.orderId, orderItemSeqId: item.orderItemSeqId, changeReasonEnumId: "RELEASED", - toFacilityId: "RELEASED_ORD_PARKING" // TODO Make it configurable + toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable }) }, async cancelItem (item: any) { diff --git a/src/views/orders.vue b/src/views/orders.vue index 68dbd304..a3033af0 100644 --- a/src/views/orders.vue +++ b/src/views/orders.vue @@ -285,6 +285,7 @@ export default defineComponent({ selectedItemsCount: 'order/getSelectedItemsCount', userProfile: 'user/getUserProfile', query: 'order/getQuery', + currentEComStore: 'user/getCurrentEComStore' }), }, async ionViewWillEnter() { @@ -319,7 +320,7 @@ export default defineComponent({ }, async releaseItems() { emitter.emit("presentLoader") - const selectedItems = this.getSelectedItemsToRelease("RELEASED_ORD_PARKING", "RELEASED"); // TODO Make it configurable + const selectedItems = this.getSelectedItemsToRelease(this.currentEComStore.productStoreId === "SM_STORE" ? "RELEASED_ORD_PARKING" : "_NA_", "RELEASED"); // TODO Make it configurable const json = JSON.stringify(selectedItems); const blob = new Blob([json], { type: 'application/json'}); const formData = new FormData(); diff --git a/src/views/product-details.vue b/src/views/product-details.vue index d4ae5e14..f55facb7 100644 --- a/src/views/product-details.vue +++ b/src/views/product-details.vue @@ -436,7 +436,7 @@ export default defineComponent({ orderId: item.orderId, orderItemSeqId: item.orderItemSeqId, changeReasonEnumId: "RELEASED", - toFacilityId: "RELEASED_ORD_PARKING" // TODO Make it configurable + toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable } }) selectedItems = [...selectedItems, ...items]; From a6eaf830253c5a2b8554296fb45fc2635ae1ad8d Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Thu, 25 Jul 2024 15:25:07 +0530 Subject: [PATCH 05/14] Improved: check to move items to release ord parking for multiple productStores(#290) --- src/views/order-popover.vue | 2 +- src/views/orders.vue | 2 +- src/views/product-details.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/order-popover.vue b/src/views/order-popover.vue index eadfb1b7..2cf6d1b5 100644 --- a/src/views/order-popover.vue +++ b/src/views/order-popover.vue @@ -38,7 +38,7 @@ export default defineComponent({ orderId: item.orderId, orderItemSeqId: item.orderItemSeqId, changeReasonEnumId: "RELEASED", - toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable + toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" || this.currentEComStore.productStoreId === "BJUS_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable }) }, async cancelItem (item: any) { diff --git a/src/views/orders.vue b/src/views/orders.vue index a3033af0..b3b8a92f 100644 --- a/src/views/orders.vue +++ b/src/views/orders.vue @@ -320,7 +320,7 @@ export default defineComponent({ }, async releaseItems() { emitter.emit("presentLoader") - const selectedItems = this.getSelectedItemsToRelease(this.currentEComStore.productStoreId === "SM_STORE" ? "RELEASED_ORD_PARKING" : "_NA_", "RELEASED"); // TODO Make it configurable + const selectedItems = this.getSelectedItemsToRelease(this.currentEComStore.productStoreId === "SM_STORE" || this.currentEComStore.productStoreId === "BJUS_STORE" ? "RELEASED_ORD_PARKING" : "_NA_", "RELEASED"); // TODO Make it configurable const json = JSON.stringify(selectedItems); const blob = new Blob([json], { type: 'application/json'}); const formData = new FormData(); diff --git a/src/views/product-details.vue b/src/views/product-details.vue index f55facb7..be7d0f41 100644 --- a/src/views/product-details.vue +++ b/src/views/product-details.vue @@ -436,7 +436,7 @@ export default defineComponent({ orderId: item.orderId, orderItemSeqId: item.orderItemSeqId, changeReasonEnumId: "RELEASED", - toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable + toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" || this.currentEComStore.productStoreId === "BJUS_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable } }) selectedItems = [...selectedItems, ...items]; From 38a37e6f6d042630754c41f485f10bc2153716a1 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Thu, 25 Jul 2024 18:08:42 +0530 Subject: [PATCH 06/14] Improved: check to move items to release ord parking for multiple productStores(#290) --- src/views/order-popover.vue | 2 +- src/views/orders.vue | 2 +- src/views/product-details.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/order-popover.vue b/src/views/order-popover.vue index 2cf6d1b5..20c56bff 100644 --- a/src/views/order-popover.vue +++ b/src/views/order-popover.vue @@ -38,7 +38,7 @@ export default defineComponent({ orderId: item.orderId, orderItemSeqId: item.orderItemSeqId, changeReasonEnumId: "RELEASED", - toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" || this.currentEComStore.productStoreId === "BJUS_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable + toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" || this.currentEComStore.productStoreId === "DV_STORE" || this.currentEComStore.productStoreId === "BJ_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable }) }, async cancelItem (item: any) { diff --git a/src/views/orders.vue b/src/views/orders.vue index b3b8a92f..12d1f364 100644 --- a/src/views/orders.vue +++ b/src/views/orders.vue @@ -320,7 +320,7 @@ export default defineComponent({ }, async releaseItems() { emitter.emit("presentLoader") - const selectedItems = this.getSelectedItemsToRelease(this.currentEComStore.productStoreId === "SM_STORE" || this.currentEComStore.productStoreId === "BJUS_STORE" ? "RELEASED_ORD_PARKING" : "_NA_", "RELEASED"); // TODO Make it configurable + const selectedItems = this.getSelectedItemsToRelease(this.currentEComStore.productStoreId === "SM_STORE" || this.currentEComStore.productStoreId === "DV_STORE" || this.currentEComStore.productStoreId === "BJ_STORE" ? "RELEASED_ORD_PARKING" : "_NA_", "RELEASED"); // TODO Make it configurable const json = JSON.stringify(selectedItems); const blob = new Blob([json], { type: 'application/json'}); const formData = new FormData(); diff --git a/src/views/product-details.vue b/src/views/product-details.vue index be7d0f41..3372ca52 100644 --- a/src/views/product-details.vue +++ b/src/views/product-details.vue @@ -436,7 +436,7 @@ export default defineComponent({ orderId: item.orderId, orderItemSeqId: item.orderItemSeqId, changeReasonEnumId: "RELEASED", - toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" || this.currentEComStore.productStoreId === "BJUS_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable + toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" || this.currentEComStore.productStoreId === "DV_STORE" || this.currentEComStore.productStoreId === "BJ_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable } }) selectedItems = [...selectedItems, ...items]; From da3e9e12b971bf007db1101c960aeda49df64367 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Wed, 31 Jul 2024 16:18:07 +0530 Subject: [PATCH 07/14] Removed: conditional check for parking and always move items to RELEASED_ORD_PARKING(#290) --- src/views/order-popover.vue | 2 +- src/views/orders.vue | 2 +- src/views/product-details.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/order-popover.vue b/src/views/order-popover.vue index 20c56bff..0da1883d 100644 --- a/src/views/order-popover.vue +++ b/src/views/order-popover.vue @@ -38,7 +38,7 @@ export default defineComponent({ orderId: item.orderId, orderItemSeqId: item.orderItemSeqId, changeReasonEnumId: "RELEASED", - toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" || this.currentEComStore.productStoreId === "DV_STORE" || this.currentEComStore.productStoreId === "BJ_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable + toFacilityId: "RELEASED_ORD_PARKING" // TODO Make it configurable }) }, async cancelItem (item: any) { diff --git a/src/views/orders.vue b/src/views/orders.vue index 12d1f364..6aea2ab1 100644 --- a/src/views/orders.vue +++ b/src/views/orders.vue @@ -320,7 +320,7 @@ export default defineComponent({ }, async releaseItems() { emitter.emit("presentLoader") - const selectedItems = this.getSelectedItemsToRelease(this.currentEComStore.productStoreId === "SM_STORE" || this.currentEComStore.productStoreId === "DV_STORE" || this.currentEComStore.productStoreId === "BJ_STORE" ? "RELEASED_ORD_PARKING" : "_NA_", "RELEASED"); // TODO Make it configurable + const selectedItems = this.getSelectedItemsToRelease("RELEASED_ORD_PARKING", "RELEASED"); // TODO Make it configurable const json = JSON.stringify(selectedItems); const blob = new Blob([json], { type: 'application/json'}); const formData = new FormData(); diff --git a/src/views/product-details.vue b/src/views/product-details.vue index 3372ca52..d4ae5e14 100644 --- a/src/views/product-details.vue +++ b/src/views/product-details.vue @@ -436,7 +436,7 @@ export default defineComponent({ orderId: item.orderId, orderItemSeqId: item.orderItemSeqId, changeReasonEnumId: "RELEASED", - toFacilityId: this.currentEComStore.productStoreId === "SM_STORE" || this.currentEComStore.productStoreId === "DV_STORE" || this.currentEComStore.productStoreId === "BJ_STORE" ? "RELEASED_ORD_PARKING" : "_NA_" // TODO Make it configurable + toFacilityId: "RELEASED_ORD_PARKING" // TODO Make it configurable } }) selectedItems = [...selectedItems, ...items]; From 48e1f51554e9c18a611f8bde1fe22c52f93f0f27 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Wed, 31 Jul 2024 16:19:43 +0530 Subject: [PATCH 08/14] Removed: unused imports those were added for the conditional check of parking(#290) --- src/views/order-popover.vue | 8 +------- src/views/orders.vue | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/views/order-popover.vue b/src/views/order-popover.vue index 0da1883d..0b7b7871 100644 --- a/src/views/order-popover.vue +++ b/src/views/order-popover.vue @@ -18,20 +18,14 @@ import { alertController, modalController, } from "@ionic/vue"; -import { computed, defineComponent } from "vue"; +import { defineComponent } from "vue"; import WarehouseModal from "@/views/warehouse-modal.vue"; import { useStore } from "@/store"; import PromiseDateModal from "@/views/promise-date-modal.vue"; -import { mapGetters } from "vuex"; export default defineComponent({ name: "OrderPopover", props: ['item'], - computed: { - ...mapGetters({ - currentEComStore: 'user/getCurrentEComStore' - }) - }, methods: { async releaseItem (item: any) { return this.store.dispatch("order/releaseItem", { diff --git a/src/views/orders.vue b/src/views/orders.vue index 6aea2ab1..2ca3e5ec 100644 --- a/src/views/orders.vue +++ b/src/views/orders.vue @@ -284,8 +284,7 @@ export default defineComponent({ selectedItemsToCancel: 'order.getSelectedItemsToCancel', selectedItemsCount: 'order/getSelectedItemsCount', userProfile: 'user/getUserProfile', - query: 'order/getQuery', - currentEComStore: 'user/getCurrentEComStore' + query: 'order/getQuery' }), }, async ionViewWillEnter() { From e3272879baeb5e81d72a8c6841a90203624bfd55 Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Tue, 3 Sep 2024 10:58:42 +0530 Subject: [PATCH 09/14] Improved: Passed selected productStoreId while uploading file for releasing, cancelling or updating promise date (#296). --- src/services/OrderService.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/services/OrderService.ts b/src/services/OrderService.ts index c18f4017..e687ce32 100644 --- a/src/services/OrderService.ts +++ b/src/services/OrderService.ts @@ -1,4 +1,5 @@ import { api } from '@/adapter'; +import store from '@/store'; const findOrder = async (payload: any): Promise => { return api({ @@ -20,7 +21,7 @@ const releaseItems = async (payload: any): Promise => { return api({ url: "uploadJsonFile", method: "post", - data: payload.data, + data: {...payload.data, "productStoreId": store.state.user.currentEComStore.productStoreId}, headers: payload.headers }); } @@ -29,7 +30,7 @@ const cancelItems = async (payload: any): Promise => { return api({ url: "uploadJsonFile", method: "post", - data: payload.data, + data: {...payload.data, "productStoreId": store.state.user.currentEComStore.productStoreId}, headers: payload.headers }); } @@ -38,7 +39,7 @@ const updatePromiseDateItems = async (payload: any): Promise => { return api({ url: "uploadJsonFile", method: "post", - data: payload.data, + data: {...payload.data, "productStoreId": store.state.user.currentEComStore.productStoreId}, headers: payload.headers }); } From cbcc900e9e6df63b0d6330ceda66f1e462f189dd Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Tue, 3 Sep 2024 19:02:42 +0530 Subject: [PATCH 10/14] Improved: Passed productStoreId in the needed format (#296). --- src/services/OrderService.ts | 7 +++---- src/views/orders.vue | 3 +++ src/views/product-details.vue | 3 +++ src/views/promise-date-modal.vue | 2 ++ src/views/warehouse-modal.vue | 1 + 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/services/OrderService.ts b/src/services/OrderService.ts index e687ce32..c18f4017 100644 --- a/src/services/OrderService.ts +++ b/src/services/OrderService.ts @@ -1,5 +1,4 @@ import { api } from '@/adapter'; -import store from '@/store'; const findOrder = async (payload: any): Promise => { return api({ @@ -21,7 +20,7 @@ const releaseItems = async (payload: any): Promise => { return api({ url: "uploadJsonFile", method: "post", - data: {...payload.data, "productStoreId": store.state.user.currentEComStore.productStoreId}, + data: payload.data, headers: payload.headers }); } @@ -30,7 +29,7 @@ const cancelItems = async (payload: any): Promise => { return api({ url: "uploadJsonFile", method: "post", - data: {...payload.data, "productStoreId": store.state.user.currentEComStore.productStoreId}, + data: payload.data, headers: payload.headers }); } @@ -39,7 +38,7 @@ const updatePromiseDateItems = async (payload: any): Promise => { return api({ url: "uploadJsonFile", method: "post", - data: {...payload.data, "productStoreId": store.state.user.currentEComStore.productStoreId}, + data: payload.data, headers: payload.headers }); } diff --git a/src/views/orders.vue b/src/views/orders.vue index f85d2297..40716658 100644 --- a/src/views/orders.vue +++ b/src/views/orders.vue @@ -285,6 +285,7 @@ export default defineComponent({ selectedItemsCount: 'order/getSelectedItemsCount', userProfile: 'user/getUserProfile', query: 'order/getQuery', + currentEComStore: 'user/getCurrentEComStore', }), }, async ionViewWillEnter() { @@ -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: { @@ -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: { diff --git a/src/views/product-details.vue b/src/views/product-details.vue index 5df0ab15..a0fc84b4 100644 --- a/src/views/product-details.vue +++ b/src/views/product-details.vue @@ -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;' @@ -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;' diff --git a/src/views/promise-date-modal.vue b/src/views/promise-date-modal.vue index 7582adf0..7dfcf474 100644 --- a/src/views/promise-date-modal.vue +++ b/src/views/promise-date-modal.vue @@ -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); @@ -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;' diff --git a/src/views/warehouse-modal.vue b/src/views/warehouse-modal.vue index 31492143..3a3579b1 100644 --- a/src/views/warehouse-modal.vue +++ b/src/views/warehouse-modal.vue @@ -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;' From 96d691eef5cd9a06eaf9a4f8b51648522d8fb4c3 Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Wed, 11 Sep 2024 16:44:24 +0530 Subject: [PATCH 11/14] Updated: app version for patch release v1.18.1. --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4aaa7994..88b8a73b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "preorder-app", - "version": "1.18.0", + "version": "1.18.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "preorder-app", - "version": "1.18.0", + "version": "1.18.1", "dependencies": { "@capacitor/android": "^2.5.0", "@capacitor/core": "^2.4.7", diff --git a/package.json b/package.json index 469464c9..be760c54 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "preorder-app", - "version": "1.18.0", + "version": "1.18.1", "private": true, "description": "HotWax Commece Pre-order App", "scripts": { From cf1010d3c89d28ffa7da0f74b496f162614fe4f7 Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Wed, 11 Sep 2024 16:47:02 +0530 Subject: [PATCH 12/14] Updated: app version for patch release v1.17.1. --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88b8a73b..8455e7b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "preorder-app", - "version": "1.18.1", + "version": "1.17.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "preorder-app", - "version": "1.18.1", + "version": "1.17.1", "dependencies": { "@capacitor/android": "^2.5.0", "@capacitor/core": "^2.4.7", diff --git a/package.json b/package.json index be760c54..ec7b5862 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "preorder-app", - "version": "1.18.1", + "version": "1.17.1", "private": true, "description": "HotWax Commece Pre-order App", "scripts": { From e4d5d72ef409da15f6cb9ca157d9c5849027b8ad Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Wed, 11 Sep 2024 16:56:49 +0530 Subject: [PATCH 13/14] Updated: app version for minor release v1.18.0. --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8455e7b3..4aaa7994 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "preorder-app", - "version": "1.17.1", + "version": "1.18.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "preorder-app", - "version": "1.17.1", + "version": "1.18.0", "dependencies": { "@capacitor/android": "^2.5.0", "@capacitor/core": "^2.4.7", diff --git a/package.json b/package.json index ec7b5862..469464c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "preorder-app", - "version": "1.17.1", + "version": "1.18.0", "private": true, "description": "HotWax Commece Pre-order App", "scripts": { From e5d8a9e90ca6183b38329809898edd6f0880ec9c Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Tue, 24 Sep 2024 15:38:36 +0530 Subject: [PATCH 14/14] Improved: app version in package and lock file for patch release(v1.18.1) --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4aaa7994..88b8a73b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "preorder-app", - "version": "1.18.0", + "version": "1.18.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "preorder-app", - "version": "1.18.0", + "version": "1.18.1", "dependencies": { "@capacitor/android": "^2.5.0", "@capacitor/core": "^2.4.7", diff --git a/package.json b/package.json index 469464c9..be760c54 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "preorder-app", - "version": "1.18.0", + "version": "1.18.1", "private": true, "description": "HotWax Commece Pre-order App", "scripts": {