Skip to content

Commit

Permalink
Merge pull request Expensify#33156 from paultsimura/fix/33151-iou-hid…
Browse files Browse the repository at this point in the history
…den-user

fix: Retain hidden participants when creating an IOU request
  • Loading branch information
Julesssss authored Dec 15, 2023
2 parents ab138ee + ca46712 commit 56e46de
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/pages/iou/request/step/IOURequestStepConfirmation.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,10 @@ function IOURequestStepConfirmation({
const headerTitle = iouType === CONST.IOU.TYPE.SPLIT ? translate('iou.split') : translate(TransactionUtils.getHeaderTitleTranslationKey(transaction));
const participants = useMemo(
() =>
_.chain(transaction.participants)
.map((participant) => {
const isPolicyExpenseChat = lodashGet(participant, 'isPolicyExpenseChat', false);
return isPolicyExpenseChat ? OptionsListUtils.getPolicyExpenseReportOption(participant) : OptionsListUtils.getParticipantsOption(participant, personalDetails);
})
.filter((participant) => !!participant.login || !!participant.text)
.value(),
_.map(transaction.participants, (participant) => {
const isPolicyExpenseChat = lodashGet(participant, 'isPolicyExpenseChat', false);
return isPolicyExpenseChat ? OptionsListUtils.getPolicyExpenseReportOption(participant) : OptionsListUtils.getParticipantsOption(participant, personalDetails);
}),
[transaction.participants, personalDetails],
);
const isPolicyExpenseChat = useMemo(() => ReportUtils.isPolicyExpenseChat(ReportUtils.getRootParentReport(report)), [report]);
Expand Down

0 comments on commit 56e46de

Please sign in to comment.