diff --git a/src/frontend/src/components/DialogTaskActions.jsx b/src/frontend/src/components/DialogTaskActions.jsx
index d41bb965e3..5b0a3179c7 100755
--- a/src/frontend/src/components/DialogTaskActions.jsx
+++ b/src/frontend/src/components/DialogTaskActions.jsx
@@ -12,7 +12,7 @@ export default function Dialog({ taskId, feature, map, view }) {
const token = CoreModules.useAppSelector((state) => state.login.loginToken);
const loading = CoreModules.useAppSelector((state) => state.common.loading);
const [list_of_task_status, set_list_of_task_status] = useState([]);
- const [task_status, set_task_status] = useState(task_priority_str['READY']);
+ const [task_status, set_task_status] = useState('READY');
const geojsonStyles = MapStyles();
const dispatch = CoreModules.useAppDispatch();
@@ -34,11 +34,11 @@ export default function Dialog({ taskId, feature, map, view }) {
})[0],
};
const findCorrectTaskStatusIndex = environment.tasksStatus.findIndex(
- (data) => data.label == task_priority_str[currentStatus.task_status],
+ (data) => data.label == currentStatus.task_status,
);
const tasksStatus =
feature.id_ != undefined ? environment.tasksStatus[findCorrectTaskStatusIndex]?.['label'] : '';
- set_task_status(task_priority_str[tasksStatus]);
+ set_task_status(tasksStatus);
const tasksStatusList =
feature.id_ != undefined ? environment.tasksStatus[findCorrectTaskStatusIndex]?.['action'] : [];
@@ -53,7 +53,7 @@ export default function Dialog({ taskId, feature, map, view }) {
const handleOnClick = (event) => {
const status = task_priority_str[event.target.id];
const body = token != null ? { ...token } : {};
- const geoStyle = geojsonStyles[status];
+ const geoStyle = geojsonStyles[event.target.id];
if (event.target.id != undefined) {
if (body.hasOwnProperty('id')) {
dispatch(
@@ -103,7 +103,7 @@ export default function Dialog({ taskId, feature, map, view }) {
{/* {`STATUS : ${task_status?.toString()?.replaceAll('_', ' ')}`} */}
- {`STATUS : ${task_priority_str[task_status]}`}
+ {`STATUS : ${task_status}`}
{
let id = feature.getId().toString().replace('_', ',');
- const status = task_priority_str[id.split(',')[1]];
+ const status = id.split(',')[1];
const lockedPolygonStyle = createPolygonStyle(mapTheme.palette.mapFeatureColors.locked_for_mapping_rgb, strokeColor);
const lockedValidationStyle = createPolygonStyle(
mapTheme.palette.mapFeatureColors.locked_for_validation_rgb,