Skip to content

Commit 0807a41

Browse files
authored
Merge pull request Expensify#85735 from ikevin127/ikevin127-profileTravelCard
[NoQA] fix: hide travel cards on workspace member details page
2 parents 33bd31a + a3a6907 commit 0807a41

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ function WorkspaceMemberDetailsPage({personalDetails, policy, route}: WorkspaceM
115115
openPolicyMemberProfilePage(policyID, accountID);
116116
}, [policyID, accountID]);
117117

118-
const memberCards = workspaceCards ? Object.values(workspaceCards).filter((card) => card.accountID === accountID) : [];
118+
// Filter out travel cards — they should not appear on the member profile page
119+
// as they expose card-level controls and data not intended for workspace admin view.
120+
const memberCards = workspaceCards
121+
? Object.values(workspaceCards).filter((card) => card.accountID === accountID && card.nameValuePairs?.feedCountry !== CONST.TRAVEL.PROGRAM_TRAVEL_US)
122+
: [];
119123

120124
const isApprover = isApproverUserAction(policy, memberLogin);
121125
const isTechnicalContact = policy?.technicalContact === details?.login;

0 commit comments

Comments
 (0)