Skip to content

Commit

Permalink
Merge pull request #33156 from paultsimura/fix/33151-iou-hidden-user
Browse files Browse the repository at this point in the history
fix: Retain hidden participants when creating an IOU request
(cherry picked from commit 56e46de)
  • Loading branch information
Julesssss authored and OSBotify committed Dec 15, 2023
1 parent a27a224 commit 6581b19
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 6581b19

Please sign in to comment.