@@ -236,13 +236,7 @@ import variables from '@styles/variables';
236236import { openPersonalBankAccountSetupView } from '@userActions/BankAccounts' ;
237237import type { IgnoreDirection } from '@userActions/ClearReportActionErrors' ;
238238import { hideEmojiPicker , isActive } from '@userActions/EmojiPickerAction' ;
239- import {
240- createTransactionThreadReport ,
241- expandURLPreview ,
242- resolveActionableMentionConfirmWhisper ,
243- resolveConciergeCategoryOptions ,
244- resolveConciergeDescriptionOptions ,
245- } from '@userActions/Report' ;
239+ import { createTransactionThreadReport , expandURLPreview , resolveConciergeCategoryOptions , resolveConciergeDescriptionOptions } from '@userActions/Report' ;
246240import { isAnonymousUser , signOutAndRedirectToSignIn } from '@userActions/Session' ;
247241import { isBlockedFromConcierge } from '@userActions/User' ;
248242import CONST from '@src/CONST' ;
@@ -252,6 +246,7 @@ import type SCREENS from '@src/SCREENS';
252246import type * as OnyxTypes from '@src/types/onyx' ;
253247import type { Errors } from '@src/types/onyx/OnyxCommon' ;
254248import { isEmptyObject , isEmptyValueObject } from '@src/types/utils/EmptyObject' ;
249+ import ConfirmWhisperContent from './actionContents/ConfirmWhisperContent' ;
255250import FraudAlertContent from './actionContents/FraudAlertContent' ;
256251import JoinRequestContent from './actionContents/JoinRequestContent' ;
257252import MentionWhisperContent from './actionContents/MentionWhisperContent' ;
@@ -585,9 +580,8 @@ function PureReportActionItem({
585580 const prevDraftMessage = usePrevious ( draftMessage ) ;
586581 const isReportActionLinked = linkedReportActionID && action . reportActionID && linkedReportActionID === action . reportActionID ;
587582 const [ isReportActionActive , setIsReportActionActive ] = useState ( ! ! isReportActionLinked ) ;
588- const isActionableWhisper = isActionableMentionInviteToSubmitExpenseConfirmWhisper ( action ) || isActionableTrackExpense ( action ) ;
589583 const isReportArchived = useReportIsArchived ( reportID ) ;
590- const isOriginalReportArchived = useReportIsArchived ( originalReportID ) ;
584+
591585 const isHarvestCreatedExpenseReport = isHarvestCreatedExpenseReportUtils ( reportNameValuePairsOrigin , reportNameValuePairsOriginalID ) ;
592586 const expensifyIcons = useMemoizedLazyExpensifyIcons ( [ 'Eye' ] ) ;
593587 const { environmentURL} = useEnvironment ( ) ;
@@ -949,12 +943,8 @@ function PureReportActionItem({
949943 }
950944 }
951945
952- if ( ! isActionableWhisper ) {
953- return [ ] ;
954- }
955-
956- const reportActionReportID = originalReportID ?? reportID ;
957946 if ( isActionableTrackExpense ( action ) ) {
947+ const reportActionReportID = originalReportID ?? reportID ;
958948 const options = [
959949 {
960950 text : 'actionableMentionTrackExpense.submit' ,
@@ -1034,38 +1024,19 @@ function PureReportActionItem({
10341024 return options ;
10351025 }
10361026
1037- if ( isActionableMentionInviteToSubmitExpenseConfirmWhisper ( action ) ) {
1038- return [
1039- {
1040- text : 'common.buttonConfirm' ,
1041- key : `${ action . reportActionID } -actionableReportMentionConfirmWhisper-${ CONST . REPORT . ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER . DONE } ` ,
1042- onPress : ( ) =>
1043- resolveActionableMentionConfirmWhisper (
1044- reportActionReport ,
1045- action ,
1046- CONST . REPORT . ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER . DONE ,
1047- isOriginalReportArchived ,
1048- ) ,
1049- isPrimary : true ,
1050- } ,
1051- ] ;
1052- }
1053-
10541027 return [ ] ;
10551028 } , [
10561029 action ,
10571030 userBillingFundID ,
10581031 originalReportID ,
10591032 reportID ,
1060- isActionableWhisper ,
10611033 currentUserAccountID ,
10621034 currentUserEmail ,
10631035 personalDetail . timezone ,
10641036 createDraftTransactionAndNavigateToParticipantSelector ,
10651037 isRestrictedToPreferredPolicy ,
10661038 preferredPolicyID ,
10671039 dismissTrackExpenseActionableWhisper ,
1068- isOriginalReportArchived ,
10691040 introSelected ,
10701041 draftTransactionIDs ,
10711042 activePolicy ,
@@ -1586,7 +1557,7 @@ function PureReportActionItem({
15861557 policy = { policy }
15871558 currentUserAccountID = { currentUserAccountID }
15881559 personalPolicyID = { personalPolicyID }
1589- isOriginalReportArchived = { isOriginalReportArchived }
1560+ originalReportID = { originalReportID }
15901561 resolveActionableMentionWhisper = { resolveActionableMentionWhisper }
15911562 />
15921563 ) ;
@@ -1601,6 +1572,16 @@ function PureReportActionItem({
16011572 resolveActionableReportMentionWhisper = { resolveActionableReportMentionWhisper }
16021573 />
16031574 ) ;
1575+ } else if ( isActionableMentionInviteToSubmitExpenseConfirmWhisper ( action ) ) {
1576+ children = (
1577+ < ConfirmWhisperContent
1578+ action = { action }
1579+ reportID = { reportID }
1580+ report = { report }
1581+ originalReport = { originalReport }
1582+ originalReportID = { originalReportID }
1583+ />
1584+ ) ;
16041585 } else if ( isActionOfType ( action , CONST . REPORT . ACTIONS . TYPE . ROOM_CHANGE_LOG . LEAVE_ROOM ) || isActionOfType ( action , CONST . REPORT . ACTIONS . TYPE . POLICY_CHANGE_LOG . LEAVE_ROOM ) ) {
16051586 children = < ReportActionItemBasicMessage message = { translate ( 'report.actions.type.leftTheChat' ) } /> ;
16061587 } else if ( isActionOfType ( action , CONST . REPORT . ACTIONS . TYPE . DEMOTED_FROM_WORKSPACE ) ) {
@@ -1765,11 +1746,6 @@ function PureReportActionItem({
17651746 </ Text >
17661747 </ Button >
17671748 ) }
1768- { /**
1769- These are the actionable buttons that appear at the bottom of a Concierge message
1770- for example: Invite a user mentioned but not a member of the room
1771- https://github.com/Expensify/App/issues/32741
1772- */ }
17731749 { actionableItemButtons . length > 0 && (
17741750 < ActionableItemButtons
17751751 items = { actionableItemButtons }
0 commit comments