-
Notifications
You must be signed in to change notification settings - Fork 13
#4818 - Parent Declare - Supporting User Portal Update - Part 1 #4872
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for Parent searches alongside Partner searches by introducing a full-name field, updating DTOs, and refactoring backend logic into a unified service method.
- Added “Parent’s full name” input in the UI and adjusted validation/labels
- Extended DTOs with optional
parentFullNameand madestudentsDateOfBirthoptional - Refactored backend controllers to use a new
getSupportingUserForApplicationmethod and removed the old one
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sources/packages/web/src/views/supporting-user/SupportingInformation.vue | UI: added Parent full name field, updated labels and form logic |
| sources/packages/web/src/services/http/dto/SupportingUser.dto.ts | Added parentFullName? and made studentsDateOfBirth? optional |
| sources/packages/backend/apps/api/src/services/supporting-user/supporting-user.service.ts | New getSupportingUserForApplication method, unified filtering |
| sources/packages/backend/apps/api/src/services/application/application.service.ts | Removed deprecated getApplicationForSupportingUser |
| sources/packages/backend/apps/api/src/route-controllers/supporting-user/...supporting-users.controller.ts | Updated controllers to call the new service method |
| sources/packages/backend/apps/api/src/route-controllers/supporting-user/models/supporting-user.dto.ts | Added optional fields to the API input DTO, adjusted validation |
Comments suppressed due to low confidence (4)
sources/packages/web/src/views/supporting-user/SupportingInformation.vue:24
- The label passed to
checkOnlyDigitsRulestill reads 'Number' while the null/empty rule uses 'Application number'. Update this to 'Application number' for consistency.
(v) => checkOnlyDigitsRule(v, 'Number'),
sources/packages/backend/apps/api/src/route-controllers/supporting-user/models/supporting-user.dto.ts:39
- The
studentsDateOfBirthfield is optional but has no format validation. Consider adding a decorator like@IsISO8601()or@IsDateString()to enforce a valid date format.
studentsDateOfBirth?: string;
sources/packages/backend/apps/api/src/services/supporting-user/supporting-user.service.ts:277
- The new
getSupportingUserForApplicationmethod implements critical filtering logic for both Parent and Partner flows but lacks unit tests. Add tests covering both branches (withparentFullNameand withstudentsDateOfBirth).
async getSupportingUserForApplication(
sources/packages/web/src/views/supporting-user/SupportingInformation.vue:361
- The
supportingUserTypeprop is used in the template (v-if="supportingUserType === ...") but isn't exposed in thereturnofsetup. AddsupportingUserType: props.supportingUserTypeto the returned object.
};
...ackages/backend/apps/api/src/route-controllers/supporting-user/models/supporting-user.dto.ts
Outdated
Show resolved
Hide resolved
...ackages/backend/apps/api/src/route-controllers/supporting-user/models/supporting-user.dto.ts
Outdated
Show resolved
Hide resolved
...ackages/backend/apps/api/src/route-controllers/supporting-user/models/supporting-user.dto.ts
Outdated
Show resolved
Hide resolved
...ackages/backend/apps/api/src/route-controllers/supporting-user/models/supporting-user.dto.ts
Outdated
Show resolved
Hide resolved
...pps/api/src/route-controllers/supporting-user/supporting-user.supporting-users.controller.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/apps/api/src/services/supporting-user/supporting-user.service.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/apps/api/src/services/supporting-user/supporting-user.service.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/apps/api/src/services/supporting-user/supporting-user.service.ts
Outdated
Show resolved
Hide resolved
...pps/api/src/route-controllers/supporting-user/supporting-user.supporting-users.controller.ts
Show resolved
Hide resolved
sources/packages/web/src/views/supporting-user/SupportingInformation.vue
Outdated
Show resolved
Hide resolved
sources/packages/web/src/views/supporting-user/SupportingInformation.vue
Show resolved
Hide resolved
sources/packages/web/src/views/supporting-user/SupportingInformation.vue
Outdated
Show resolved
Hide resolved
sources/packages/web/src/views/supporting-user/SupportingInformation.vue
Outdated
Show resolved
Hide resolved
| <v-text-field | ||
| density="compact" | ||
| label="Student's date of birth" | ||
| label="Parent's full name" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
...pps/api/src/route-controllers/supporting-user/supporting-user.supporting-users.controller.ts
Outdated
Show resolved
Hide resolved
sources/packages/web/src/views/supporting-user/SupportingInformation.vue
Outdated
Show resolved
Hide resolved
sources/packages/web/src/views/supporting-user/SupportingInformation.vue
Show resolved
Hide resolved
|
Thanks for making the changes @bidyashish. Added some more comments. |
| @ValidateIf( | ||
| (object: UpdateSupportingUserAPIInDTO) => | ||
| object.supportingUserType === SupportingUserType.Parent, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the confusion, the object must be typed with the DTO type, which in this case and on line 49 as well is ApplicationIdentifierAPIInDTO
@ValidateIf(
(object: ApplicationIdentifierAPIInDTO) =>
object.supportingUserType === SupportingUserType.Parent,
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
dheepak-aot
left a comment
There was a problem hiding this 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 @bidyashish. Left one last comment on class validator.
sh16011993
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @bidyashish 👍
|



Update search for parent only
Demo

Error

E2E test will follow.