Skip to content

Commit

Permalink
Merge pull request #853 from amansinghbais/#813
Browse files Browse the repository at this point in the history
Fixed: added check to show enumDescription in case of reasons fetched from enumgroupAndMember (#813)
  • Loading branch information
ravilodhi authored Nov 13, 2024
2 parents 5604b2f + 584ec7f commit 56a93ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/views/InProgress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ export default defineComponent({
},
methods: {
getRejectionReasonDescription (rejectionReasonId: string) {
return this.rejectReasonOptions?.find((reason: any) => reason.enumId === rejectionReasonId)?.description;
const reason = this.rejectReasonOptions?.find((reason: any) => reason.enumId === rejectionReasonId)
return reason?.description ? reason.description : reason?.enumDescription ? reason.enumDescription : reason.enumId;
},
async openRejectReasonPopover(ev: Event, item: any, order: any) {
const reportIssuePopover = await popoverController.create({
Expand Down
3 changes: 2 additions & 1 deletion src/views/OrderDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,8 @@ export default defineComponent({
}
},
getRejectionReasonDescription (rejectionReasonId: string) {
return this.rejectReasonOptions?.find((reason: any) => reason.enumId === rejectionReasonId)?.description;
const reason = this.rejectReasonOptions?.find((reason: any) => reason.enumId === rejectionReasonId)
return reason?.description ? reason.description : reason?.enumDescription ? reason.enumDescription : reason.enumId;
},
isEntierOrderRejectionEnabled(order: any) {
return (!this.partialOrderRejectionConfig || !this.partialOrderRejectionConfig.settingValue || !JSON.parse(this.partialOrderRejectionConfig.settingValue)) && order.hasRejectedItem
Expand Down

0 comments on commit 56a93ba

Please sign in to comment.