Share book functionality for POD client
Context
A book owner should be able to share a book with other already existing users of the system by assigning them to the book's team as collaborators. These assigned users could have either read or write access to that book.
Proposal
A modal should be created and become available as option in the application's navigation bar when a user will be in the producer page of a book. This modal should be as presented below
The owner of the book should be able to type the email of an existing user of the system and added it as a member for that book via typing in the selection input presented in the mockup. Multiple users should be able to be added. At the end of the selection input a dropdown should appear providing two options can view, can edit
which will be translated to read/write
accordingly. Bellow, the input all the users of all the teams will be listed (relevant teams are owner
and collaborators
) and based on their status see here a dropdown should exist with a default selection of wither can view, can edit
.
Finally, via the use of the user level dropdown the owner of the book will be able to change the can view, can edit
option which will trigger an update of the status attribute of the corresponding team member
Design
Implementation (if applicable)
- check example here
- the modal should be "connected" as the page components are. Meaning is should contain
useQuery
to fetch book's teams along with each team's users e.g. here -
searchUser
mutation should be created e.g. here -
updateTeamMemberStatus
mutation should be created (for this a issue will be created which will target the server implementation needed) -
addTeamMember
mutation should be created e.g. here - the
bookId
should be aggregated from the url via the use ofuseParams
ofreact-router-dom