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

Surveyor view: Load My Account data #402

Closed
wants to merge 11 commits into from
Closed

Conversation

LWest001
Copy link
Contributor

@LWest001 LWest001 commented Jun 19, 2023

Loads account data for surveyor My Account page and displays it, with error handling and page loading.

To complete:

frontend/front/src/features/login/loginSlice.js Outdated Show resolved Hide resolved
frontend/front/src/pages/Admin/nav/Nav.js Show resolved Hide resolved
frontend/front/src/pages/Surveyor/account/Account.js Outdated Show resolved Hide resolved
frontend/front/src/pages/Surveyor/account/Account.js Outdated Show resolved Hide resolved
},
},
});
return updatedAccount;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should make sure this updates the user object as well, otherwise if they change their email here they won't be able to use that to log in.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meeting note: Maybe surveyor shouldn't have email at all, just user.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattdelsordo I'm not entirely sure how to update a user.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into this a bit, and it seems like this might be a bit more complicated than just doing a PATCH. I say for now, just don't let the user edit their email or password.

frontend/front/src/redux/store.js Show resolved Hide resolved
@mattdelsordo
Copy link
Contributor

Another thing that's probably out of scope for this particular thing is that we should allow surveyors to change their passwords on this screen.

*EditAccount uses controlled HeatPump[Etc.] field components.
* surveyors_controller: add email to list of allowed search params
* Account: grab account data via email address using new rtkq hook.
@mzagaja mzagaja closed this Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Surveyor View: My Account page needs to hooked up to RTK Query / backend
4 participants