@@ -10,10 +10,6 @@ import {
1010} from "@openimis/fe-core" ;
1111import { FormControlLabel , Grid , Checkbox } from "@material-ui/core" ;
1212import { withTheme , withStyles } from "@material-ui/core/styles" ;
13- import {
14- buildLocationFilter ,
15- shouldDisableRegion
16- } from "../utils/filtersUtils" ;
1713
1814const styles = ( theme ) => ( {
1915 form : {
@@ -30,10 +26,6 @@ const PricelistsFilter = (props) => {
3026 const { formatMessage } = useTranslations ( "medical_pricelist" , modulesManager ) ;
3127
3228 const onRegionChange = ( value ) => {
33- if ( shouldDisableRegion ( filters ) ) {
34- return ;
35- }
36-
3729 onChangeFilters ( [
3830 { id : "region" , value, filter : value ? `location_Uuid: "${ value . uuid } "` : null } ,
3931 { id : "district" , value : null , filter : null } ,
@@ -45,10 +37,6 @@ const PricelistsFilter = (props) => {
4537 { id : "district" , value, filter : value ? `location_Uuid: "${ value . uuid } "` : null }
4638 ] ;
4739
48- if ( value && value . uuid ) {
49- updates . push ( { id : "region" , value : null , filter : null } ) ;
50- }
51-
5240 onChangeFilters ( updates ) ;
5341 } ;
5442
@@ -58,8 +46,6 @@ const PricelistsFilter = (props) => {
5846
5947 const triggerDebounceName = useDebounceCb ( onNameChange , modulesManager . getConf ( "fe-admin" , "debounceTime" , 500 ) ) ;
6048
61- const isRegionDisabled = shouldDisableRegion ( filters ) ;
62-
6349 return (
6450 < section className = { classes . form } >
6551 < Grid container >
@@ -88,7 +74,6 @@ const PricelistsFilter = (props) => {
8874 value = { filters ?. region ?. value }
8975 withNull = { true }
9076 onChange = { onRegionChange }
91- disabled = { isRegionDisabled }
9277 />
9378 </ Grid >
9479 }
0 commit comments