diff --git a/src/frontend/src/components/DialogTaskActions.jsx b/src/frontend/src/components/DialogTaskActions.jsx index cfdcb100ff..a0851ae073 100755 --- a/src/frontend/src/components/DialogTaskActions.jsx +++ b/src/frontend/src/components/DialogTaskActions.jsx @@ -5,9 +5,11 @@ import MapStyles from '@/hooks/MapStyles'; import CoreModules from '@/shared/CoreModules'; import { CommonActions } from '@/store/slices/CommonSlice'; import { task_priority_str } from '@/types/enums'; +import Button from '@/components/common/Button'; +import { useNavigate } from 'react-router-dom'; export default function Dialog({ taskId, feature, map, view }) { - // const featureStatus = feature.id_ != undefined ? feature.id_.replace("_", ",").split(',')[1] : null; + const navigate = useNavigate(); const projectData = CoreModules.useAppSelector((state) => state.project.projectTaskBoundries); const token = CoreModules.useAppSelector((state) => state.login.loginToken); const loading = CoreModules.useAppSelector((state) => state.common.loading); @@ -46,10 +48,6 @@ export default function Dialog({ taskId, feature, map, view }) { } }, [projectData, taskId, feature]); - // const tasksList = environment.tasksStatus.map((status) => { - // return status.key; - // }); - const handleOnClick = (event) => { const status = task_priority_str[event.target.id]; const body = token != null ? { ...token } : {}; @@ -94,64 +92,59 @@ export default function Dialog({ taskId, feature, map, view }) { currentStatus?.locked_by_username === token?.username || currentStatus?.locked_by_username === null; return ( - - - - {`Task : ${taskId}`} - - - - - {/* {`STATUS : ${task_status?.toString()?.replaceAll('_', ' ')}`} */} - {`STATUS : ${task_status}`} - - - - + {list_of_task_status?.length > 0 && ( +
- Task Submission - - - {checkIfTaskAssignedOrNot && - list_of_task_status?.map((data, index) => { - return list_of_task_status?.length != 0 ? ( - - {data.key} - - ) : ( - - {data.key} - - ); - })} - + {checkIfTaskAssignedOrNot && + list_of_task_status?.map((data, index) => { + return list_of_task_status?.length != 0 ? ( +
+ )} + {task_status !== 'READY' && task_status !== 'LOCKED_FOR_MAPPING' && ( +
+
+ )} + {task_status === 'LOCKED_FOR_MAPPING' && ( +
+
+ )} + ); }