diff --git a/src/actions.js b/src/actions.js
index afa7e0a..d29aad7 100644
--- a/src/actions.js
+++ b/src/actions.js
@@ -36,7 +36,7 @@ const TASK_FULL_PROJECTION = () => [
'jsonExt',
];
-const TASK_PROJECTION = () => [
+const TASK_PROJECTION = () => [
'id',
'entityId',
'entityString',
@@ -52,7 +52,7 @@ const TASK_PROJECTION = () => [
];
const TASKS_FULL_PROJECTION = () => [
- ...TASK_PROJECTION, 'businessEvent'
+ ...TASK_PROJECTION, 'businessEvent',
];
export const formatTaskGroupGQL = (taskGroup) => {
diff --git a/src/components/TaskApprovementPanel.js b/src/components/TaskApprovementPanel.js
index 9c2894d..4b6e59b 100644
--- a/src/components/TaskApprovementPanel.js
+++ b/src/components/TaskApprovementPanel.js
@@ -13,7 +13,7 @@ import CheckIcon from '@material-ui/icons/Check';
import {
APPROVED, EMPTY_STRING,
FAILED, TASK_STATUS,
- TASK_CONTRIBUTION_KEY
+ TASK_CONTRIBUTION_KEY,
} from '../constants';
import { resolveTask } from '../actions';
@@ -50,7 +50,6 @@ function TaskApprovementPanel({
const [disable, setDisable] = useState(false);
const task = { ...edited };
-
useEffect(() => {
if (task?.businessStatus && user) {
const businesStatus = JSON.parse(task.businessStatus);
@@ -106,11 +105,13 @@ function TaskApprovementPanel({
.find((c) => c.taskSource.includes(task.source));
if (contrib?.confirmationPanel) {
- return
+ return (
+
+ );
}
}
diff --git a/src/components/TaskSearcher.js b/src/components/TaskSearcher.js
index d84155b..29709fe 100644
--- a/src/components/TaskSearcher.js
+++ b/src/components/TaskSearcher.js
@@ -140,7 +140,7 @@ function TaskSearcher({
sorts={sorts}
rowsPerPageOptions={ROWS_PER_PAGE_OPTIONS}
defaultPageSize={DEFAULT_PAGE_SIZE}
- defaultOrderBy="source"
+ defaultOrderBy="-dateCreated"
rowIdentifier={rowIdentifier}
onDoubleClick={onDoubleClick}
defaultFilters={defaultFilters()}
diff --git a/src/index.js b/src/index.js
index 5e79930..6b04f6f 100644
--- a/src/index.js
+++ b/src/index.js
@@ -48,4 +48,4 @@ const DEFAULT_CONFIG = {
export const TasksManagementModule = (cfg) => ({ ...DEFAULT_CONFIG, ...cfg });
-export { resolveTask };
\ No newline at end of file
+export { resolveTask };
diff --git a/src/reducer.js b/src/reducer.js
index a702960..8be83b1 100644
--- a/src/reducer.js
+++ b/src/reducer.js
@@ -115,12 +115,7 @@ function reducer(
task: parseData(action.payload.data.task)?.map((task) => ({
...task,
id: decodeId(task.id),
- businessData: parseTaskData(JSON.parse(task.businessData, (key, value) => {
- if (['date_valid_to', 'date_valid_from'].includes(key)) {
- return `${value} 00:00:00`;
- }
- return value;
- })),
+ businessData: parseTaskData(JSON.parse(task.businessData)),
}))?.[0],
errorTask: null,
};