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

#3313 - Content: Ministry: Accounts #4269

Merged
merged 4 commits into from
Jan 21, 2025

Conversation

lewischen-aot
Copy link
Collaborator

  • Revised "Requests accounts" to "Pending account requests"
  • Revised "Make a determination....." to "Basic BCeID account requests that require ministry review."
  • Added search input box
  • Revised "Name" to "Given name"
  • Added "Last name"
  • Added "Date of birth"
  • Organized order to align with mock up

Screenshot of the updated page
image

@lewischen-aot lewischen-aot self-assigned this Jan 21, 2025
@lewischen-aot lewischen-aot added User Story Ministry Ministry Features Content Tasks related to UIUX content SIMS-Api SIMS-Api Web portal labels Jan 21, 2025
@lewischen-aot lewischen-aot marked this pull request as ready for review January 21, 2025 00:33
Comment on lines 56 to 67
return this.repo
.createQueryBuilder("studentAccountApplication")
.select("studentAccountApplication.id", "id")
.addSelect("studentAccountApplication.submittedDate", "submittedDate")
.addSelect("user.firstName", "givenNames")
.addSelect("user.lastName", "lastName")
.addSelect("student.birthDate", "birthDate")
.innerJoin("studentAccountApplication.user", "user")
.leftJoin(Student, "student", "student.user.id = user.id")
.where("studentAccountApplication.assessedDate is NULL")
.orderBy("studentAccountApplication.submittedDate", "ASC")
.getRawMany();
Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot Jan 21, 2025

Choose a reason for hiding this comment

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

Unless there is a strong reason, the preferred way would be to use the object query. Was there a reason to switch the query format?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The reason is that we need to get birth date for a student record from the student table, and the origin query doesn't support the relation from user to student. The leftJoin(Student, ...) in this object query allows to get the birth date.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The student may not exist at this stage because it will be created after the Ministry's approval.
The birth date for this case should come from the submitted_data->>dateOfBirth.

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.

Nice work, please take a look at the comments.

fullName: getUserFullName(accountApplication.user),
submittedDate: accountApplication.submittedDate,
}));
return accountApplications;
Copy link
Collaborator

Choose a reason for hiding this comment

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

The map must happen for every DTO conversion to avoid changes at the service level to expose unwanted properties. Please add the map back.

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, please take a look at the latest comments.

Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 22.51% ( 3864 / 17164 )
Methods: 10.32% ( 224 / 2170 )
Lines: 25.92% ( 3336 / 12870 )
Branches: 14.31% ( 304 / 2124 )

Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 65.59% ( 589 / 898 )
Methods: 59.63% ( 65 / 109 )
Lines: 68.72% ( 468 / 681 )
Branches: 51.85% ( 56 / 108 )

Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 86.14% ( 1249 / 1450 )
Methods: 82.42% ( 136 / 165 )
Lines: 88.51% ( 1032 / 1166 )
Branches: 68.07% ( 81 / 119 )

Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 68.09% ( 6021 / 8843 )
Methods: 65.84% ( 742 / 1127 )
Lines: 71.91% ( 4714 / 6555 )
Branches: 48.66% ( 565 / 1161 )

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 👍

Copy link
Collaborator

@andrepestana-aot andrepestana-aot left a comment

Choose a reason for hiding this comment

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

Looks good!

@lewischen-aot lewischen-aot added this pull request to the merge queue Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content Tasks related to UIUX content Ministry Ministry Features SIMS-Api SIMS-Api User Story Web portal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants