#3222 - Provide Ministry the ability to edit basic BCeID Profile Info
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.
GivenNameis 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
- Edit Profile Modal
- Validations for the Edit Profile Modal
- Date Validation not showing the date beyond the today's date for the date of birth
- Empty Given Names does not throw any validation error.
Snackbarshowing the update after the successful update
Snackbarshowing the error message if an error happens for any reason during the student profile update
- Added Notes in the General section
- Processing loader while the information is being updated
- Edit Profile button not shown for any non Basic BCeID user
if you take a merge of the main now, the test cases will pass @sh16011993
if you take a merge of the main now, the test cases will pass @sh16011993
Thanks @guru-aot
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.3% Duplication on New Code
Backend Unit Tests Coverage Report
| Totals | |
|---|---|
| Statements: | 22.6% ( 3617 / 16001 ) |
| Methods: | 10.08% ( 201 / 1995 ) |
| Lines: | 26.03% ( 3143 / 12073 ) |
| Branches: | 14.12% ( 273 / 1933 ) |
E2E Workflow Workers Coverage Report
| Totals | |
|---|---|
| Statements: | 58.64% ( 509 / 868 ) |
| Methods: | 52.88% ( 55 / 104 ) |
| Lines: | 62.27% ( 411 / 660 ) |
| Branches: | 41.35% ( 43 / 104 ) |
E2E Queue Consumers Coverage Report
| Totals | |
|---|---|
| Statements: | 83.88% ( 1046 / 1247 ) |
| Methods: | 83.59% ( 107 / 128 ) |
| Lines: | 84.91% ( 895 / 1054 ) |
| Branches: | 67.69% ( 44 / 65 ) |
E2E SIMS API Coverage Report
| Totals | |
|---|---|
| Statements: | 65.5% ( 5526 / 8437 ) |
| Methods: | 63.02% ( 680 / 1079 ) |
| Lines: | 69.64% ( 4369 / 6274 ) |
| Branches: | 44% ( 477 / 1084 ) |