Skip to content

refactor(user profile): refactor user profile and edit password in user panel - #1081

Open
alireza013013 wants to merge 5 commits into
GamaEdtech:upgrade-v4from
alireza013013:refactor/user-profile-panel
Open

refactor(user profile): refactor user profile and edit password in user panel#1081
alireza013013 wants to merge 5 commits into
GamaEdtech:upgrade-v4from
alireza013013:refactor/user-profile-panel

Conversation

@alireza013013

Copy link
Copy Markdown
Collaborator

Description

  • enhance user profile form structure and validation and use composable for get data and edit data and use gombobox for consistensy project
  • add api call change password in composalbe and add type and refactor edit pass for consistensy

Type of Change

  • Refactor
  • Bug fix
  • New feature
  • Documentation update
  • Other (please describe):

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • 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/errors
  • I have added tests that prove my fix is effective or that my feature works

…ation and use composable for get data and edit data and use gombobox for consistensy project
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

@alireza013013 is attempting to deploy a commit to the GamaEdtech Team on Vercel.

A member of the Team first needs to authorize it.

@sanaderi sanaderi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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 and countyChange's explicit userInformation.value.country = countryId fire on every change. Harmless (same value, no side effects), but the explicit assignment inside countyChange/stateChange/cityChange/boardChange is redundant — v-model already does it.
  • matches(newPassword, 'passwords') produces "Must match passwords" in edit-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 isFormValid computed (which only ever validated firstName, silently ignoring every other field) with v-model="isFormValid" on <v-form> is a real correctness improvement.
  • getUserInfo correctly populates dependent dropdown lists (states/cities/grades/schools) via the raw fetch functions rather than the xChange handlers, avoiding the "on user change" side effects (resetting downstream fields) firing during initial load.

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 this pull request may close these issues.

2 participants