diff --git a/src/views/InProgress.vue b/src/views/InProgress.vue
index 604c5a45..7e455b08 100644
--- a/src/views/InProgress.vue
+++ b/src/views/InProgress.vue
@@ -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: '
' });
}
diff --git a/src/views/OrderDetail.vue b/src/views/OrderDetail.vue
index 687f0d1e..1a055643 100644
--- a/src/views/OrderDetail.vue
+++ b/src/views/OrderDetail.vue
@@ -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: '
' });
}