diff --git a/src/components/TaskFilter.js b/src/components/TaskFilter.js
index 944c758..cd7f3cb 100644
--- a/src/components/TaskFilter.js
+++ b/src/components/TaskFilter.js
@@ -64,7 +64,7 @@ function TaskFilter({
module="tasksManagement"
label="task.entity"
value={filterTextFieldValue('entity')}
- onChange={onChangeStringFilter('entity', CONTAINS_LOOKUP)}
+ onChange={onChangeStringFilter('entityString', CONTAINS_LOOKUP)}
/>
@@ -81,14 +81,6 @@ function TaskFilter({
])}
/>
-
-
-
diff --git a/src/components/TaskSearcher.js b/src/components/TaskSearcher.js
index d9f507a..f647a67 100644
--- a/src/components/TaskSearcher.js
+++ b/src/components/TaskSearcher.js
@@ -52,7 +52,6 @@ function TaskSearcher({
'task.type',
'task.entity',
'task.assignee',
- 'task.businessStatus',
'task.status',
];
if (rights.includes(RIGHT_TASKS_MANAGEMENT_SEARCH)) {
@@ -66,7 +65,6 @@ function TaskSearcher({
['type', true],
['entity', true],
['assignee', true],
- ['businessStatus', true],
['status', true],
];
@@ -75,7 +73,6 @@ function TaskSearcher({
(task) => trimBusinessEvent(task.businessEvent),
(task) => task.entityString,
(task) => task?.taskGroup?.code,
- (task) => task.businessStatus,
(task) => task.status,
(task) => (
@@ -110,7 +107,7 @@ function TaskSearcher({
if (entityIds) {
filters.entityIds = {
value: entityIds,
- filter: `entityIds: "${entityIds}"`,
+ filter: `entityIds: [${entityIds.map((id) => `"${id}"`)}]`,
};
}
return filters;
@@ -143,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 08ddfb9..6b04f6f 100644
--- a/src/index.js
+++ b/src/index.js
@@ -15,7 +15,7 @@ import TaskGroupPicker from './pickers/TaskGroupPicker';
import TaskSearcher from './components/TaskSearcher';
import getAdminMainMenuContributions from './contributions/AdminMainMenuContributions';
import { TASK_ROUTE } from './constants';
-import { fetchTask } from './actions';
+import { fetchTask, resolveTask } from './actions';
const ROUTE_TASKS_MANAGEMENT = 'tasks';
const ROUTE_TASK_MANAGEMENT = 'tasks/task';
@@ -47,3 +47,5 @@ const DEFAULT_CONFIG = {
};
export const TasksManagementModule = (cfg) => ({ ...DEFAULT_CONFIG, ...cfg });
+
+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,
};