From 7f54ae5024a56483c9f926e035223683a052dde5 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Thu, 25 Jul 2024 10:47:19 +0530 Subject: [PATCH] Improved: added permission over the force scan setting (#664) --- src/authorization/Actions.ts | 3 ++- src/authorization/Rules.ts | 3 ++- src/store/modules/util/actions.ts | 6 +++--- src/views/Settings.vue | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/authorization/Actions.ts b/src/authorization/Actions.ts index 1eb67362..ccc656c3 100644 --- a/src/authorization/Actions.ts +++ b/src/authorization/Actions.ts @@ -9,5 +9,6 @@ export default { "APP_TRANSFER_ORDER_UPDATE":"APP_TRANSFER_ORDER_UPDATE", "APP_CARRIERS_VIEW" : "APP_CARRIERS_VIEW", "APP_CARRIERS_CREATE" : "APP_CARRIERS_CREATE", - "APP_ORDER_LOOKUP_VIEW": "APP_ORDER_LOOKUP_VIEW" + "APP_ORDER_LOOKUP_VIEW": "APP_ORDER_LOOKUP_VIEW", + "APP_UPDT_FULFILL_FORCE_SCAN_CONFIG": "APP_UPDT_FULFILL_FORCE_SCAN_CONFIG", } \ No newline at end of file diff --git a/src/authorization/Rules.ts b/src/authorization/Rules.ts index f3360110..92cd2f78 100644 --- a/src/authorization/Rules.ts +++ b/src/authorization/Rules.ts @@ -18,5 +18,6 @@ export default { "APP_TRANSFER_ORDER_UPDATE": "ORD_TRANSFER_ORDER_CREATE OR ORD_TRANSFER_ORDER_ADMIN", "APP_CARRIERS_VIEW": "CARRIER_SETUP_VIEW", "APP_CARRIERS_CREATE": "CARRIER_SETUP_VIEW", - "APP_ORDER_LOOKUP_VIEW": "FF_ORDER_LOOKUP_VIEW" + "APP_ORDER_LOOKUP_VIEW": "FF_ORDER_LOOKUP_VIEW", + "APP_UPDT_FULFILL_FORCE_SCAN_CONFIG": "COMMON_ADMIN" } as any \ No newline at end of file diff --git a/src/store/modules/util/actions.ts b/src/store/modules/util/actions.ts index 5212ae5f..5e6b9758 100644 --- a/src/store/modules/util/actions.ts +++ b/src/store/modules/util/actions.ts @@ -480,7 +480,7 @@ const actions: ActionTree = { try { const resp = await UtilService.getProductStoreSetting(payload) as any if(!hasError(resp)) { - const respValue = resp.data.docs[0].settingValue + const respValue = resp.data.docs[0].settingValue === "true" commit(types.UTIL_FORCE_SCAN_STATUS_UPDATED, respValue) } else { dispatch('createForceScanSetting'); @@ -498,7 +498,7 @@ const actions: ActionTree = { fromDate, "productStoreId": ecomStore.productStoreId, "settingTypeEnumId": "FULFILL_FORCE_SCAN", - "settingValue": false + "settingValue": "false" } try { @@ -552,7 +552,7 @@ const actions: ActionTree = { "fromDate": fromDate, "productStoreId": eComStoreId, "settingTypeEnumId": "FULFILL_FORCE_SCAN", - "settingValue": value + "settingValue": `${value}` } try { diff --git a/src/views/Settings.vue b/src/views/Settings.vue index 29512164..2eb19881 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -166,7 +166,7 @@ {{ translate("Control whether the store requires the force scan during order packing or not.") }} - + {{ translate("Require scan") }}