Skip to content

Commit 98ac9ac

Browse files
authoredSep 30, 2024··
Merge pull request #49187 from Expensify/beaman-updateAutomaticallyPaidRACopy
Update "automatically paid" report action copy
2 parents 889ba4b + 39035e6 commit 98ac9ac

File tree

5 files changed

+17
-2
lines changed

5 files changed

+17
-2
lines changed
 

‎help/index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
title: New Expensify Help
33
---
4+
45
Pages:
5-
* [Expensify Superapp](/superapp.html)
6+
7+
- [Expensify Superapp](/superapp.html)

‎src/languages/en.ts

+2
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,8 @@ const translations = {
923923
`${submitterDisplayName} added a bank account. The ${amount} payment has been made.`,
924924
paidElsewhereWithAmount: ({payer, amount}: PaidElsewhereWithAmountParams) => `${payer ? `${payer} ` : ''}paid ${amount} elsewhere`,
925925
paidWithExpensifyWithAmount: ({payer, amount}: PaidWithExpensifyWithAmountParams) => `${payer ? `${payer} ` : ''}paid ${amount} with Expensify`,
926+
automaticallyPaidWithExpensify: ({payer, amount}: PaidWithExpensifyWithAmountParams) =>
927+
`${payer ? `${payer} ` : ''}automatically paid ${amount} with Expensify via <a href="${CONST.CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL}">workspace rules</a>`,
926928
noReimbursableExpenses: 'This report has an invalid amount',
927929
pendingConversionMessage: "Total will update when you're back online",
928930
changedTheExpense: 'changed the expense',

‎src/languages/es.ts

+2
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,8 @@ const translations = {
916916
`${submitterDisplayName} añadió una cuenta bancaria. El pago de ${amount} se ha realizado.`,
917917
paidElsewhereWithAmount: ({payer, amount}: PaidElsewhereWithAmountParams) => `${payer ? `${payer} ` : ''}pagó ${amount} de otra forma`,
918918
paidWithExpensifyWithAmount: ({payer, amount}: PaidWithExpensifyWithAmountParams) => `${payer ? `${payer} ` : ''}pagó ${amount} con Expensify`,
919+
automaticallyPaidWithExpensify: ({payer, amount}: PaidWithExpensifyWithAmountParams) =>
920+
`${payer ? `${payer} ` : ''}auto-pagó ${amount} con Expensify via <a href="${CONST.CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL}">reglas del espacio de trabajo</a>`,
919921
noReimbursableExpenses: 'El importe de este informe no es válido',
920922
pendingConversionMessage: 'El total se actualizará cuando estés online',
921923
changedTheExpense: 'cambió el gasto',

‎src/libs/ReportUtils.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -3438,6 +3438,9 @@ function getReportPreviewMessage(
34383438
report.isWaitingOnBankAccount
34393439
) {
34403440
translatePhraseKey = 'iou.paidWithExpensifyWithAmount';
3441+
if (originalMessage?.automaticAction) {
3442+
translatePhraseKey = 'iou.automaticallyPaidWithExpensify';
3443+
}
34413444
}
34423445

34433446
let actualPayerName = report.managerID === currentUserAccountID ? '' : getDisplayNameForParticipant(report.managerID, true);
@@ -7126,7 +7129,7 @@ function getIOUReportActionDisplayMessage(reportAction: OnyxEntry<ReportAction>,
71267129
return '';
71277130
}
71287131
const originalMessage = ReportActionsUtils.getOriginalMessage(reportAction);
7129-
const {IOUReportID} = originalMessage ?? {};
7132+
const {IOUReportID, automaticAction} = originalMessage ?? {};
71307133
const iouReport = getReportOrDraftReport(IOUReportID);
71317134
let translationKey: TranslationPaths;
71327135
if (originalMessage?.type === CONST.IOU.REPORT_ACTION_TYPE.PAY) {
@@ -7143,6 +7146,9 @@ function getIOUReportActionDisplayMessage(reportAction: OnyxEntry<ReportAction>,
71437146
case CONST.IOU.PAYMENT_TYPE.EXPENSIFY:
71447147
case CONST.IOU.PAYMENT_TYPE.VBBA:
71457148
translationKey = 'iou.paidWithExpensifyWithAmount';
7149+
if (automaticAction) {
7150+
translationKey = 'iou.automaticallyPaidWithExpensify';
7151+
}
71467152
break;
71477153
default:
71487154
translationKey = 'iou.payerPaidAmount';

‎src/types/onyx/OriginalMessage.ts

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ type OriginalMessageIOU = {
3939
/** How much was transactioned */
4040
amount: number;
4141

42+
/** Was the action created automatically, not by a human */
43+
automaticAction?: boolean;
44+
4245
/** Optional comment */
4346
comment?: string;
4447

0 commit comments

Comments
 (0)
Please sign in to comment.