diff --git a/src/actions.js b/src/actions.js index e9c7dfd..26dfac0 100644 --- a/src/actions.js +++ b/src/actions.js @@ -32,7 +32,7 @@ const TASK_FULL_PROJECTION = () => [ 'isDeleted', 'taskGroup{id, code, completionPolicy, taskexecutorSet {edges{node{id, user{id}}}}}', 'data', - 'currentEntityData', + 'businessData', 'jsonExt', ]; diff --git a/src/components/TaskPreviewCell.js b/src/components/TaskPreviewCell.js index ce968d2..1a4e18e 100644 --- a/src/components/TaskPreviewCell.js +++ b/src/components/TaskPreviewCell.js @@ -2,20 +2,20 @@ import React from 'react'; import { HYPHEN } from '../constants'; function TaskPreviewCell({ - formatterIndex, itemData, incomingData, formatter, jsonExt, + formatterIndex, itemData, incomingData, formatter, }) { const showHistorical = (itemIncomingData) => { - if (formatter(itemData, jsonExt, formatterIndex) === formatter(itemIncomingData, jsonExt, formatterIndex) - || !formatter(itemIncomingData, jsonExt, formatterIndex)) { + if (formatter(itemData, formatterIndex) === formatter(itemIncomingData, formatterIndex) + || !formatter(itemIncomingData, formatterIndex)) { return HYPHEN; } - return formatter(itemIncomingData, jsonExt, formatterIndex); + return formatter(itemIncomingData, formatterIndex); }; return ( <>

- {formatter(itemData, jsonExt, formatterIndex) ?? HYPHEN} + {formatter(itemData, formatterIndex) ?? HYPHEN}

{showHistorical(incomingData)} diff --git a/src/components/TaskPreviewTable.js b/src/components/TaskPreviewTable.js index 32dd132..7be22ab 100644 --- a/src/components/TaskPreviewTable.js +++ b/src/components/TaskPreviewTable.js @@ -81,9 +81,8 @@ function TaskPreviewTable({ ))} diff --git a/src/reducer.js b/src/reducer.js index 4fd8666..52dad25 100644 --- a/src/reducer.js +++ b/src/reducer.js @@ -115,8 +115,8 @@ function reducer( task: parseData(action.payload.data.task)?.map((task) => ({ ...task, id: decodeId(task.id), - currentEntityData: parseTaskData(JSON.parse((JSON.parse(task.currentEntityData)))), - data: parseTaskData(JSON.parse(task.data, (key, value) => { + businessData: parseTaskData(JSON.parse(task.businessData, (key, value) => { + console.log(task.businessData) if (['date_valid_to', 'date_valid_from'].includes(key)) { return `${value} 00:00:00`; }