@@ -216,13 +216,22 @@ function IOURequestStepConfirmation({
216
216
Navigation . goBack ( ROUTES . MONEY_REQUEST_STEP_SUBRATE . getRoute ( action , iouType , transactionID , reportID ) ) ;
217
217
return ;
218
218
}
219
- // If there is not a report attached to the IOU with a reportID, then the participants were manually selected and the user needs taken
220
- // back to the participants step
221
- if ( ( ! transaction ?. participantsAutoAssigned && participantsAutoAssignedFromRoute !== 'true' ) || transaction ?. isFromGlobalCreate ) {
222
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
223
- Navigation . goBack ( ROUTES . MONEY_REQUEST_STEP_PARTICIPANTS . getRoute ( iouType , transactionID , transaction ?. reportID || reportID , undefined , action ) , { compareParams : false } ) ;
219
+
220
+ if ( transaction ?. isFromGlobalCreate ) {
221
+ // If the participants weren't automatically added to the transaction, then we should go back to the IOURequestStepParticipants.
222
+ if ( ! transaction ?. participantsAutoAssigned && participantsAutoAssignedFromRoute !== 'true' ) {
223
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
224
+ Navigation . goBack ( ROUTES . MONEY_REQUEST_STEP_PARTICIPANTS . getRoute ( iouType , transactionID , transaction ?. reportID || reportID , undefined , action ) , { compareParams : false } ) ;
225
+ return ;
226
+ }
227
+
228
+ // If the participant was auto-assigned, we need to keep the reportID that is already on the stack.
229
+ // This will allow the user to edit the participant field after going back and forward.
230
+ Navigation . goBack ( ) ;
224
231
return ;
225
232
}
233
+
234
+ // This has selected the participants from the beginning and the participant field shouldn't be editable.
226
235
navigateToStartMoneyRequestStep ( requestType , iouType , transactionID , reportID , action ) ;
227
236
} , [
228
237
action ,
0 commit comments