Skip to content

Commit

Permalink
Merge pull request #41477 from Expensify/yuwen-mergedWithCash
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisl authored May 3, 2024
2 parents f7be07a + db58664 commit 2f5173c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ const CONST = {
MANAGER_DETACH_RECEIPT: 'MANAGERDETACHRECEIPT', // OldDot Action
MARKED_REIMBURSED: 'MARKEDREIMBURSED', // OldDot Action
MARK_REIMBURSED_FROM_INTEGRATION: 'MARKREIMBURSEDFROMINTEGRATION', // OldDot Action
MERGED_WITH_CASH_TRANSACTION: 'MERGEDWITHCASHTRANSACTION',
MODIFIED_EXPENSE: 'MODIFIEDEXPENSE',
MOVED: 'MOVED',
OUTDATED_BANK_ACCOUNT: 'OUTDATEDBANKACCOUNT', // OldDot Action
Expand Down
3 changes: 3 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2999,4 +2999,7 @@ export default {
offline:
"You appear to be offline. Unfortunately, Expensify Classic doesn't work offline, but New Expensify does. If you prefer to use Expensify Classic, try again when you have an internet connection.",
},
systemMessage: {
mergedWithCashTransaction: 'matched a receipt to this transaction.',
},
} satisfies TranslationBase;
3 changes: 3 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3502,4 +3502,7 @@ export default {
offline:
'Parece que estás desconectado. Desafortunadamente, Expensify Classic no funciona sin conexión, pero New Expensify sí. Si prefieres utilizar Expensify Classic, inténtalo de nuevo cuando tengas conexión a internet.',
},
systemMessage: {
mergedWithCashTransaction: 'encontró un recibo para esta transacción.',
},
} satisfies EnglishTranslation;
2 changes: 2 additions & 0 deletions src/pages/home/report/ReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,8 @@ function ReportActionItem({
children = <ReportActionItemBasicMessage message={action.message?.[0]?.text ?? ''} />;
} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.UNHOLD) {
children = <ReportActionItemBasicMessage message={translate('iou.unheldExpense')} />;
} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.MERGED_WITH_CASH_TRANSACTION) {
children = <ReportActionItemBasicMessage message={translate('systemMessage.mergedWithCashTransaction')} />;
} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.DISMISSED_VIOLATION) {
children = <ReportActionItemBasicMessage message={ReportActionsUtils.getDismissedViolationMessageText(action.originalMessage)} />;
} else {
Expand Down
6 changes: 6 additions & 0 deletions src/types/onyx/OriginalMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ type OriginalMessageMoved = {
};
};

type OriginalMessageMergedWithCashTransaction = {
actionName: typeof CONST.REPORT.ACTIONS.TYPE.MERGED_WITH_CASH_TRANSACTION;
originalMessage: Record<string, never>; // No data is sent with this action
};

type OriginalMessageDismissedViolation = {
actionName: typeof CONST.REPORT.ACTIONS.TYPE.DISMISSED_VIOLATION;
originalMessage: {
Expand Down Expand Up @@ -344,6 +349,7 @@ type OriginalMessage =
| OriginalMessageMoved
| OriginalMessageMarkedReimbursed
| OriginalMessageActionableTrackedExpenseWhisper
| OriginalMessageMergedWithCashTransaction
| OriginalMessageDismissedViolation;

export default OriginalMessage;
Expand Down

0 comments on commit 2f5173c

Please sign in to comment.