Skip to content

Commit

Permalink
fix: fixed the validation logic of the insurance form
Browse files Browse the repository at this point in the history
  • Loading branch information
syedfardeenjeelani committed Oct 12, 2024
1 parent 7eebafc commit 983b154
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/Components/HCX/InsuranceDetailsBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ 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 };

Expand Down Expand Up @@ -82,7 +81,6 @@ export default function InsuranceDetailsBuilder(props: Props) {
>
<InsuranceDetailEditCard
policy={policy}
error={props.error}
handleUpdate={handleUpdate(index)}
handleUpdates={handleUpdates(index)}
handleRemove={handleRemove(index)}
Expand All @@ -101,14 +99,12 @@ const InsuranceDetailEditCard = ({
handleUpdates,
handleRemove,
gridView,
error,
}: {
policy: HCXPolicyModel;
handleUpdate: (event: FieldChangeEvent<unknown>) => void;
handleUpdates: (diffs: object) => void;
handleRemove: () => void;
gridView?: boolean;
error: FieldError;
}) => {
const { t } = useTranslation();
const seletedInsurer =
Expand Down Expand Up @@ -137,7 +133,6 @@ const InsuranceDetailEditCard = ({
<TextFormField
required
name="subscriber_id"
error={error}
label={t("policy__subscriber_id")}
placeholder={t("policy__subscriber_id__example")}
value={policy.subscriber_id}
Expand All @@ -146,7 +141,6 @@ const InsuranceDetailEditCard = ({
<TextFormField
required
name="policy_id"
error={error}
label={t("policy__policy_id")}
placeholder={t("policy__policy_id__example")}
value={policy.policy_id}
Expand Down Expand Up @@ -177,9 +171,7 @@ const InsuranceDetailEditCard = ({
/>
<TextFormField
name="insurer_name"
required
label={t("policy__insurer_name")}
error={error}
placeholder={t("policy__insurer_name__example")}
value={policy.insurer_name}
onChange={handleUpdate}
Expand Down

0 comments on commit 983b154

Please sign in to comment.