Replace getPersonalDetailByEmail with usePersonalDetailByLogin for expensify and company cards - #99427
Conversation
…sue new expensify cards page
…mpany card custom name
|
@shubham1206agra Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7da16af4dd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@bernhardoj Fix ESLint please |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-08-26.at.3.26.16.PM.mov |
| const employeePersonalDetails = usePersonalDetailsByLogins(Object.keys(policy?.employeeList ?? {})); | ||
| const currentAssigneeFirstName = usePersonalDetailByLogin(issueNewCard?.data?.assigneeEmail, (personalDetail) => { | ||
| // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
| return Str.removeSMSDomain(personalDetail?.firstName || issueNewCard?.data?.assigneeEmail || ''); |
There was a problem hiding this comment.
@bernhardoj Please use formatPhoneNumber instead of Str.removeSMSDomain here.
| const data = issueNewCard?.data; | ||
| const userName = usePersonalDetailByLogin(data?.assigneeEmail, (personalDetail) => { | ||
| // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
| return Str.removeSMSDomain(personalDetail?.firstName || data?.assigneeEmail || ''); |
There was a problem hiding this comment.
@bernhardoj Please use formatPhoneNumber instead of Str.removeSMSDomain here.
| const data = issueNewCard?.data; | ||
| const cardholder = usePersonalDetailByLogin(data?.assigneeEmail, (personalDetail) => { | ||
| // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
| return Str.removeSMSDomain(personalDetail?.displayName || data?.assigneeEmail || ''); |
There was a problem hiding this comment.
@bernhardoj Please use formatPhoneNumber instead of Str.removeSMSDomain here.
Explanation of Change
Fixed Issues
$ #66391
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Prerequisite: have a workspace with an Expensify card
{display name or email}'s cardCompany card
Prerequisite: have a workspace with 1 member only and an unassigned company card
{first name or email}'s cardPR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mp4
web.cc.mp4