@@ -8,7 +8,12 @@ import isFunction from 'lodash/isFunction';
8
8
import SearchableSelectInput from '../../../components/SearchableSelectInput' ;
9
9
10
10
/* http actions */
11
- const { getAgencies, getFeatureTypes, getAdministrativeAreas } = httpActions ;
11
+ const {
12
+ getAgencies,
13
+ getFeatureTypes,
14
+ getAdministrativeAreas,
15
+ getPartyOwnerships,
16
+ } = httpActions ;
12
17
13
18
/* state actions */
14
19
const { clearFeatureFilters, filterFeatures } = reduxActions ;
@@ -145,11 +150,32 @@ const FeatureFiltersForm = ({
145
150
onCache = { ( custodians ) =>
146
151
onCache ( { 'relations.custodians' : custodians } )
147
152
}
148
- initialValue = { get ( cached , 'relations.custodians' , [ ] ) }
153
+ initisFilterialValue = { get ( cached , 'relations.custodians' , [ ] ) }
149
154
/>
150
155
</ Form . Item >
151
156
{ /* end:feature custodians filter */ }
152
157
158
+ { /* start:feature ownership filter */ }
159
+ < Form . Item
160
+ label = "By ownership"
161
+ title = "Critical infrastructure Ownership e.g Government"
162
+ name = { [ 'relations.ownership' ] }
163
+ >
164
+ < SearchableSelectInput
165
+ onSearch = { ( optns = { } ) => {
166
+ return getPartyOwnerships ( optns ) ;
167
+ } }
168
+ optionLabel = { ( ownership ) => get ( ownership , 'strings.name.en' ) }
169
+ optionValue = "_id"
170
+ mode = "multiple"
171
+ onCache = { ( ownerships ) =>
172
+ onCache ( { 'relations.ownerships' : ownerships } )
173
+ }
174
+ initialValue = { get ( cached , 'relations.ownership' , [ ] ) }
175
+ />
176
+ </ Form . Item >
177
+ { /* end:feature ownership filter */ }
178
+
153
179
{ /* start:form actions */ }
154
180
< Form . Item wrapperCol = { { span : 24 } } style = { { textAlign : 'right' } } >
155
181
< Button onClick = { onCancel } > Cancel</ Button >
0 commit comments