Skip to content

Commit

Permalink
Update src/Components/Facility/ConsultationForm.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: Khavin Shankar <[email protected]>
  • Loading branch information
rithviknishad and khavinshankar authored May 6, 2024
1 parent cdafa55 commit 8473222
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/Components/Facility/ConsultationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -641,23 +641,12 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => {
}
return;
}
case "weight": {
if (state.form.suggestion !== "DD") {
const value = state.form[field];
if (!value || parseFloat(value) <= 0) {
errors[field] = "Please enter a valid Weight";
invalidForm = true;
break;
}
}
return;
}

case "weight":
case "height": {

Check failure on line 645 in src/Components/Facility/ConsultationForm.tsx

View workflow job for this annotation

GitHub Actions / lint

Delete `·`
if (state.form.suggestion !== "DD") {
const value = state.form[field];
if (!value || parseFloat(value) <= 0) {
errors[field] = "Please enter a valid Height";
errors[field] = `Please enter a valid ${field}`;
invalidForm = true;
break;
}
Expand Down

0 comments on commit 8473222

Please sign in to comment.