-
Notifications
You must be signed in to change notification settings - Fork 14
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
[api][web][sims-120] Add institution location form and API to save the data to sims data base after form validation #425
Conversation
…save the data to sims data base after form validation
@@ -16,3 +16,4 @@ COMMENT ON TABLE institutions_users IS 'This is a pivot table to capture the rel | |||
COMMENT ON COLUMN institutions_users.id IS 'Auto-generated sequential primary key column'; | |||
COMMENT ON COLUMN institutions_users.user_id IS 'Foreign key reference to users table users'; | |||
COMMENT ON COLUMN institutions_users.institution_id IS 'Foreign key reference to users table institutions'; | |||
1 |
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.
Please consider not including this file in the PR if the only change is the line break.
@@ -29,7 +29,6 @@ export default { | |||
const formDefinition = await ApiClient.DynamicForms.getFormDefinition( | |||
props.formName, | |||
); |
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.
Please consider not including this file in the PR if the only change is the line break.
locationName: string; | ||
postalZipCode: string; | ||
provinceState: string; | ||
submit: boolean; |
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.
Please consider removing the submit from here since it is not part of the business model.
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.
okay, at any point we won't be using the submit variable right? okay I will remove it
locationName: string; | ||
postalZipCode: string; | ||
provinceState: string; | ||
submit: boolean; |
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.
Please consider removing the submit from here since it is not part of the business model.
async create( | ||
@Body() payload: InstitutionLocationType, | ||
@UserToken() userToken: IUserToken, | ||
): Promise<GetInstitutionLocationDto> { |
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.
I believe that this method should return a Promise since it is returning only the id.
|
||
@Post() | ||
async create( | ||
@Body() payload: InstitutionLocationType, |
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.
We are trying to keep all objects received/returned by the API as DTO. I would recommend moving this to the DTO level.
…form and API to save the data to sims data base after form validation
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.
Please check why test run is unsuccessful.
provinceState: string, | ||
postalZipCode: string, | ||
country: string, | ||
applicationId: string, |
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.
Is there any particular reason these properties be present here?
- applicationId: string,
- pid: string,
- process_pid: string
… added and unused variable removed
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.
Great work @ann-aot, looks good 👍
…save the data to sims data base after form validation