diff --git a/src/areaSearch/components/AreaSearchApplicationListPage.js b/src/areaSearch/components/AreaSearchApplicationListPage.js index 7d3e9c2b0..7786800da 100644 --- a/src/areaSearch/components/AreaSearchApplicationListPage.js +++ b/src/areaSearch/components/AreaSearchApplicationListPage.js @@ -68,6 +68,7 @@ import FormField from '$components/form/FormField'; import type {Attributes, Methods as MethodsType} from '$src/types'; import type {ApiResponse} from '$src/types'; import type {UsersPermissions as UsersPermissionsType} from '$src/usersPermissions/types'; +import AreaSearchExportModal from '$src/areaSearch/components/AreaSearchExportModal'; const VisualizationTypes = { MAP: 'map', @@ -118,6 +119,7 @@ type State = { selectedStates: Array, visualizationType: string, isEditModalOpen: boolean, + isExportModalOpen: boolean, editModalTargetAreaSearch: ?number, } @@ -135,6 +137,7 @@ class AreaSearchApplicationListPage extends PureComponent { selectedStates: DEFAULT_AREA_SEARCH_STATES, visualizationType: VisualizationTypes.TABLE, isEditModalOpen: false, + isExportModalOpen: false, editModalTargetAreaSearch: null, } @@ -325,6 +328,18 @@ class AreaSearchApplicationListPage extends PureComponent { })); }; + openExportModal = () => { + this.setState(() => ({ + isExportModalOpen: true, + })); + }; + + closeExportModal = () => { + this.setState(() => ({ + isExportModalOpen: false, + })); + }; + submitAreaSearchEditModal = (data: Object) => { const {editAreaSearch} = this.props; @@ -600,6 +615,7 @@ class AreaSearchApplicationListPage extends PureComponent { isFetchingByBBox, isFetchingAreaSearchListAttributes, location: {search}, + selectedSearches = {}, } = this.props; const { @@ -611,6 +627,7 @@ class AreaSearchApplicationListPage extends PureComponent { selectedStates, visualizationType, isEditModalOpen, + isExportModalOpen, editModalTargetAreaSearch, } = this.state; const searchQuery = getUrlParams(search); @@ -749,12 +766,17 @@ class AreaSearchApplicationListPage extends PureComponent { /> } +