-
Notifications
You must be signed in to change notification settings - Fork 478
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: Added Validation for Insurance input fields in patient registration issue (#8672) #8681
Changes from 2 commits
d1c1cd5
96b810f
90dcac7
6bc35c4
8768f3b
8941616
64963bf
0ce16b3
795d4de
7eebafc
983b154
3059959
1085cbd
0c39cc6
27fb884
be234ea
482075a
ff32463
72e89b0
ea0291d
10f9aba
a33a94a
f5a2651
9bdfdc6
2f75935
d7da9f8
d39b125
a06d0f7
2b5dd16
54c08f1
d903c88
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -15,6 +15,7 @@ import request from "../../Utils/request/request"; | |||
import routes from "../../Redux/api"; | ||||
import { useTranslation } from "react-i18next"; | ||||
import careConfig from "@careConfig"; | ||||
import { FieldError } from "../Form/FieldValidators"; | ||||
|
||||
type Props = FormFieldBaseProps<HCXPolicyModel[]> & { gridView?: boolean }; | ||||
|
||||
|
@@ -73,6 +74,7 @@ export default function InsuranceDetailsBuilder(props: Props) { | |||
> | ||||
<InsuranceDetailEditCard | ||||
policy={policy} | ||||
error={props.error} | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
handleUpdate={handleUpdate(index)} | ||||
handleUpdates={handleUpdates(index)} | ||||
handleRemove={handleRemove(index)} | ||||
|
@@ -91,12 +93,14 @@ const InsuranceDetailEditCard = ({ | |||
handleUpdates, | ||||
handleRemove, | ||||
gridView, | ||||
error, | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
}: { | ||||
policy: HCXPolicyModel; | ||||
handleUpdate: (event: FieldChangeEvent<unknown>) => void; | ||||
handleUpdates: (diffs: object) => void; | ||||
handleRemove: () => void; | ||||
gridView?: boolean; | ||||
error: FieldError; | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
}) => { | ||||
const { t } = useTranslation(); | ||||
const seletedInsurer = | ||||
|
@@ -125,6 +129,7 @@ const InsuranceDetailEditCard = ({ | |||
<TextFormField | ||||
required | ||||
name="subscriber_id" | ||||
error={error} | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
label={t("policy__subscriber_id")} | ||||
placeholder={t("policy__subscriber_id__example")} | ||||
value={policy.subscriber_id} | ||||
|
@@ -133,6 +138,7 @@ const InsuranceDetailEditCard = ({ | |||
<TextFormField | ||||
required | ||||
name="policy_id" | ||||
error={error} | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
label={t("policy__policy_id")} | ||||
placeholder={t("policy__policy_id__example")} | ||||
value={policy.policy_id} | ||||
|
@@ -163,7 +169,9 @@ const InsuranceDetailEditCard = ({ | |||
/> | ||||
<TextFormField | ||||
name="insurer_name" | ||||
required | ||||
label={t("policy__insurer_name")} | ||||
error={error} | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
placeholder={t("policy__insurer_name__example")} | ||||
value={policy.insurer_name} | ||||
onChange={handleUpdate} | ||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,10 +142,11 @@ export const fireRequest = ( | |
|
||
// 400 Bad Request Error | ||
if (error.response.status === 400 || error.response.status === 406) { | ||
Notification.BadRequest({ | ||
errs: error.response.data, | ||
}); | ||
return error.response; | ||
console.log(error.response.data.detaillocal_ip_address); | ||
// Notification.BadRequest({ | ||
// errs: error.response.data, | ||
// }); | ||
// return error.response; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this changed? |
||
} | ||
|
||
// 4xx Errors | ||
|
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.