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

[feat]: View and Update User Settings #2

Open
wilsonplau opened this issue May 30, 2021 · 0 comments · Fixed by #22
Open

[feat]: View and Update User Settings #2

wilsonplau opened this issue May 30, 2021 · 0 comments · Fixed by #22
Assignees

Comments

@wilsonplau
Copy link
Contributor

wilsonplau commented May 30, 2021

Story

Users should be able to view their current settings on the /settings page. When they press the edit buttons, they should be presented with a form that lets them update these settings. Once they submit the update, these changes should be saved on the database on the page should update to reflect their updated settings.

Assume timeZone, difficulty and languages can be null. We also need to add a Language enum.

Server Side

  • Update the current UserRepository functions to return all of the data necessary
    • Currently, we don't have information like languages or difficulty.
  • Implement the POST /users endpoint.
    • This may require creating a new UserRepository and UserController
    • The POST /users endpoint should be authenticated and get the user's identity using req.user
    • You may want to implement a function like UserRepository.updateUserById(id: string, update: Partial<User>) that only allows for a partial update of the user. They should not be able to update their email or id, but should be able to update things like coding languages, time zone, coding question difficulty, etc.

Client Side

  • Create an authentication restricted-page on the client at /settings; redirect to index if they're not authenticated.
  • On this page, they should be able to view their current settings.
  • When the edit button is clicked, it should change into a form - maybe with a MultiSelect component that lets them choose more than one option where it's applicable, and a SingleSelect component where they can only choose one option.
  • Design: https://www.figma.com/file/oNWss4AVW2GWsk9K9MEfLa/mcitmocks?node-id=105%3A496
@joshmhanson joshmhanson linked a pull request Jul 4, 2021 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants