[Chat] [IOU] Create IOU Participant selection step
If you haven’t already, check out our contributing guidelines for onboarding!
This issue builds on top of the existing IOU Modal, which was implemented in this PR. The IOUParticipant step component has already been created (original PR) and functions as a controlled component (IOUModal manages its state).
The page allows users to select a single participant to request money from, or a group of users to split a bill with. To open the Modal, you can navigate to localhost:8080/#/iou/request AND localhost:8080/#/iou/split.
Upwork job posting - https://www.upwork.com/jobs/~019cecae028c47f8d1
Mobile
Select single participant

Select multiple participants

Deliverables:
- Use the existing ROUTES.IOU_BILL_SPLIT & ROUTES.IOU_REQUEST_MONEY routes logic to distinguish between the Bill split (select multiple participants) and Request money (select single participant) flows.
- The step title should be set within IOUModal. Again using the route logic to determine the current flow.
- The search and list Components should work in the same way that it does for the current 'New Group' and 'New Chat' modals.
- For the bill split flow, we should display a user list similar to the new group modal created here (issue / PR. The next button should display when at least one user has been selected. The existing onStepComplete prop function should be invoked when the button is pressed, passing back an array of user emails to IOUModal -- which should be persisted in state.
- For the request money flow, we should display a user list similar to the new chat modal created here ([issue](Expensify/Expensify.cash#1337 PR)
- When a single participant has been selected, the existing onStepComplete prop function , passing back an array containing the single selected user email to IOUModal -- which should be persisted in state. When the onStepComplete callback is invoked, then IOUModal should navigate to the next step.
Hey, I would love to work on this PR!
I have sent the Upwork proposal by my name: Barun Pandey.
Proposal
-
Use the
hasMultipleParticipantsand render eitherBillSplit(on true) orRequestMoney(on false) flow accordingly. -
Use the
hasMultipleParticipantsbool to determine the step title as well. -
Persist participants state in
IOUModal -
Use
OptionsSelectorand the logic same as in theNewGroupPage (for toggling option), and only show the Next button when one of the options is selected. Use the same search logic as well. -
Use a similar logic to the
NewChatPage to implement theRequestMoneylogic. Use the same search logic as well. -
Send user Emails back to
IOUModalfromBillSplitorRequestMoneywhen theonStepCompleteprop function is invoked.onStepCompletewill use participants state to do so.
Hey @barun1997, thanks again for the proposal!
I've assigned the issue to you. Please feel free to reach out if you have any questions or concerns regarding the specification.
Hey @Julesssss , thanks for the assignment! I will get onto it first thing tomorrow. I will reach out to you if anything comes up.
Hey, @Julesssss, so I have completed the logical implementation of our issue. This is how I have structured the solution. If you are fine with this or want to move this conversation over to the PR side, I can open it with all the necessary tests and follow all the guidelines.


Hey @barun1997! Yes, can you move this to a PR please, so the team can review the code and tests there. Thanks! 👍
Agreed, @Julesssss and myself can help you with these type of questions in a PR @barun1997 as it will be easier for us to see all your code and pull it down to test ourselves. Let us know if you have any issues getting the PR up.
Thank you for your replies - @trjExpensify, @AndrewGable! I will move it to a PR!
Related PR: https://github.com/Expensify/Expensify.cash/pull/1738
Some additional changes are being worked on by the contributor, they said they would work on this first thing tomorrow 🤞