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 profile #514

Merged
merged 20 commits into from
Jun 13, 2023
Merged

User profile #514

merged 20 commits into from
Jun 13, 2023

Conversation

dpgraham4401
Copy link
Member

@dpgraham4401 dpgraham4401 commented Jun 13, 2023

Description

This is a large PR.

This PR adds a new feature that allows users to view and update their user profile. It implements the following

  1. a HaztrakUserSerializer which serializer the user information such as username, firstName, lastName and email.
  2. HaztrakUserView which uses a DRF generic view for retrieving and udpating (GET and PUT) and a new corresponding endpoint
  3. An updated UserProfile feature (which now actually shows something other than the username). The UserProfile component has a toggle button (like the RcraProfile component) for editing, and makes a PUT request to the haztrak server upon save. The data is validating using a schema resolver from the zod library.
  4. Test for the UserProfile component.
  5. Adds the HaztrakUser interface to the user slice redux store.
  6. a new selectUserState redux selector for encapsulation

Lastly,

This PR moves the RcraProfile to the core app as it more directly relates to the user model which the core app maintains

Issue ticket number and link

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@dpgraham4401 dpgraham4401 added the enhancement New feature or enhancement label Jun 13, 2023
@github-actions github-actions bot added client Related to front end workings (React/Redux) database changes that require modification to the database schema server Related to backend workings (Django/Rest API) test Unit tests are, or need to be, included labels Jun 13, 2023
@dpgraham4401 dpgraham4401 merged commit 3898050 into USEPA:main Jun 13, 2023
@dpgraham4401 dpgraham4401 deleted the user_serialzier branch June 13, 2023 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Related to front end workings (React/Redux) database changes that require modification to the database schema enhancement New feature or enhancement server Related to backend workings (Django/Rest API) test Unit tests are, or need to be, included
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant