-
Notifications
You must be signed in to change notification settings - Fork 47
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
fix: KHP3-7296-Make relationship person middle name optional and remove notes from relationship payload #547
fix: KHP3-7296-Make relationship person middle name optional and remove notes from relationship payload #547
Conversation
…emoed notes from relationship payload preventing error
|
||
const onSubmit: SubmitHandler<FormData> = async (data) => { | ||
try { | ||
await saveRelationship(data, config, session, []); | ||
await saveRelationship({ ...data, ...({ notes: undefined } as any) }, config, session, []); /// Remove notes from payload since endpoint doesnt espect it avoid 400 error |
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 have a typo here
{...field} | ||
invalid={error?.message} | ||
invalidText={error?.message} | ||
className={styles.billingItem}> |
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.
the css classname here indicates this is a billItem should that be the case
@@ -75,7 +75,7 @@ export const relationshipFormSchema = z.object({ | |||
personBInfo: z | |||
.object({ | |||
givenName: z.string().min(1, 'Required'), |
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.
Should we have the error more descriptive e.g Give name is a required field
same for familyName
field
…move unnecessary notes from relationship payload
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.
LGTM Merge in once you have fixed the lint errors
|
||
const onSubmit: SubmitHandler<FormData> = async (data) => { | ||
try { | ||
await saveRelationship(data, config, session, []); | ||
await saveRelationship({ ...data, ...({ notes: undefined } as any) }, config, session, []); /// Remove notes from payload since endpoint doesn't expect it to avoid 400 error |
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.
Additional notes is not supported by relationships model. Why would you still retain the same field on the form @Omoshlawi ? Is this not misleading the users? I thought we should also remove the field from the form.
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 was not the one who implemented the other and family relationship initially so I had no Idea why the field was added by initially implementor.But I have removed it completely now
… handling messages
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 @Omoshlawi
…emoed notes from relationship payload preventing error
Requirements
Summary
Screenshots
None.
Related Issue
https://thepalladiumgroup.atlassian.net/browse/KHP3-7296
Other
None.