I would like to use a list to add / remove members from a team.
My logic flow is that first a team is created based on screen input fields (team name, etc.).
when the create team button is pushed the following happens:
- the team is created based on the inputs
- the logged in user is added as an owner
- the modal for adding team members is opened.
This is set up and working perfectly.
However I am running into problems setting up the selection of team members.
The list correctly shows a list of all users who are friends (except for logged in user =me)
I would like to use this modal as the screen where I can add / remove users.
I have tried setting this up with icons (checked / unchecked) using visbility & different actions
Initial state:
New team - no user is a team member, check box empty
If the user clicks on the check box, the box changes to checked & the user is added. If he clicks again - the user is removed.
I would also like to use this to edit team members - this use case the friend is shown with an active check (i.e. is a member of the team). If I click the box, the check mark is removed and the user is removed from the team.
I have a number of different states and have to be robust enough to handle multiple on/off clicks within the window.
Finally, upon approving the changes to team I would like the members list to be finalized & shown - and be able to send notifications.
I also want to avoid sending a notification each and every time the check box is clicked on and off.
I have tried multiple ways, also using interim status states. Main status is active or empty - plus transitional states such as pendingAdd or pendingRemove.
Can anyone help? It is a complex multiple toggle state in the list.
Any other suggestions on how to work around this?
Thanks,
Ivan