diff --git a/src/frontend/src/api/Project.js b/src/frontend/src/api/Project.js index db0345c321..cf6c776c81 100755 --- a/src/frontend/src/api/Project.js +++ b/src/frontend/src/api/Project.js @@ -221,6 +221,20 @@ export const GetProjectDashboard = (url) => { }; }; +export const GetEntityInfo = (url) => { + return async (dispatch) => { + const getEntityOsmMap = async (url) => { + try { + const response = await CoreModules.axios.get(url); + dispatch(ProjectActions.SetEntityOsmMap(response.data)); + } catch (error) { + } finally { + } + }; + await getEntityOsmMap(url); + }; +}; + export const GetProjectComments = (url) => { return async (dispatch) => { const getProjectComments = async (url) => { diff --git a/src/frontend/src/components/ProjectDetailsV2/FeatureSelectionPopup.tsx b/src/frontend/src/components/ProjectDetailsV2/FeatureSelectionPopup.tsx new file mode 100644 index 0000000000..cfff1f101d --- /dev/null +++ b/src/frontend/src/components/ProjectDetailsV2/FeatureSelectionPopup.tsx @@ -0,0 +1,108 @@ +// Popup used to display task feature info & link to ODK Collect + +import React from 'react'; +import CoreModules from '@/shared/CoreModules'; +import AssetModules from '@/shared/AssetModules'; +import Button from '@/components/common/Button'; +import { ProjectActions } from '@/store/slices/ProjectSlice'; + +type TaskFeatureSelectionProperties = { + osm_id: number; + tags: string; + timestamp: string; + version: number; + changeset: number; +}; + +type TaskFeatureSelectionPopupPropType = { + featureProperties: TaskFeatureSelectionProperties | null; +}; + +const TaskFeatureSelectionPopup = ({ featureProperties }: TaskFeatureSelectionPopupPropType) => { + const dispatch = CoreModules.useAppDispatch(); + const taskModalStatus = CoreModules.useAppSelector((state) => state.project.taskModalStatus); + const projectInfo = CoreModules.useAppSelector((state) => state.project.projectInfo); + const entityOsmMap = CoreModules.useAppSelector((state) => state.project.entityOsmMap); + return ( +
+ Tags: + + {featureProperties?.tags} + +
++ Timestamp: + {featureProperties?.timestamp} +
++ Changeset: + {featureProperties?.changeset} +
++ Version: + {featureProperties?.version} +
+MB TILES
+Basemaps
- Tags: {properties?.tags} -
-- Timestamp: {properties?.timestamp} -
-- Changeset: {properties?.changeset} -
-- Version: {properties?.version} -
-