Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 53003 on room invite sms shown #53240

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4624eb4
fix #53003 on room invite sms shown
Kalydosos Nov 27, 2024
f9927db
generalize the usage of phone number formatting
Kalydosos Nov 28, 2024
079e8c3
generalize the usage of phone number formatting
Kalydosos Nov 28, 2024
b10f5fb
run prettier
Kalydosos Nov 28, 2024
bd015ed
Merge branch 'Expensify:main' into fix-53003-on-room-invite-sms-shown
Kalydosos Nov 28, 2024
423332c
usememo dependency fix
Kalydosos Nov 28, 2024
3e28287
update some tests with no-break space character
Kalydosos Nov 28, 2024
30912b1
lint update
Kalydosos Nov 28, 2024
b004644
lint update
Kalydosos Nov 28, 2024
845de1c
Merge branch 'main' into fix-53003-on-room-invite-sms-shown
Kalydosos Nov 29, 2024
ab4b111
remove an extra formatting
Kalydosos Nov 30, 2024
1c367fe
Merge branch 'Expensify:main' into fix-53003-on-room-invite-sms-shown
Kalydosos Nov 30, 2024
2c3415c
Merge branch 'Expensify:main' into fix-53003-on-room-invite-sms-shown
Kalydosos Dec 3, 2024
55e9738
update on iou confirmation options
Kalydosos Dec 3, 2024
e308a4b
revert changes on cards
Kalydosos Dec 4, 2024
864293c
migrate some files from withOnyx to useOnyx
Kalydosos Dec 5, 2024
63e30c3
migrate some files from withOnyx to useOnyx
Kalydosos Dec 5, 2024
f0987e0
Merge branch 'Expensify:main' into fix-53003-on-room-invite-sms-shown
Kalydosos Dec 5, 2024
3b39a32
format phone number and display names
Kalydosos Dec 6, 2024
6d93690
format phone number and display names
Kalydosos Dec 6, 2024
e79c907
format phone number and display names
Kalydosos Dec 6, 2024
3e216f8
use of formatphonenumber
Kalydosos Dec 6, 2024
de3750f
use of formatphonenumber
Kalydosos Dec 6, 2024
e36f20c
use of formatphonenumber
Kalydosos Dec 6, 2024
9c25564
Merge branch 'main' into fix-53003-on-room-invite-sms-shown
Kalydosos Dec 6, 2024
b05d47b
resolve conflict on profileavatar
Kalydosos Dec 7, 2024
fa48b45
resolve conflict on profileavatar
Kalydosos Dec 7, 2024
21da67d
resolve conflict on profileavatar
Kalydosos Dec 7, 2024
6bdeffb
fix phone number formatting issue
Kalydosos Dec 9, 2024
953d533
Merge branch 'Expensify:main' into fix-53003-on-room-invite-sms-shown
Kalydosos Dec 9, 2024
b705118
fix phone number formatting issue
Kalydosos Dec 9, 2024
135dde6
Merge branch 'main' into fix-53003-on-room-invite-sms-shown
Kalydosos Dec 10, 2024
fe38203
Merge branch 'Expensify:main' into fix-53003-on-room-invite-sms-shown
Kalydosos Dec 10, 2024
8e43fe1
fix phone number formatting issue
Kalydosos Dec 10, 2024
2e8a6ea
Merge branch 'main' into fix-53003-on-room-invite-sms-shown
Kalydosos Dec 11, 2024
d8cf634
fix phone number formatting
Kalydosos Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 7 additions & 23 deletions src/components/ArchivedReportFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import lodashEscape from 'lodash/escape';
import React from 'react';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import {useOnyx} from 'react-native-onyx';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import {getCurrentUserAccountID} from '@libs/actions/Report';
Expand All @@ -10,26 +9,20 @@ import * as ReportActionsUtils from '@libs/ReportActionsUtils';
import * as ReportUtils from '@libs/ReportUtils';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {PersonalDetailsList, Report, ReportAction} from '@src/types/onyx';
import type {Report} from '@src/types/onyx';
import Banner from './Banner';

type ArchivedReportFooterOnyxProps = {
/** The reason this report was archived */
reportClosedAction: OnyxEntry<ReportAction>;

/** Personal details of all users */
personalDetails: OnyxEntry<PersonalDetailsList>;
};

