Skip to content

Commit

Permalink
Improved: Removed the Shopify cancellation reason and added logic to …
Browse files Browse the repository at this point in the history
…fetch the cancellation reason from the enum group(hotwax#488)
  • Loading branch information
R-Sourabh committed Jan 22, 2025
1 parent 348fd53 commit 8da3f53
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/ConfirmCancelModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportAnIssuePopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</ion-list>
<ion-list v-else>
<ion-item v-for="reason in cancelReasons" :key="reason.enumId" @click="updateIssue(reason.enumId)" button>
{{ reason.description ? translate(reason.description) : reason.enumDescription ? translate(reason.enumDescription) : reason.enumId }}
{{ reason.enumDescription ? translate(reason.enumDescription) : reason.enumId }}
</ion-item>
</ion-list>
</ion-content>
Expand Down
6 changes: 3 additions & 3 deletions src/store/modules/util/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ const actions: ActionTree<UtilState, RootState> = {
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"
Expand Down
2 changes: 1 addition & 1 deletion src/views/OrderDetailUpdated.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8da3f53

Please sign in to comment.