Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Manager page - edit a user #210

Open
2 of 4 tasks
ghost opened this issue Apr 9, 2019 · 0 comments
Open
2 of 4 tasks

User Manager page - edit a user #210

ghost opened this issue Apr 9, 2019 · 0 comments
Assignees
Labels
Frontend Feature for React code New Functionality Feature that has not yet been implemented Priority 1 Get it done!

Comments

@ghost
Copy link

ghost commented Apr 9, 2019

Note: This is contingent on the base implementation being done or almost done.
The whole purpose of the user manager table is to quickly see every user in the database at a glance and update their attributes. The cleanest way for this (since mass editing likely won't be useful) is to display a modal whenever a user is clicked on with editable fields.

Work off of the branch role_manager_4.4.19

Action Items

  • Upon clicking a row, we should display a reactstrap modal. This is the same way that the Filter modal currently works, except our flag for whether or not to show the modal is whether a userSelectedForEdit exists in our state. If so, we should display the modal. I'd suggest creating a separate component like EditUserModal and pass both the this.onModalClose and userSelectedForEdit as props. When the user is null, the the modal should no longer be showing.
  • Using formik, we just need a single form in the modal with 2 input boxes (one for name and one for email) and two dropdown selectors (one for role and one for status). For the input boxes we just pre-populate the fields with the user's name and email. For the other two, we set the "selected" property to the role and the status.
    Note: Don't hardcode the role and status options for the dropdowns. We already have these in a helper file! Check out applicantInfoHelpers.js and import the "roles" and "statuses." You can set the array of dropdown options to Object.values(roles)
  • Add a "save" button to the form to submit the form. Again, implement this as we did in the filters modal, and call the onModalClose callback with the updated user from the form as a parameter. For "cancel," just call onModalClose with no param to clear out the userSelectedForEdit
  • Wait on the backend endpoint for updating user values. Ben the query wizard will have that done shortly :)
@ghost ghost added New Functionality Feature that has not yet been implemented Frontend Feature for React code Priority 1 Get it done! labels Apr 9, 2019
@ghost ghost added this to the 4 - It's crunch time! 🏃 milestone Apr 9, 2019
@ghost ghost assigned KanavKG Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Feature for React code New Functionality Feature that has not yet been implemented Priority 1 Get it done!
Projects
None yet
Development

No branches or pull requests

1 participant