From 67a489fcaa034083d877ebd7005fc3bd0f57c406 Mon Sep 17 00:00:00 2001 From: Yauheni Pasiukevich Date: Thu, 9 Oct 2025 16:16:17 +0200 Subject: [PATCH] fix: self-dm not present during expense creation --- .../MoneyRequestParticipantsSelector.tsx | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx index a69c354ea112..a14a169ea170 100644 --- a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx +++ b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx @@ -296,16 +296,11 @@ function MoneyRequestParticipantsSelector({ shouldShow: (chatOptions.workspaceChats ?? []).length > 0, }); - if (!isWorkspacesOnly && chatOptions.userToInvite) { - newSections.push({ - title: undefined, - data: [chatOptions.userToInvite].map((participant) => { - const isPolicyExpenseChat = participant?.isPolicyExpenseChat ?? false; - return isPolicyExpenseChat ? getPolicyExpenseReportOption(participant, reportAttributesDerived) : getParticipantsOption(participant, personalDetails); - }), - shouldShow: true, - }); - } + newSections.push({ + title: translate('workspace.invoices.paymentMethods.personal'), + data: chatOptions.selfDMChat ? [chatOptions.selfDMChat] : [], + shouldShow: !!chatOptions.selfDMChat, + }); if (!isWorkspacesOnly) { newSections.push({ @@ -332,9 +327,12 @@ function MoneyRequestParticipantsSelector({ !isPerDiemRequest ) { newSections.push({ - title: translate('workspace.invoices.paymentMethods.personal'), - data: chatOptions.selfDMChat ? [chatOptions.selfDMChat] : [], - shouldShow: !!chatOptions.selfDMChat, + title: undefined, + data: [chatOptions.userToInvite].map((participant) => { + const isPolicyExpenseChat = participant?.isPolicyExpenseChat ?? false; + return isPolicyExpenseChat ? getPolicyExpenseReportOption(participant, reportAttributesDerived) : getParticipantsOption(participant, personalDetails); + }), + shouldShow: true, }); }