Create invite screen
In the EditGroup form, there's an invite button that currently does nothing. It needs to be set up as follows:
- A group has two arrays:
members
andinvites
- The user needs to be presented with an autocomplete in which they can enter a name.
- The autocomplete behaves like this:
- It scans an array called
contacts
on the current user in which there are user objects withname
andid
props for the name the user entered. The user can click on a name and on selection the button next to the autocomplete says:Add to group
- On click the user is immediately added to themembers
array of the group. - If no user is selected in the autocomplete, the button next to it says
Create invite
and on click, an invite is created withname
,id
andtoken
props (the token can be anything).
- It scans an array called
The group shows the two arrays as lists with controls to remove an entry (user or invite).