Skip to content

Commit

Permalink
Update ConsultationForm.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
JOSHIK27 authored Aug 20, 2024
1 parent 81f9167 commit b556041
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Components/Facility/ConsultationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,6 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => {
}

case "treating_physician": {
if (state.form.suggestion === "DC") {
break;
}
if (state.form.suggestion !== "DD" && !state.form[field]) {
errors[field] = t("field_required");
invalidForm = true;
Expand All @@ -626,7 +623,6 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => {
return;
}
});

if (invalidForm) {
dispatch({ type: "set_errors", errors });
const firstError = Object.keys(errors).find((key) => errors[key]);
Expand Down Expand Up @@ -1438,7 +1434,7 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => {
name={"treating_physician"}
label={t("treating_doctor")}
placeholder="Attending Doctors Name and Designation"
required={state.form.suggestion !== "DC"}
required
value={
state.form.treating_physician_object ?? undefined
}
Expand Down

0 comments on commit b556041

Please sign in to comment.