type ArchivedReportFooterProps = ArchivedReportFooterOnyxProps & {
type ArchivedReportFooterProps = {
/** The archived report */
report: Report;
};

function ArchivedReportFooter({report, reportClosedAction, personalDetails = {}}: ArchivedReportFooterProps) {
function ArchivedReportFooter({report}: ArchivedReportFooterProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();

const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST, {initialValue: {}});
const [reportClosedAction] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.reportID}`, {canEvict: false, selector: ReportActionsUtils.getLastClosedReportAction});
const originalMessage = ReportActionsUtils.isClosedAction(reportClosedAction) ? ReportActionsUtils.getOriginalMessage(reportClosedAction) : null;
const archiveReason = originalMessage?.reason ?? CONST.REPORT.ARCHIVE_REASON.DEFAULT;
const actorPersonalDetails = personalDetails?.[reportClosedAction?.actorAccountID ?? -1];
Expand Down Expand Up @@ -78,13 +71,4 @@ function ArchivedReportFooter({report, reportClosedAction, personalDetails = {}}

ArchivedReportFooter.displayName = 'ArchivedReportFooter';

export default withOnyx<ArchivedReportFooterProps, ArchivedReportFooterOnyxProps>({
personalDetails: {
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
},
reportClosedAction: {
key: ({report}) => `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.reportID}`,
canEvict: false,
selector: ReportActionsUtils.getLastClosedReportAction,
},
})(ArchivedReportFooter);
export default ArchivedReportFooter;
12 changes: 6 additions & 6 deletions src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ function getParticipantsOption(participant: ReportUtils.OptionData | Participant
const detail = getPersonalDetailsForAccountIDs([participant.accountID ?? -1], personalDetails)[participant.accountID ?? -1];
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const login = detail?.login || participant.login || '';
const displayName = PersonalDetailsUtils.getDisplayNameOrDefault(detail, LocalePhoneNumber.formatPhoneNumber(login) || participant.text);
const displayName = LocalePhoneNumber.formatPhoneNumber(PersonalDetailsUtils.getDisplayNameOrDefault(detail, login || participant.text));

return {
keyForList: String(detail?.accountID),
Expand Down Expand Up @@ -401,7 +401,7 @@ function uniqFast(items: string[]): string[] {
function getLastActorDisplayName(lastActorDetails: Partial<PersonalDetails> | null, hasMultipleParticipants: boolean) {
return hasMultipleParticipants && lastActorDetails && lastActorDetails.accountID !== currentUserAccountID
? // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
lastActorDetails.firstName || PersonalDetailsUtils.getDisplayNameOrDefault(lastActorDetails)
lastActorDetails.firstName || LocalePhoneNumber.formatPhoneNumber(PersonalDetailsUtils.getDisplayNameOrDefault(lastActorDetails))
: '';
}

Expand Down Expand Up @@ -499,7 +499,7 @@ function getLastMessageTextForReport(report: OnyxEntry<Report>, lastActorDetails
case CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY:
case CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED: {
lastMessageTextFromReport = Localize.translate(preferredLocale, `reportArchiveReasons.${archiveReason}`, {
displayName: PersonalDetailsUtils.getDisplayNameOrDefault(lastActorDetails),
displayName: LocalePhoneNumber.formatPhoneNumber(PersonalDetailsUtils.getDisplayNameOrDefault(lastActorDetails)),
policyName: ReportUtils.getPolicyName(report, false, policy),
});
break;
Expand Down Expand Up @@ -1351,10 +1351,10 @@ function getShareLogOptions(options: OptionList, betas: Beta[] = []): Options {
* Build the IOUConfirmation options for showing the payee personalDetail
*/
function getIOUConfirmationOptionsFromPayeePersonalDetail(personalDetail: OnyxEntry<PersonalDetails>, amountText?: string): PayeePersonalDetails {
const formattedLogin = LocalePhoneNumber.formatPhoneNumber(personalDetail?.login ?? '');
const login = personalDetail?.login ?? '';
return {
text: PersonalDetailsUtils.getDisplayNameOrDefault(personalDetail, formattedLogin),
alternateText: formattedLogin || PersonalDetailsUtils.getDisplayNameOrDefault(personalDetail, '', false),
text: LocalePhoneNumber.formatPhoneNumber(PersonalDetailsUtils.getDisplayNameOrDefault(personalDetail, login)),
alternateText: LocalePhoneNumber.formatPhoneNumber(login || PersonalDetailsUtils.getDisplayNameOrDefault(personalDetail, '', false)),
icons: [
{
source: personalDetail?.avatar ?? FallbackAvatar,
Expand Down
4 changes: 3 additions & 1 deletion src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import DateUtils from './DateUtils';
import * as Environment from './Environment/Environment';
import getBase62ReportID from './getBase62ReportID';
import isReportMessageAttachment from './isReportMessageAttachment';
import {formatPhoneNumber} from './LocalePhoneNumber';
import * as Localize from './Localize';
import Log from './Log';
import type {MessageElementBase, MessageTextElement} from './MessageElement';
Expand Down Expand Up @@ -1697,7 +1698,8 @@ function getPolicyChangeLogAddEmployeeMessage(reportAction: OnyxInputOrEntry<Rep
const originalMessage = getOriginalMessage(reportAction);
const email = originalMessage?.email ?? '';
const role = originalMessage?.role ?? '';
return Localize.translateLocal('report.actions.type.addEmployee', {email, role});
const formattedEmail = formatPhoneNumber(email);
return Localize.translateLocal('report.actions.type.addEmployee', {email: formattedEmail, role});
}

function isPolicyChangeLogChangeRoleMessage(reportAction: OnyxInputOrEntry<ReportAction>): reportAction is ReportAction<typeof CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_EMPLOYEE> {
Expand Down
8 changes: 4 additions & 4 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2160,7 +2160,7 @@ function getDisplayNameForParticipant(

// If the user's personal details (first name) should be hidden, make sure we return "hidden" instead of the short name
if (shouldFallbackToHidden && longName === hiddenTranslation) {
return longName;
return LocalePhoneNumber.formatPhoneNumber(longName);
}

const shortName = personalDetails.firstName ? personalDetails.firstName : longName;
Expand Down Expand Up @@ -2348,7 +2348,7 @@ function getIcons(
const actorIcon = {
id: actorAccountID,
source: personalDetails?.[actorAccountID ?? -1]?.avatar ?? FallbackAvatar,
name: actorDisplayName,
name: LocalePhoneNumber.formatPhoneNumber(actorDisplayName),
type: CONST.ICON_TYPE_AVATAR,
fallbackIcon: personalDetails?.[parentReportAction?.actorAccountID ?? -1]?.fallbackIcon,
};
Expand Down Expand Up @@ -3810,7 +3810,7 @@ function getInvoicePayerName(report: OnyxEntry<Report>, invoiceReceiverPolicy?:
const isIndividual = invoiceReceiver?.type === CONST.REPORT.INVOICE_RECEIVER_TYPE.INDIVIDUAL;

if (isIndividual) {
return PersonalDetailsUtils.getDisplayNameOrDefault(allPersonalDetails?.[invoiceReceiver.accountID]);
return LocalePhoneNumber.formatPhoneNumber(PersonalDetailsUtils.getDisplayNameOrDefault(allPersonalDetails?.[invoiceReceiver.accountID]));
}

return getPolicyName(report, false, invoiceReceiverPolicy ?? allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${invoiceReceiver?.policyID}`]);
Expand Down Expand Up @@ -3902,7 +3902,7 @@ function getInvoicesChatName(report: OnyxEntry<Report>, receiverPolicy: OnyxEntr
}

