Skip to content

Commit

Permalink
Merge pull request #550 from hotosm/feat-lock-task
Browse files Browse the repository at this point in the history
Feat lock task
  • Loading branch information
varun2948 authored Jun 29, 2023
2 parents 7610aac + fa0f0db commit a352c11
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
13 changes: 13 additions & 0 deletions src/frontend/fmtm_openlayer_map/src/api/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ export const ProjectById = (url, existingProjectList) => {
{ id: resp.id, taskBoundries: persistingValues },
])
);
dispatch(
ProjectActions.SetProjectInfo({id:resp.id,
priority:resp.priority || 2,
priority_str:resp.priority_str || "MEDIUM",
title:resp.project_info?.[0]?.name,
location_str:resp.location_str,
description:resp.description,
num_contributors:resp.num_contributors,
total_tasks:resp.total_tasks,
tasks_mapped:resp.tasks_mapped,
tasks_validated:resp.tasks_validated,
tasks_bad:resp.tasks_bad})
);
} catch (error) {
// console.log('error :', error)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import useForm from '../../hooks/useForm';
import SelectFormValidation from './validation/SelectFormValidation';
import { CommonActions } from '../../store/slices/CommonSlice';
import LoadingBar from './LoadingBar';
import environment from '../../environment';

// import { SelectPicker } from 'rsuite';
let generateProjectLogIntervalCb = null;
Expand Down Expand Up @@ -120,7 +121,8 @@ const FormSelection: React.FC = ({ geojsonFile,customFormFile,setCustomFormFile,
useEffect(() => {
if (generateQrSuccess && generateProjectLog?.status === 'SUCCESS') {
clearInterval(generateProjectLogIntervalCb);
navigate('/');
const encodedProjectId = environment.encode(projectDetailsResponse?.id)
navigate(`/project_details/${encodedProjectId}`);
dispatch(
CommonActions.SetSnackBar({
open: true,
Expand Down
1 change: 0 additions & 1 deletion src/frontend/main/src/views/CreateProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import CoreModules from '../shared/CoreModules';
import UploadArea from '../components/createproject/UploadArea';
import { useLocation, Link } from 'react-router-dom';
import ProjectDetailsForm from '../components/createproject/ProjectDetailsForm';
import BasemapSelection from '../components/createproject/BasemapSelection';
import FormSelection from '../components/createproject/FormSelection';
import DefineTasks from '../components/createproject/DefineTasks';
import { CreateProjectActions } from '../store/slices/CreateProjectSlice';
Expand Down

0 comments on commit a352c11

Please sign in to comment.