Skip to content

Commit

Permalink
Merge pull request #38754 from shubham1206agra/fix-confirm-step
Browse files Browse the repository at this point in the history
Fixed wrong subtitle for some reports
  • Loading branch information
Gonals authored Mar 22, 2024
2 parents 8c6bf20 + 0e8bd52 commit 0aa0ffa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4933,7 +4933,7 @@ function setMoneyRequestParticipantsFromReport(transactionID: string, report: On
const shouldAddAsReport = !isEmptyObject(chatReport) && ReportUtils.isSelfDM(chatReport);
const participants: Participant[] =
ReportUtils.isPolicyExpenseChat(chatReport) || shouldAddAsReport
? [{reportID: chatReport?.reportID, isPolicyExpenseChat: ReportUtils.isPolicyExpenseChat(chatReport), selected: true}]
? [{accountID: 0, reportID: chatReport?.reportID, isPolicyExpenseChat: ReportUtils.isPolicyExpenseChat(chatReport), selected: true}]
: (chatReport?.participantAccountIDs ?? []).filter((accountID) => currentUserAccountID !== accountID).map((accountID) => ({accountID, selected: true}));

Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {participants, participantsAutoAssigned: true});
Expand Down
4 changes: 2 additions & 2 deletions src/pages/iou/request/step/IOURequestStepConfirmation.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ function IOURequestStepConfirmation({
const participants = useMemo(
() =>
_.map(transaction.participants, (participant) => {
const participantReportID = lodashGet(participant, 'reportID', '');
return participantReportID ? OptionsListUtils.getReportOption(participant) : OptionsListUtils.getParticipantsOption(participant, personalDetails);
const participantAccountID = lodashGet(participant, 'accountID', 0);
return participantAccountID ? OptionsListUtils.getParticipantsOption(participant, personalDetails) : OptionsListUtils.getReportOption(participant);
}),
[transaction.participants, personalDetails],
);
Expand Down

0 comments on commit 0aa0ffa

Please sign in to comment.