if (isIndividual) {
return PersonalDetailsUtils.getDisplayNameOrDefault(allPersonalDetails?.[invoiceReceiverAccountID]);
return LocalePhoneNumber.formatPhoneNumber(PersonalDetailsUtils.getDisplayNameOrDefault(allPersonalDetails?.[invoiceReceiverAccountID]));
}

return getPolicyName(report, false, invoiceReceiverPolicy);
Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ function getAssignee(assigneeAccountID: number, personalDetails: OnyxEntry<OnyxT

return {
icons: ReportUtils.getIconsForParticipants([details.accountID], personalDetails),
displayName: PersonalDetailsUtils.getDisplayNameOrDefault(details),
displayName: LocalePhoneNumber.formatPhoneNumber(PersonalDetailsUtils.getDisplayNameOrDefault(details)),
subtitle: details.login ?? '',
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function ProfilePage({route}: ProfilePageProps) {
return {accountID: optimisticAccountID, login: loginParams, displayName: loginParams};
}, [personalDetails, accountID, loginParams, isValidAccountID]);

const displayName = PersonalDetailsUtils.getDisplayNameOrDefault(details, undefined, undefined, isCurrentUser);
const displayName = formatPhoneNumber(PersonalDetailsUtils.getDisplayNameOrDefault(details, undefined, undefined, isCurrentUser));
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const fallbackIcon = details?.fallbackIcon ?? '';
const login = details?.login ?? '';
Expand Down
29 changes: 8 additions & 21 deletions src/pages/ReportParticipantDetailsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, {useCallback} from 'react';
import {View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import {useOnyx} from 'react-native-onyx';
import Avatar from '@components/Avatar';
import Button from '@components/Button';
import ConfirmModal from '@components/ConfirmModal';
Expand All @@ -26,24 +25,18 @@ import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type SCREENS from '@src/SCREENS';
import type {PersonalDetails, PersonalDetailsList} from '@src/types/onyx';
import type {PersonalDetails} from '@src/types/onyx';
import NotFoundPage from './ErrorPage/NotFoundPage';
import withReportOrNotFound from './home/report/withReportOrNotFound';
import type {WithReportOrNotFoundProps} from './home/report/withReportOrNotFound';

type ReportParticipantDetailsOnyxProps = {
/** Personal details of all users */
personalDetails: OnyxEntry<PersonalDetailsList>;
};
type ReportParticipantDetailsPageProps = WithReportOrNotFoundProps & PlatformStackScreenProps<ParticipantsNavigatorParamList, typeof SCREENS.REPORT_PARTICIPANTS.DETAILS>;

type ReportParticipantDetailsPageProps = WithReportOrNotFoundProps &
PlatformStackScreenProps<ParticipantsNavigatorParamList, typeof SCREENS.REPORT_PARTICIPANTS.DETAILS> &
ReportParticipantDetailsOnyxProps;

function ReportParticipantDetails({personalDetails, report, route}: ReportParticipantDetailsPageProps) {
function ReportParticipantDetails({report, route}: ReportParticipantDetailsPageProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
const {formatPhoneNumber, translate} = useLocalize();
const StyleUtils = useStyleUtils();
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST);
const currentUserPersonalDetails = useCurrentUserPersonalDetails();

const [isRemoveMemberConfirmModalVisible, setIsRemoveMemberConfirmModalVisible] = React.useState(false);
Expand All @@ -54,7 +47,7 @@ function ReportParticipantDetails({personalDetails, report, route}: ReportPartic
const member = report?.participants?.[accountID];
const details = personalDetails?.[accountID] ?? ({} as PersonalDetails);
const fallbackIcon = details.fallbackIcon ?? '';
const displayName = PersonalDetailsUtils.getDisplayNameOrDefault(details);
const displayName = formatPhoneNumber(PersonalDetailsUtils.getDisplayNameOrDefault(details));
const isCurrentUserAdmin = ReportUtils.isGroupChatAdmin(report, currentUserPersonalDetails?.accountID);
const isSelectedMemberCurrentUser = accountID === currentUserPersonalDetails?.accountID;
const removeUser = useCallback(() => {
Expand Down Expand Up @@ -149,10 +142,4 @@ function ReportParticipantDetails({personalDetails, report, route}: ReportPartic

ReportParticipantDetails.displayName = 'ReportParticipantDetails';

export default withReportOrNotFound()(
withOnyx<ReportParticipantDetailsPageProps, ReportParticipantDetailsOnyxProps>({
personalDetails: {
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
},
})(ReportParticipantDetails),
);
export default withReportOrNotFound()(ReportParticipantDetails);
2 changes: 1 addition & 1 deletion src/pages/ReportParticipantsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ function ReportParticipantsPage({report, route}: ReportParticipantsPageProps) {
onCancel={() => setRemoveMembersConfirmModalVisible(false)}
prompt={translate('workspace.people.removeMembersPrompt', {
count: selectedMembers.length,
memberName: PersonalDetailsUtils.getPersonalDetailsByIDs(selectedMembers, currentUserAccountID).at(0)?.displayName ?? '',
memberName: formatPhoneNumber(PersonalDetailsUtils.getPersonalDetailsByIDs(selectedMembers, currentUserAccountID).at(0)?.displayName ?? ''),
})}
confirmText={translate('common.remove')}
cancelText={translate('common.cancel')}
Expand Down
5 changes: 3 additions & 2 deletions src/pages/RoomMemberDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import useThemeStyles from '@hooks/useThemeStyles';
import * as Report from '@libs/actions/Report';
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
import type {RoomMembersNavigatorParamList} from '@libs/Navigation/types';
import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils';
import * as PolicyUtils from '@libs/PolicyUtils';
import * as ReportUtils from '@libs/ReportUtils';
import Navigation from '@navigation/Navigation';
Expand All @@ -33,7 +34,7 @@ type RoomMemberDetailsPagePageProps = WithReportOrNotFoundProps & PlatformStackS

function RoomMemberDetailsPage({report, route}: RoomMemberDetailsPagePageProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
const {formatPhoneNumber, translate} = useLocalize();
const StyleUtils = useStyleUtils();
const currentUserPersonalDetails = useCurrentUserPersonalDetails();
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST);
Expand All @@ -47,7 +48,7 @@ function RoomMemberDetailsPage({report, route}: RoomMemberDetailsPagePageProps)
const member = report?.participants?.[accountID];
const details = personalDetails?.[accountID] ?? ({} as PersonalDetails);
const fallbackIcon = details.fallbackIcon ?? '';
const displayName = details.displayName ?? '';
const displayName = formatPhoneNumber(PersonalDetailsUtils.getDisplayNameOrDefault(details));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, this is not needed here. We are already using formatPhoneNumber for displayName. Please let me know if there is any case where we explicitly need to apply formatPhoneNumber to the room member's display name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jayeshmangwani i'll check that

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kalydosos Please keep the discussion either here or on Slack.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, got it, i was trying not to pollute the PR with questions about your question, got it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, no problem! Keeping discussion in one place makes things faster, so 😃 .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will do a new merge with main

Copy link
Contributor Author

@Kalydosos Kalydosos Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jayeshmangwani i did a test again after the new merge and it's the same result as in the video above

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kalydosos For me, it’s working fine both with and without using the formatPhoneNumber. I’m not sure why we’re getting different results.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kalydosos Please leave the RoomMemberDetailsPage.tsx page as it is with the changes you’ve made; we’ll figure this out later. However, can you please check the other comments? I feel we shouldn’t make changes in a few places that I’ve highlighted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jayeshmangwani I made a test again for this one and i still have the same result., any change on your side for this ?

const isSelectedMemberCurrentUser = accountID === currentUserPersonalDetails?.accountID;
const isSelectedMemberOwner = accountID === report.ownerAccountID;
const shouldDisableRemoveUser = (ReportUtils.isPolicyExpenseChat(report) && PolicyUtils.isUserPolicyAdmin(policy, details.login)) || isSelectedMemberCurrentUser || isSelectedMemberOwner;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/RoomMembersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ function RoomMembersPage({report, policies}: RoomMembersPageProps) {
onCancel={() => setRemoveMembersConfirmModalVisible(false)}
prompt={translate('roomMembersPage.removeMembersPrompt', {
count: selectedMembers.length,
memberName: PersonalDetailsUtils.getPersonalDetailsByIDs(selectedMembers, currentUserAccountID).at(0)?.displayName ?? '',
memberName: formatPhoneNumber(PersonalDetailsUtils.getPersonalDetailsByIDs(selectedMembers, currentUserAccountID).at(0)?.displayName ?? ''),
})}
confirmText={translate('common.remove')}
cancelText={translate('common.cancel')}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/home/report/ReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import ControlSelection from '@libs/ControlSelection';
import * as DeviceCapabilities from '@libs/DeviceCapabilities';
import * as ErrorUtils from '@libs/ErrorUtils';
import focusComposerWithDelay from '@libs/focusComposerWithDelay';
import * as LocalePhoneNumber from '@libs/LocalePhoneNumber';
import ModifiedExpenseMessage from '@libs/ModifiedExpenseMessage';
import Navigation from '@libs/Navigation/Navigation';
import Permissions from '@libs/Permissions';
Expand Down Expand Up @@ -603,7 +604,7 @@ function ReportActionItem({
);
} else if (ReportActionsUtils.isReimbursementQueuedAction(action)) {
const linkedReport = ReportUtils.isChatThread(report) ? parentReport : report;
const submitterDisplayName = PersonalDetailsUtils.getDisplayNameOrDefault(personalDetails?.[linkedReport?.ownerAccountID ?? -1]);
const submitterDisplayName = LocalePhoneNumber.formatPhoneNumber(PersonalDetailsUtils.getDisplayNameOrDefault(personalDetails?.[linkedReport?.ownerAccountID ?? -1]));
const paymentType = ReportActionsUtils.getOriginalMessage(action)?.paymentType ?? '';

const missingPaymentMethod = ReportUtils.getIndicatedMissingPaymentMethod(userWallet, linkedReport?.reportID ?? '-1', action);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) {
setIsValidateCodeActionModalVisible(false);
}}
sendValidateCode={() => User.requestContactMethodValidateCode(contactMethod)}
descriptionPrimary={translate('contacts.enterMagicCode', {contactMethod})}
descriptionPrimary={translate('contacts.enterMagicCode', {contactMethod: formattedContactMethod})}
/>

{!isValidateCodeActionModalVisible && getMenuItems()}
Expand Down
Loading
Loading