Skip to content

Commit

Permalink
avoid any's
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed May 10, 2024
1 parent 5e6468f commit 1de2999
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/Components/Patient/PatientRegister.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import CollapseV2 from "../Common/components/CollapseV2";
import ConfirmDialog from "../Common/ConfirmDialog";
import DateFormField from "../Form/FormFields/DateFormField";
import DialogModal from "../Common/Dialog";
import { DupPatientModel } from "../Facility/models";
import { DistrictModel, DupPatientModel, WardModel } from "../Facility/models";
import DuplicatePatientDialog from "../Facility/DuplicatePatientDialog";
import {
FieldError,
Expand Down Expand Up @@ -64,6 +64,7 @@ import routes from "../../Redux/api.js";
import request from "../../Utils/request/request.js";
import SelectMenuV2 from "../Form/SelectMenuV2.js";
import Checkbox from "../Common/components/CheckBox.js";
import { ILocalBodies } from "../ExternalResult/models.js";

const Loading = lazy(() => import("../Common/Loading"));
const PageTitle = lazy(() => import("../Common/PageTitle"));
Expand Down Expand Up @@ -205,9 +206,9 @@ export const PatientRegister = (props: PatientRegisterProps) => {
const [isDistrictLoading, setIsDistrictLoading] = useState(false);
const [isLocalbodyLoading, setIsLocalbodyLoading] = useState(false);
const [isWardLoading, setIsWardLoading] = useState(false);
const [districts, setDistricts] = useState<any[]>([]);
const [localBody, setLocalBody] = useState<any[]>([]);
const [ward, setWard] = useState<any[]>([]);
const [districts, setDistricts] = useState<DistrictModel[]>([]);
const [localBody, setLocalBody] = useState<ILocalBodies[]>([]);
const [ward, setWard] = useState<WardModel[]>([]);
const [ageInputType, setAgeInputType] = useState<
"date_of_birth" | "age" | "alert_for_age"
>("date_of_birth");
Expand Down Expand Up @@ -1749,9 +1750,9 @@ export const PatientRegister = (props: PatientRegisterProps) => {
}
disabled={!field("district").value}
options={localBody}
optionLabel={(o: any) => o.name}
optionValue={(o: any) => o.id}
onChange={(e: any) => {
optionLabel={(o) => o.name}
optionValue={(o) => o.id}
onChange={(e) => {
field("local_body").onChange(e);
field("ward").onChange({
name: "ward",
Expand Down

0 comments on commit 1de2999

Please sign in to comment.