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 member option appear in transaction thread report detail page #42036

Merged
merged 7 commits into from
May 28, 2024
Merged
Changes from all commits
Commits
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
9 changes: 6 additions & 3 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3596,8 +3596,8 @@ function buildOptimisticIOUReport(payeeAccountID: number, payerAccountID: number
const payerEmail = 'login' in personalDetails ? personalDetails.login : '';

const participants: Participants = {
[payeeAccountID]: {hidden: false},
[payerAccountID]: {hidden: false},
[payeeAccountID]: {hidden: true},
[payerAccountID]: {hidden: true},
Copy link
Contributor

Choose a reason for hiding this comment

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

I initially thought here we should also set hidden value based on some flag as buildOptimisticIOUReport called from multiple flows but seems not needed and this works fine.

};

return {
Expand Down Expand Up @@ -4310,10 +4310,11 @@ function buildOptimisticChatReport(
description = '',
avatarUrl = '',
optimisticReportID = '',
shouldShowParticipants = true,
): OptimisticChatReport {
const participants = participantList.reduce((reportParticipants: Participants, accountID: number) => {
const participant: ReportParticipant = {
hidden: false,
hidden: !shouldShowParticipants,
role: accountID === currentUserAccountID ? CONST.REPORT.ROLE.ADMIN : CONST.REPORT.ROLE.MEMBER,
};
// eslint-disable-next-line no-param-reassign
Expand Down Expand Up @@ -4862,6 +4863,8 @@ function buildTransactionThread(
moneyRequestReport?.reportID,
'',
'',
'',
false,
);
}

Expand Down
Loading