diff --git a/src/Components/Form/SelectMenuV2.tsx b/src/Components/Form/SelectMenuV2.tsx index f75d0acca10..03e0312c602 100644 --- a/src/Components/Form/SelectMenuV2.tsx +++ b/src/Components/Form/SelectMenuV2.tsx @@ -102,7 +102,7 @@ const SelectMenuV2 = (props: SelectMenuProps) => { {value.icon} )} -

+

{value.selectedLabel}

diff --git a/src/Components/Patient/PatientRegister.tsx b/src/Components/Patient/PatientRegister.tsx index cfc497a2893..383edbe78d7 100644 --- a/src/Components/Patient/PatientRegister.tsx +++ b/src/Components/Patient/PatientRegister.tsx @@ -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, @@ -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")); @@ -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([]); - const [localBody, setLocalBody] = useState([]); - const [ward, setWard] = useState([]); + const [districts, setDistricts] = useState([]); + const [localBody, setLocalBody] = useState([]); + const [ward, setWard] = useState([]); const [ageInputType, setAgeInputType] = useState< "date_of_birth" | "age" | "alert_for_age" >("date_of_birth"); @@ -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",