From 8da3f536f841fdf65826c785d71cd5f99c5dc691 Mon Sep 17 00:00:00 2001 From: R-Sourabh Date: Wed, 22 Jan 2025 11:56:55 +0530 Subject: [PATCH] Improved: Removed the Shopify cancellation reason and added logic to fetch the cancellation reason from the enum group(#488) --- src/components/ConfirmCancelModal.vue | 2 +- src/components/ReportAnIssuePopover.vue | 2 +- src/store/modules/util/actions.ts | 6 +++--- src/views/OrderDetailUpdated.vue | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/ConfirmCancelModal.vue b/src/components/ConfirmCancelModal.vue index b39243341..d13fa1257 100644 --- a/src/components/ConfirmCancelModal.vue +++ b/src/components/ConfirmCancelModal.vue @@ -134,7 +134,7 @@ export default defineComponent({ }, getCancelReasonDescription(cancelReasonId: string) { const reason = this.cancelReasons?.find((reason: any) => reason.enumId === cancelReasonId) - return reason?.description ? reason.description : reason?.enumDescription ? reason.enumDescription : reason?.enumId; + return reason?.enumDescription ? reason.enumDescription : reason?.enumId; }, async cancelOrder() { emitter.emit("presentLoader"); diff --git a/src/components/ReportAnIssuePopover.vue b/src/components/ReportAnIssuePopover.vue index 7e5dee84f..49bb0fce9 100644 --- a/src/components/ReportAnIssuePopover.vue +++ b/src/components/ReportAnIssuePopover.vue @@ -7,7 +7,7 @@ - {{ reason.description ? translate(reason.description) : reason.enumDescription ? translate(reason.enumDescription) : reason.enumId }} + {{ reason.enumDescription ? translate(reason.enumDescription) : reason.enumId }} diff --git a/src/store/modules/util/actions.ts b/src/store/modules/util/actions.ts index d32e0114b..e4123c751 100644 --- a/src/store/modules/util/actions.ts +++ b/src/store/modules/util/actions.ts @@ -91,10 +91,10 @@ const actions: ActionTree = { let cancelReasons = []; const payload = { "inputFields": { - "enumTypeId": "ODR_ITM_CH_REASON" + "enumerationGroupId": "BOPIS_CNCL_RES" }, - "fieldList": ["enumId", "description"], - "entityName": "Enumeration", + "fieldList": ["enumId", "enumDescription"], + "entityName": "EnumerationGroupAndMember", "distinct": "Y", "viewSize": 100, "orderBy": "sequenceNum" diff --git a/src/views/OrderDetailUpdated.vue b/src/views/OrderDetailUpdated.vue index ae771cc7e..15dede3a1 100644 --- a/src/views/OrderDetailUpdated.vue +++ b/src/views/OrderDetailUpdated.vue @@ -799,7 +799,7 @@ export default defineComponent({ }, getCancelReasonDescription(cancelReasonId: string) { const reason = this.cancelReasons?.find((reason: any) => reason.enumId === cancelReasonId) - return reason?.description ? reason.description : reason?.enumDescription ? reason.enumDescription : reason?.enumId; + return reason?.enumDescription ? reason.enumDescription : reason?.enumId; }, isEntierOrderRejectionEnabled(order: any) { return (!this.partialOrderRejectionConfig || !this.partialOrderRejectionConfig.settingValue || !JSON.parse(this.partialOrderRejectionConfig.settingValue)) && this.hasRejectedItems