diff --git a/src/CONST.ts b/src/CONST.ts index 34720adf8a21..520ee0399b55 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -512,6 +512,7 @@ const CONST = { CLOSED: 'CLOSED', CREATED: 'CREATED', IOU: 'IOU', + MARKEDREIMBURSED: 'MARKEDREIMBURSED', MODIFIEDEXPENSE: 'MODIFIEDEXPENSE', MOVED: 'MOVED', REIMBURSEMENTQUEUED: 'REIMBURSEMENTQUEUED', diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 4847eee2c8c6..b1a5e9e6f715 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -751,6 +751,14 @@ function getMemberChangeMessageFragment(reportAction: OnyxEntry): }; } +/** + * MARKEDREIMBURSED reportActions come from marking a report as reimbursed in OldDot. For now, we just + * concat all of the text elements of the message to create the full message. + */ +function getMarkedReimbursedMessage(reportAction: OnyxEntry): string { + return reportAction?.message?.map((element) => element.text).join('') ?? ''; +} + function getMemberChangeMessagePlainText(reportAction: OnyxEntry): string { const messageElements = getMemberChangeMessageElements(reportAction); return messageElements.map((element) => element.content).join(''); @@ -820,6 +828,7 @@ export { hasRequestFromCurrentAccount, getFirstVisibleReportActionID, isMemberChangeAction, + getMarkedReimbursedMessage, getMemberChangeMessageFragment, getMemberChangeMessagePlainText, isReimbursementDeQueuedAction, diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index e2a345d33a32..2ecbd9c74eef 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -422,6 +422,8 @@ function ReportActionItem(props) { children = ; } else if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE) { children = ; + } else if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.MARKEDREIMBURSED) { + children = ; } else { const hasBeenFlagged = !_.contains([CONST.MODERATION.MODERATOR_DECISION_APPROVED, CONST.MODERATION.MODERATOR_DECISION_PENDING], moderationDecision); children = (