Skip to content

Commit c3c13d6

Browse files
authored
Merge pull request #913 from ymaheshwari1/#911
Fixed: issue with order not being rejected with specific rejection reason(#911)
2 parents 78ff677 + ec38ac5 commit c3c13d6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/views/InProgress.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,8 @@ export default defineComponent({
691691
// This variable is used in messages to display name of first rejected item from the itemsToReject array
692692
const rejectedItem = itemsToReject[0];
693693
if (itemsToReject.length === 1) {
694-
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() });
694+
const rejectionReason = this.getRejectionReasonDescription(rejectedItem.rejectReason)
695+
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() });
695696
} else {
696697
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 />' });
697698
}

src/views/OrderDetail.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,8 @@ export default defineComponent({
13631363
// This variable is used in messages to display name of first rejected item from the itemsToReject array
13641364
const rejectedItem = itemsToReject[0];
13651365
if (itemsToReject.length === 1) {
1366-
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() });
1366+
const rejectionReason = this.getRejectionReasonDescription(rejectedItem.rejectReason)
1367+
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() });
13671368
} else {
13681369
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 />' });
13691370
}

0 commit comments

Comments
 (0)