Skip to content

Commit

Permalink
Hide KASP Advance Filter (#6687)
Browse files Browse the repository at this point in the history
* Hide KASP Advance Filter

* removed KASP Advance Filter

* removed unused filter
  • Loading branch information
konavivekramakrishna authored Nov 29, 2023
1 parent 88fa9a2 commit 8f76361
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/Components/Facility/FacilityFilter/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { navigate } from "raviger";
import { FACILITY_TYPES } from "../../../Common/constants";
import useMergeState from "../../../Common/hooks/useMergeState";
import useConfig from "../../../Common/hooks/useConfig";
import FiltersSlideover from "../../../CAREUI/interactive/FiltersSlideover";
import { useTranslation } from "react-i18next";
import StateAutocompleteFormField from "../../Common/StateAutocompleteFormField";
Expand All @@ -15,19 +14,17 @@ const clearFilterState = {
district: "",
local_body: "",
facility_type: "",
kasp_empanelled: "",
};

function FacilityFilter(props: any) {
const { t } = useTranslation();
const { filter, onChange, closeFilter } = props;
const { kasp_string } = useConfig();

const [filterState, setFilterState] = useMergeState({
state: filter.state || "",
district: filter.district || "",
local_body: filter.local_body || "",
facility_type: filter.facility_type || "",
kasp_empanelled: filter.kasp_empanelled || "",
});

const applyFilter = () => {
Expand All @@ -36,7 +33,6 @@ function FacilityFilter(props: any) {
district: Number(filterState.district) || "",
local_body: Number(filterState.local_body) || "",
facility_type: filterState.facility_type || "",
kasp_empanelled: filterState.kasp_empanelled || "",
};
onChange(data);
};
Expand Down Expand Up @@ -92,17 +88,6 @@ function FacilityFilter(props: any) {
optionValue={(option) => option.id}
placeholder={t("show_all")}
/>
<SelectFormField
{...field("kasp_empanelled")}
label={`${kasp_string} Empanelled`}
options={[
{ id: "true", text: t("yes") },
{ id: "false", text: t("no") },
]}
optionLabel={(option) => option.text}
optionValue={(option) => option.id}
placeholder={t("show_all")}
/>
</div>
</FiltersSlideover>
);
Expand Down

0 comments on commit 8f76361

Please sign in to comment.