Skip to content

Commit 0eec40f

Browse files
authored
Merge pull request #78882 from nyomanjyotisa/issue-78762
Fix: Authorized payer is displayed as phone [email protected]
2 parents 3f086a1 + aa27aa9 commit 0eec40f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import {getLatestErrorField} from '@libs/ErrorUtils';
3838
import Navigation from '@libs/Navigation/Navigation';
3939
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
4040
import {getPaymentMethodDescription} from '@libs/PaymentUtils';
41-
import {getPersonalDetailByEmail} from '@libs/PersonalDetailsUtils';
41+
import {getDisplayNameOrDefault, getPersonalDetailByEmail} from '@libs/PersonalDetailsUtils';
4242
import {
4343
getCorrectedAutoReportingFrequency,
4444
hasDynamicExternalWorkflow,
@@ -103,7 +103,7 @@ function WorkspaceWorkflowsPage({policy, route}: WorkspaceWorkflowsPageProps) {
103103
const isAdvanceApproval = (approvalWorkflows.length > 1 || (approvalWorkflows?.at(0)?.approvers ?? []).length > 1) && isControlPolicy(policy);
104104
const updateApprovalMode = isAdvanceApproval ? CONST.POLICY.APPROVAL_MODE.ADVANCED : CONST.POLICY.APPROVAL_MODE.BASIC;
105105
const displayNameForAuthorizedPayer = useMemo(
106-
() => getPersonalDetailByEmail(policy?.achAccount?.reimburser ?? '')?.displayName ?? policy?.achAccount?.reimburser,
106+
() => getDisplayNameOrDefault(getPersonalDetailByEmail(policy?.achAccount?.reimburser ?? ''), policy?.achAccount?.reimburser),
107107
[policy?.achAccount?.reimburser],
108108
);
109109

0 commit comments

Comments
 (0)