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

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

Merged

Conversation

sh16011993
Copy link
Collaborator

@sh16011993 sh16011993 commented Oct 7, 2024

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 sh16011993 self-assigned this Oct 7, 2024
@sh16011993 sh16011993 added Ministry Ministry Features SIMS-Api SIMS-Api User Experience task that relates to UI UX labels Oct 7, 2024
@sh16011993 sh16011993 marked this pull request as draft October 7, 2024 17:44
@sh16011993 sh16011993 marked this pull request as ready for review October 7, 2024 19:39
@andrewsignori-aot andrewsignori-aot self-requested a review October 7, 2024 20:30
@guru-aot guru-aot self-requested a review October 7, 2024 20:52
Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a comment

Choose a reason for hiding this comment

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

Thanks for the hard work so far and for making the changes. Please take a look at the remaining comments.

Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes, looks good 👍


/**
* Updates the student info (lastname, givenNames, dob, email)
* for a basic BCeID student.
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

}
return studentProfile;
return {
...studentProfile,
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

studentId: number;
birthdate: string;
lastName: string;
givenNames: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this optional?

Copy link
Collaborator

@guru-aot guru-aot left a comment

Choose a reason for hiding this comment

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

LGTM, nice work @sh16011993

Copy link

Copy link

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 )

Copy link

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 )

Copy link

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 )

Copy link

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 )

@sh16011993 sh16011993 added this pull request to the merge queue Oct 15, 2024
Merged via the queue into main with commit 595f637 Oct 15, 2024
20 checks passed
@sh16011993 sh16011993 deleted the 3222_provide_ministry_ability_to_edit_basic_bceid_profile_info branch October 15, 2024 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ministry Ministry Features SIMS-Api SIMS-Api User Experience task that relates to UI UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants