SIMS icon indicating copy to clipboard operation
SIMS copied to clipboard

#3222 - Provide Ministry the ability to edit basic BCeID Profile Info

Open sh16011993 opened this issue 1 year ago • 7 comments

As a part of this PR, the following were completed:

Business Requirements Completed:

  • Enabled ministry user the ability to edit the profile details of a Basic BCeID student's account (Given Names, Last name, DOB, and email).
  • Added a General Note for this profile information update.
  • Treated the update like a personal information change from BCSC logins and did a new SIN verification for any DOB, Given name, or Last name (ensuring that the match of the information is not case-sensitive).
  • Replicated the role for account approval of Basic BCeID and created a new one for this scenario.
  • Updated the roles spreadsheet.

Technical Requirements Completed:

  • Created an edit button and a model that opens on clicking the edit button to allows for the update of the 4 fields (Given Names, Last name, DOB, and Email). All fields except GivenNames are mandatory.
  • Added a General Note for the same.
  • Applied the same validations from the student profile for the validations of the user fields in the modal. GivenName is empty and therefore, will not throw any validation error and can be persisted as an empty field.
  • To achieve the above, created a new endpoint PATCH aest/student/:studentId. Performed the validation if the student is a BCeID student and also validated the user fields and added the same role (student-edit-profile) to this endpoint.

Note: I tried using the v-date-input for the Date component in the modal but it is a lab component and I ran into issues with using this component. Issues, for instance, clearable not clearing the field etc. Therefore, I have used the regular v-text-field with the type=date.

e2e tests will be part of the next PR.

Screenshots

  • Edit Profile button for the Basic BCeID student
image
  • Edit Profile Modal
image
  • Validations for the Edit Profile Modal
image
  • Date Validation not showing the date beyond the today's date for the date of birth
image
  • Empty Given Names does not throw any validation error.
image
  • Snackbar showing the update after the successful update
image
  • Snackbar showing the error message if an error happens for any reason during the student profile update
image
  • Added Notes in the General section
image
  • Processing loader while the information is being updated
image
  • Edit Profile button not shown for any non Basic BCeID user
image

sh16011993 avatar Oct 07 '24 17:10 sh16011993

if you take a merge of the main now, the test cases will pass @sh16011993

guru-aot avatar Oct 10 '24 18:10 guru-aot

if you take a merge of the main now, the test cases will pass @sh16011993

Thanks @guru-aot

sh16011993 avatar Oct 10 '24 21:10 sh16011993

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 22.6% ( 3617 / 16001 )
Methods: 10.08% ( 201 / 1995 )
Lines: 26.03% ( 3143 / 12073 )
Branches: 14.12% ( 273 / 1933 )

github-actions[bot] avatar Oct 15 '24 21:10 github-actions[bot]

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 58.64% ( 509 / 868 )
Methods: 52.88% ( 55 / 104 )
Lines: 62.27% ( 411 / 660 )
Branches: 41.35% ( 43 / 104 )

github-actions[bot] avatar Oct 15 '24 21:10 github-actions[bot]

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 83.88% ( 1046 / 1247 )
Methods: 83.59% ( 107 / 128 )
Lines: 84.91% ( 895 / 1054 )
Branches: 67.69% ( 44 / 65 )

github-actions[bot] avatar Oct 15 '24 22:10 github-actions[bot]

E2E SIMS API Coverage Report

Totals Coverage
Statements: 65.5% ( 5526 / 8437 )
Methods: 63.02% ( 680 / 1079 )
Lines: 69.64% ( 4369 / 6274 )
Branches: 44% ( 477 / 1084 )

github-actions[bot] avatar Oct 15 '24 22:10 github-actions[bot]