Description
Problem
Right now the texter view and the admin views are very different, and have different strengths and weaknesses. However, we can 'blend' the best of both worlds for some use-cases, like reviewing a texter's replies or doing quick things related to the contact from the texter view.
Solution
if we add a texter-sidebox which is just for admins, then we could expose some extra features that only an admin would see for that contact/texter view.
Some things to display or make controls for (not all of these would be necessary for an MVP -- but we can build up to these):
- Contact phone number (to reach out for next steps from an exciting conversation/volunteer opportunity after affirming interest)
- Other Contact metadata including things in extra_fields (maybe click to display, in case there are a lot)
- Change the assignment.max_contacts (would need a new mutation)
- Change the texter's role: (to suspend if they are doing something problematic or Vetted Texter if the review was successful)
- Resolve a tag (after this work completes; https://github.com/MoveOnOrg/Spoke/pull/1745)
- Reassign the contact
Context
I would recommend copying src/extensions/texter-sidebox/default-dynamicassignment/react-component.js into default-adminview/react-component.js -- the dynamic assignment sidebox has a sample mutation internal to it.
The avaioable() method should condition on currentUser.roles.find("ADMIN") or similar.