diff --git a/src/components/ReportActionItem/IOUPreview.js b/src/components/ReportActionItem/IOUPreview.js index 069f2c6e3d6e..e1617a4efb9a 100644 --- a/src/components/ReportActionItem/IOUPreview.js +++ b/src/components/ReportActionItem/IOUPreview.js @@ -167,7 +167,7 @@ function IOUPreview(props) { let message = props.translate('iou.cash'); if (ReportUtils.isControlPolicyExpenseReport(props.iouReport) && ReportUtils.isReportApproved(props.iouReport) && !ReportUtils.isSettled(props.iouReport)) { - message += ` • approved`; + message += ` • ${props.translate('iou.approved')}`; } else if (props.iouReport.isWaitingOnBankAccount) { message += ` • ${props.translate('iou.pending')}`; } else if (ReportUtils.isSettled(props.iouReport.reportID)) { diff --git a/src/components/ReportActionItem/ReportPreview.js b/src/components/ReportActionItem/ReportPreview.js index 0ba0a1c4099f..fc3e68974fde 100644 --- a/src/components/ReportActionItem/ReportPreview.js +++ b/src/components/ReportActionItem/ReportPreview.js @@ -116,7 +116,12 @@ function ReportPreview(props) { const managerName = ReportUtils.isPolicyExpenseChat(props.chatReport) ? ReportUtils.getPolicyName(props.chatReport) : ReportUtils.getDisplayNameForParticipant(managerID, true); const bankAccountRoute = ReportUtils.getBankAccountRoute(props.chatReport); - const previewMessage = props.translate(ReportUtils.isSettled(props.iouReportID) || props.iouReport.isWaitingOnBankAccount ? 'iou.payerPaid' : 'iou.payerOwes', {payer: managerName}); + let previewMessage; + if (ReportUtils.isControlPolicyExpenseReport(props.iouReport) && ReportUtils.isReportApproved(props.iouReport)) { + previewMessage = props.translate('iou.managerApproved', {manager: ReportUtils.getDisplayNameForParticipant(managerID, true)}); + } else { + previewMessage = props.translate(ReportUtils.isSettled(props.iouReportID) || props.iouReport.isWaitingOnBankAccount ? 'iou.payerPaid' : 'iou.payerOwes', {payer: managerName}); + } const shouldShowSettlementButton = !_.isEmpty(props.iouReport) && isCurrentUserManager && !ReportUtils.isSettled(props.iouReportID) && !props.iouReport.isWaitingOnBankAccount && reportTotal !== 0; return ( diff --git a/src/languages/en.js b/src/languages/en.js index 229166a3f858..e6abd880b6aa 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -370,6 +370,7 @@ export default { }, iou: { amount: 'Amount', + approved: 'Approved', cash: 'Cash', split: 'Split', request: 'Request', @@ -395,6 +396,7 @@ export default { payerOwes: ({payer}) => `${payer} owes: `, payerPaidAmount: ({payer, amount}) => `${payer} paid ${amount}`, payerPaid: ({payer}) => `${payer} paid: `, + managerApproved: ({manager}) => `${manager} approved:`, payerSettled: ({amount}) => `paid ${amount}`, waitingOnBankAccount: ({submitterDisplayName}) => `started settling up, payment is held until ${submitterDisplayName} adds a bank account`, settledAfterAddedBankAccount: ({submitterDisplayName, amount}) => `${submitterDisplayName} added a bank account. The ${amount} payment has been made.`, diff --git a/src/languages/es.js b/src/languages/es.js index 0e24a386cd14..193b9ac2acdf 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -369,6 +369,8 @@ export default { }, iou: { amount: 'Importe', + // TODO + approved: '', cash: 'Efectivo', split: 'Dividir', request: 'Solicitar', @@ -394,6 +396,8 @@ export default { payerOwes: ({payer}) => `${payer} debe: `, payerPaidAmount: ({payer, amount}) => `${payer} pagó ${amount}`, payerPaid: ({payer}) => `${payer} pagó: `, + // TODO + managerApproved: ({manager}) => `${manager} approved:`, payerSettled: ({amount}) => `pagó ${amount}`, waitingOnBankAccount: ({submitterDisplayName}) => `inicio el pago, pero no se procesará hasta que ${submitterDisplayName} añada una cuenta bancaria`, settledAfterAddedBankAccount: ({submitterDisplayName, amount}) => `${submitterDisplayName} añadió una cuenta bancaria. El pago de ${amount} se ha realizado.`,