Skip to content

Commit 6d54fc5

Browse files
MelvinBotdeetergp
andcommitted
Update handleRegularReportSelection to sync participants with report
When selecting or creating a report via handleRegularReportSelection, only reportID was updated in the transaction but participants were left stale. This caused the To field on the confirmation page to show the wrong workspace. Now participants are updated alongside reportID, matching the pattern used by handleGlobalCreateReport. Co-authored-by: Scott Deeter <deetergp@users.noreply.github.com>
1 parent ff4955a commit 6d54fc5

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/pages/iou/request/step/IOURequestStepReport.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,21 @@ function IOURequestStepReport({route, transaction}: IOURequestStepReportProps) {
169169
// eslint-disable-next-line @typescript-eslint/no-deprecated
170170
InteractionManager.runAfterInteractions(() => {
171171
Navigation.setNavigationActionToMicrotaskQueue(() => {
172+
const participants = [
173+
{
174+
selected: true,
175+
accountID: 0,
176+
isPolicyExpenseChat: true,
177+
reportID: report?.chatReportID,
178+
policyID: report?.policyID,
179+
},
180+
];
181+
172182
setTransactionReport(
173183
transaction.transactionID,
174184
{
175185
reportID: item.value,
186+
participants,
176187
},
177188
!isEditing,
178189
);

0 commit comments

Comments
 (0)