Skip to content

Commit ba072c2

Browse files
committed
Fix ts error
1 parent df143d9 commit ba072c2

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

src/libs/actions/Report.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4355,6 +4355,7 @@ function resolveActionableMentionWhisper(
43554355
reportID: string | undefined,
43564356
reportAction: OnyxEntry<ReportAction>,
43574357
resolution: ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION> | ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER>,
4358+
formatPhoneNumber: LocaleContextProps['formatPhoneNumber'],
43584359
policy?: OnyxEntry<Policy>,
43594360
) {
43604361
if (!reportAction || !reportID) {
@@ -4380,7 +4381,7 @@ function resolveActionableMentionWhisper(
43804381
invitees[email] = actionOriginalMessage.inviteeAccountIDs?.at(index) ?? CONST.DEFAULT_NUMBER_ID;
43814382
});
43824383

4383-
addMembersToWorkspace(invitees, `${welcomeNoteSubject}\n\n${welcomeNote}`, policyID, policyMemberAccountIDs, CONST.POLICY.ROLE.USER);
4384+
addMembersToWorkspace(invitees, `${welcomeNoteSubject}\n\n${welcomeNote}`, policyID, policyMemberAccountIDs, CONST.POLICY.ROLE.USER, formatPhoneNumber);
43844385
}
43854386
}
43864387

@@ -4463,8 +4464,9 @@ function resolveActionableMentionConfirmWhisper(
44634464
reportID: string | undefined,
44644465
reportAction: OnyxEntry<ReportAction>,
44654466
resolution: ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER>,
4467+
formatPhoneNumber: LocaleContextProps['formatPhoneNumber'],
44664468
) {
4467-
resolveActionableMentionWhisper(reportID, reportAction, resolution);
4469+
resolveActionableMentionWhisper(reportID, reportAction, resolution, formatPhoneNumber);
44684470
}
44694471

44704472
function resolveActionableReportMentionWhisper(

src/pages/home/report/PureReportActionItem.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import Icon from '@components/Icon';
1717
import {Eye} from '@components/Icon/Expensicons';
1818
import InlineSystemMessage from '@components/InlineSystemMessage';
1919
import KYCWall from '@components/KYCWall';
20+
import type {LocaleContextProps} from '@components/LocaleContextProvider';
2021
import OfflineWithFeedback from '@components/OfflineWithFeedback';
2122
import PressableWithSecondaryInteraction from '@components/PressableWithSecondaryInteraction';
2223
import ReportActionItemEmojiReactions from '@components/Reactions/ReportActionItemEmojiReactions';
@@ -326,6 +327,7 @@ type PureReportActionItemProps = {
326327
reportId: string | undefined,
327328
reportAction: OnyxEntry<OnyxTypes.ReportAction>,
328329
resolution: ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION>,
330+
formatPhoneNumber: LocaleContextProps['formatPhoneNumber'],
329331
policy: OnyxEntry<OnyxTypes.Policy>,
330332
) => void;
331333

@@ -818,7 +820,7 @@ function PureReportActionItem({
818820
{
819821
text: 'common.buttonConfirm',
820822
key: `${action.reportActionID}-actionableReportMentionConfirmWhisper-${CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER.DONE}`,
821-
onPress: () => resolveActionableMentionConfirmWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER.DONE),
823+
onPress: () => resolveActionableMentionConfirmWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER.DONE, formatPhoneNumber),
822824
isPrimary: true,
823825
},
824826
];
@@ -831,7 +833,7 @@ function PureReportActionItem({
831833
actionableMentionWhisperOptions.push({
832834
text: 'actionableMentionWhisperOptions.inviteToSubmitExpense',
833835
key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE}`,
834-
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE, policy),
836+
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE, formatPhoneNumber, policy),
835837
isMediumSized: true,
836838
});
837839
}
@@ -840,13 +842,13 @@ function PureReportActionItem({
840842
{
841843
text: 'actionableMentionWhisperOptions.inviteToChat',
842844
key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE}`,
843-
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE, policy),
845+
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE, formatPhoneNumber, policy),
844846
isMediumSized: true,
845847
},
846848
{
847849
text: 'actionableMentionWhisperOptions.nothing',
848850
key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING}`,
849-
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING, policy),
851+
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING, formatPhoneNumber, policy),
850852
isMediumSized: true,
851853
},
852854
);
@@ -855,6 +857,7 @@ function PureReportActionItem({
855857
action,
856858
userBillingFundID,
857859
isActionableWhisper,
860+
report?.policyID,
858861
policy,
859862
currentUserAccountID,
860863
reportID,
@@ -863,6 +866,7 @@ function PureReportActionItem({
863866
createDraftTransactionAndNavigateToParticipantSelector,
864867
dismissTrackExpenseActionableWhisper,
865868
resolveActionableReportMentionWhisper,
869+
formatPhoneNumber,
866870
resolveActionableMentionWhisper,
867871
]);
868872

0 commit comments

Comments
 (0)