Skip to content

Commit

Permalink
Improved: showing reason id if no description is present (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Nov 13, 2024
1 parent 05a0429 commit 584ec7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/views/InProgress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ export default defineComponent({
methods: {
getRejectionReasonDescription (rejectionReasonId: string) {
const reason = this.rejectReasonOptions?.find((reason: any) => reason.enumId === rejectionReasonId)
return reason?.description ? reason.description : reason?.enumDescription;
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
2 changes: 1 addition & 1 deletion src/views/OrderDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ export default defineComponent({
},
getRejectionReasonDescription (rejectionReasonId: string) {
const reason = this.rejectReasonOptions?.find((reason: any) => reason.enumId === rejectionReasonId)
return reason?.description ? reason.description : reason?.enumDescription;
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 584ec7f

Please sign in to comment.