diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 6dc735ebd8b7..a017cdc0b0ae 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -92,6 +92,10 @@ function isModifiedExpenseAction(reportAction: OnyxEntry): boolean return reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE; } +function isSubmittedExpenseAction(reportAction: OnyxEntry): boolean { + return reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.SUBMITTED; +} + function isWhisperAction(reportAction: OnyxEntry): boolean { return (reportAction?.whisperedToAccountIDs ?? []).length > 0; } @@ -693,6 +697,7 @@ export { isDeletedParentAction, isMessageDeleted, isModifiedExpenseAction, + isSubmittedExpenseAction, isMoneyRequestAction, isNotifiableReportAction, isPendingRemove, diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 4f35926c5957..4f8fb98873d7 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -284,6 +284,9 @@ export default [ } else if (ReportActionsUtils.isChannelLogMemberAction(reportAction)) { const logMessage = ReportUtils.getChannelLogMemberMessage(reportAction); Clipboard.setString(logMessage); + } else if (ReportActionsUtils.isSubmittedExpenseAction(reportAction)) { + const submittedMessage = _.reduce(reportAction.message, (acc, curr) => `${acc}${curr.text}`, ''); + Clipboard.setString(submittedMessage); } else if (content) { const parser = new ExpensiMark(); if (!Clipboard.canSetHtml()) {