@@ -77,7 +77,6 @@ import {
7777 getIOUReportIDFromReportActionPreview ,
7878 getOriginalMessage ,
7979 getPlaidBalanceFailureMessage ,
80- getReimbursedMessage ,
8180 getRenamedAction ,
8281 getReportActionHtml ,
8382 getReportActionMessage ,
@@ -146,8 +145,11 @@ import ConfirmWhisperContent from './actionContents/ConfirmWhisperContent';
146145import FraudAlertContent from './actionContents/FraudAlertContent' ;
147146import JoinRequestContent from './actionContents/JoinRequestContent' ;
148147import MentionWhisperContent from './actionContents/MentionWhisperContent' ;
148+ import ModifiedExpenseContent from './actionContents/ModifiedExpenseContent' ;
149149import PaymentContent from './actionContents/PaymentContent' ;
150150import PolicyChangeLogContent , { isHandledPolicyChangeLogAction } from './actionContents/PolicyChangeLogContent' ;
151+ import ReimbursedContent from './actionContents/ReimbursedContent' ;
152+ import ReimbursementDeQueuedContent from './actionContents/ReimbursementDeQueuedContent' ;
151153import ReportMentionWhisperContent from './actionContents/ReportMentionWhisperContent' ;
152154import SimpleMessageContent , { isSimpleMessageAction } from './actionContents/SimpleMessageContent' ;
153155import { RestrictedReadOnlyContextMenuActions } from './ContextMenu/ContextMenuActions' ;
@@ -159,7 +161,6 @@ import ReportActionItemBasicMessage from './ReportActionItemBasicMessage';
159161import ReportActionItemContentCreated from './ReportActionItemContentCreated' ;
160162import ReportActionItemDraft from './ReportActionItemDraft' ;
161163import ReportActionItemGrouped from './ReportActionItemGrouped' ;
162- import ReportActionItemMessageWithExplain from './ReportActionItemMessageWithExplain' ;
163164import ReportActionItemSingle from './ReportActionItemSingle' ;
164165import ReportActionItemThread from './ReportActionItemThread' ;
165166import TripSummary from './TripSummary' ;
@@ -306,12 +307,6 @@ type PureReportActionItemProps = {
306307 /** What missing payment method does this report action indicate, if any? */
307308 missingPaymentMethod ?: MissingPaymentMethod | undefined ;
308309
309- /** Returns the preview message for `REIMBURSEMENT_DEQUEUED` or `REIMBURSEMENT_ACH_CANCELED` action */
310- reimbursementDeQueuedOrCanceledActionMessage ?: string ;
311-
312- /** The report action message when expense has been modified. */
313- modifiedExpenseMessage ?: string ;
314-
315310 /** Gets all transactions on an IOU report with a receipt */
316311 getTransactionsWithReceipts ?: ( iouReportID : string | undefined ) => OnyxTypes . Transaction [ ] ;
317312
@@ -406,8 +401,6 @@ function PureReportActionItem({
406401 isClosedExpenseReportWithNoExpenses,
407402 isCurrentUserTheOnlyParticipant = ( ) => false ,
408403 missingPaymentMethod,
409- reimbursementDeQueuedOrCanceledActionMessage = '' ,
410- modifiedExpenseMessage = '' ,
411404 getTransactionsWithReceipts = ( ) => [ ] ,
412405 clearError = ( ) => { } ,
413406 clearAllRelatedReportActionErrors = ( ) => { } ,
@@ -915,12 +908,17 @@ function PureReportActionItem({
915908 </ ReportActionItemBasicMessage >
916909 ) ;
917910 } else if ( isReimbursementDeQueuedOrCanceledAction ( action ) ) {
918- children = < ReportActionItemBasicMessage message = { reimbursementDeQueuedOrCanceledActionMessage } /> ;
911+ children = (
912+ < ReimbursementDeQueuedContent
913+ action = { action }
914+ report = { report }
915+ />
916+ ) ;
919917 } else if ( action . actionName === CONST . REPORT . ACTIONS . TYPE . MODIFIED_EXPENSE ) {
920918 children = (
921- < ReportActionItemMessageWithExplain
922- message = { modifiedExpenseMessage }
919+ < ModifiedExpenseContent
923920 action = { action }
921+ report = { report }
924922 childReport = { childReport }
925923 originalReport = { originalReport }
926924 />
@@ -944,7 +942,12 @@ function PureReportActionItem({
944942 />
945943 ) ;
946944 } else if ( isActionOfType ( action , CONST . REPORT . ACTIONS . TYPE . REIMBURSED ) ) {
947- children = < ReportActionItemBasicMessage message = { getReimbursedMessage ( translate , action , report , currentUserAccountID ) } /> ;
945+ children = (
946+ < ReimbursedContent
947+ action = { action }
948+ report = { report }
949+ />
950+ ) ;
948951 } else if ( isSimpleMessageAction ( action ) ) {
949952 children = < SimpleMessageContent action = { action } /> ;
950953 } else if ( isActionOfType ( action , CONST . REPORT . ACTIONS . TYPE . FORWARDED ) ) {
@@ -1023,7 +1026,6 @@ function PureReportActionItem({
10231026 report = { report }
10241027 originalReport = { originalReport }
10251028 policy = { policy }
1026- currentUserAccountID = { currentUserAccountID }
10271029 personalPolicyID = { personalPolicyID }
10281030 originalReportID = { originalReportID }
10291031 resolveActionableMentionWhisper = { resolveActionableMentionWhisper }
@@ -1188,7 +1190,6 @@ function PureReportActionItem({
11881190 accountIDs = { oldestFourAccountIDs }
11891191 onSecondaryInteraction = { showPopover }
11901192 isActive = { isReportActionActive && ! isContextMenuActive }
1191- currentUserAccountID = { currentUserAccountID }
11921193 />
11931194 </ View >
11941195 ) }
@@ -1501,8 +1502,6 @@ export default memo(PureReportActionItem, (prevProps, nextProps) => {
15011502 prevProps . isChronosReport === nextProps . isChronosReport &&
15021503 prevProps . isClosedExpenseReportWithNoExpenses === nextProps . isClosedExpenseReportWithNoExpenses &&
15031504 deepEqual ( prevProps . missingPaymentMethod , nextProps . missingPaymentMethod ) &&
1504- prevProps . reimbursementDeQueuedOrCanceledActionMessage === nextProps . reimbursementDeQueuedOrCanceledActionMessage &&
1505- prevProps . modifiedExpenseMessage === nextProps . modifiedExpenseMessage &&
15061505 prevProps . userBillingFundID === nextProps . userBillingFundID &&
15071506 deepEqual ( prevProps . taskReport , nextProps . taskReport ) &&
15081507 prevProps . shouldHighlight === nextProps . shouldHighlight &&
0 commit comments