refactor(user profile): refactor user profile and edit password in user panel - #1081
Open
alireza013013 wants to merge 5 commits into
Open
refactor(user profile): refactor user profile and edit password in user panel#1081alireza013013 wants to merge 5 commits into
alireza013013 wants to merge 5 commits into
Conversation
…ation and use composable for get data and edit data and use gombobox for consistensy project
…ype and refactor edit pass for consistensy
|
@alireza013013 is attempting to deploy a commit to the GamaEdtech Team on Vercel. A member of the Team first needs to authorize it. |
sanaderi
requested changes
Aug 2, 2026
sanaderi
left a comment
Collaborator
There was a problem hiding this comment.
Review
Solid, low-risk refactor overall. I specifically checked the board dropdown's { id: board.code, title: board.title } mapping against the real /api/v2/boards and legacy /api/v1/types/list?type=section responses since board.id and board.code are genuinely different values (e.g. Cambridge is id: 17, code: 6627) — it's correct as written, since getGrades() and the profile's saved board value both use the legacy numeric id format that board.code holds. Not a bug.
A couple of small things worth cleaning up:
Minor
- Redundant double-assignment in the cascade handlers.
v-model="userInformation.country"combined with@update:model-value="countyChange"means both Vue's own v-model assignment andcountyChange's explicituserInformation.value.country = countryIdfire on every change. Harmless (same value, no side effects), but the explicit assignment insidecountyChange/stateChange/cityChange/boardChangeis redundant — v-model already does it. matches(newPassword, 'passwords')produces "Must match passwords" inedit-pass.vue— slightly awkward grammar vs. the old message ("Passwords do not match"). Purely cosmetic, but worth a quick wording tweak.
Positive notes (not asking for changes, just calling out good work)
- Replacing the old hand-rolled
isFormValidcomputed (which only ever validatedfirstName, silently ignoring every other field) withv-model="isFormValid"on<v-form>is a real correctness improvement. getUserInfocorrectly populates dependent dropdown lists (states/cities/grades/schools) via the raw fetch functions rather than thexChangehandlers, avoiding the "on user change" side effects (resetting downstream fields) firing during initial load.
…front into refactor/user-profile-panel
…te, city, and board change handlers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Checklist