Skip to content

Commit

Permalink
Fixed: issue with order not being rejected with specific rejection re…
Browse files Browse the repository at this point in the history
…ason(#911)
  • Loading branch information
ymaheshwari1 committed Jan 28, 2025
1 parent 78ff677 commit ec38ac5
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 @@ -691,7 +691,8 @@ export default defineComponent({
// This variable is used in messages to display name of first rejected item from the itemsToReject array
const rejectedItem = itemsToReject[0];
if (itemsToReject.length === 1) {
message = translate('is identified as. This order item will be unassigned from the store and sent to be rebrokered.', { productName: rejectedItem.productName, rejectReason: ((this.rejectReasonOptions.find((rejectReason: {[key: string]: any}) => rejectReason.enumId === rejectedItem.rejectReason)).description).toLowerCase() });
const rejectionReason = this.getRejectionReasonDescription(rejectedItem.rejectReason)
message = translate('is identified as. This order item will be unassigned from the store and sent to be rebrokered.', { productName: rejectedItem.productName, rejectReason: rejectionReason?.toLowerCase() });
} else {
message = translate(', and other products were identified as unfulfillable. These items will be unassigned from this store and sent to be rebrokered.', { productName: rejectedItem.productName, products: itemsToReject.length - 1, space: '<br /><br />' });
}
Expand Down
3 changes: 2 additions & 1 deletion src/views/OrderDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,8 @@ export default defineComponent({
// This variable is used in messages to display name of first rejected item from the itemsToReject array
const rejectedItem = itemsToReject[0];
if (itemsToReject.length === 1) {
message = translate('is identified as. This order item will be unassigned from the store and sent to be rebrokered.', { productName: rejectedItem.productName, rejectReason: ((this.rejectReasonOptions.find((rejectReason: {[key: string]: any}) => rejectReason.enumId === rejectedItem.rejectReason)).description).toLowerCase() });
const rejectionReason = this.getRejectionReasonDescription(rejectedItem.rejectReason)
message = translate('is identified as. This order item will be unassigned from the store and sent to be rebrokered.', { productName: rejectedItem.productName, rejectReason: rejectionReason?.toLowerCase() });
} else {
message = translate(', and other products were identified as unfulfillable. These items will be unassigned from this store and sent to be rebrokered.', { productName: rejectedItem.productName, products: itemsToReject.length - 1, space: '<br /><br />' });
}
Expand Down

0 comments on commit ec38ac5

Please sign in to comment.