diff --git a/entity/WorkflowTask_entity/WorkflowTask_entity.aod b/entity/WorkflowTask_entity/WorkflowTask_entity.aod index 093057d73705eec8abb66c5acfc1b08f3b319766..1ca9b00ef92ba1e949758240720136ea9e4f2835 100644 --- a/entity/WorkflowTask_entity/WorkflowTask_entity.aod +++ b/entity/WorkflowTask_entity/WorkflowTask_entity.aod @@ -44,6 +44,7 @@ <title>Creation date</title> <contentType>DATE</contentType> <state>READONLY</state> + <titleProcess>%aditoprj%/entity/WorkflowTask_entity/entityfields/create_time/titleProcess.js</titleProcess> </entityField> <entityParameter> <name>WorkflowDefinitionId_param</name> @@ -54,6 +55,7 @@ <title>Complete task</title> <onActionProcess>%aditoprj%/entity/WorkflowTask_entity/entityfields/completetask/onActionProcess.js</onActionProcess> <iconId>VAADIN:CHECK</iconId> + <stateProcess>%aditoprj%/entity/WorkflowTask_entity/entityfields/completetask/stateProcess.js</stateProcess> <tooltip>Complete task</tooltip> </entityActionField> <entityParameter> diff --git a/entity/WorkflowTask_entity/entityfields/completetask/stateProcess.js b/entity/WorkflowTask_entity/entityfields/completetask/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..16def1966dcf13e8827fffc966b484470ebb7ef8 --- /dev/null +++ b/entity/WorkflowTask_entity/entityfields/completetask/stateProcess.js @@ -0,0 +1,5 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.PROCESSINSTANCE_ID") ? neon.COMPONENTSTATE_EDITABLE : neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/WorkflowTask_entity/entityfields/create_time/titleProcess.js b/entity/WorkflowTask_entity/entityfields/create_time/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7e0690651ff4417cb1edc1aecd827f33bb9ffcdb --- /dev/null +++ b/entity/WorkflowTask_entity/entityfields/create_time/titleProcess.js @@ -0,0 +1,6 @@ +import("system.translate"); +import("system.vars"); +import("system.result"); + +if (!vars.get("$field.PROCESSINSTANCE_ID")) + result.string(translate.text("Date")); \ No newline at end of file diff --git a/entity/WorkflowTask_entity/recordcontainers/jdito/contentProcess.js b/entity/WorkflowTask_entity/recordcontainers/jdito/contentProcess.js index 1af939151ea89bf904238d2eae46f9f9f78868bb..6fd4066771302576c346ac6f312a5d1d88019764 100644 --- a/entity/WorkflowTask_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/WorkflowTask_entity/recordcontainers/jdito/contentProcess.js @@ -1,3 +1,4 @@ +import("system.translate"); import("system.project"); import("Context_lib"); import("system.neon"); @@ -13,12 +14,13 @@ import("system.workflow"); var isOnlyForCurrentUser = vars.get("$param.OnlyForCurrentUser_param") == "true"; var loadConfig = workflow.createConfigForLoadingTasks(); -var tasks; +var tasks, dummyTask; if (vars.get("$local.idvalues") && vars.get("$local.idvalues")[0]) { + var taskId = vars.get("$local.idvalues")[0]; loadConfig = workflow.createConfigForLoadingTask() - .taskId(vars.get("$local.idvalues")[0]); + .taskId(taskId); //TODO: there shouldn't be an error try { @@ -26,7 +28,9 @@ if (vars.get("$local.idvalues") && vars.get("$local.idvalues")[0]) } catch (err) { + //This can happen if the task is done, then it can't be loaded. If that's the case, return a dummy row tasks = []; + dummyTask = [taskId, translate.text("Task done"), "", "", vars.get("$sys.date"), "", "", "", "", "", "", "", "", "", "", "", ""]; } } else @@ -69,4 +73,7 @@ tasks = tasks.map(function (task) tasks = JditoFilterUtils.filterRecords(["UID", "NAME", "PROCESSDEFINITION_ID", "PROCESSINSTANCE_ID", "CREATE_TIME", "FORMDEFINITION", "USER", "DESCRIPTION", "CATEGORY", "ASSIGNEE", "", "DUEDATE", "OWNER"], tasks, vars.get("$local.filter").filter); +if (dummyTask) + tasks = [dummyTask]; + result.object(tasks); \ No newline at end of file diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index c1ce05f09362da9bf97ee3383b41939b852ada0f..41a1270cf387479e4bcf0373ca62f1cf659cb347 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -6053,6 +6053,9 @@ <entry> <key>To check</key> </entry> + <entry> + <key>DSGVO Disclosure</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> <sqlModels> diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 953945b6de91ebced05bb67c7feeb191d2a7bb52..90681049b58d3b7ad7a7d5df68c894329a69b495 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -50,6 +50,10 @@ <key>Has marketing approved this step?</key> <value>Hat das Marketing diesem Schritt zugestimmt?</value> </entry> + <entry> + <key>Task done</key> + <value>Aufgabe abgeschlossen</value> + </entry> <entry> <key>Export process</key> <value>Prozess exportieren</value> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index b9320a5730ad1969a25d2e796a5ec01b309eb439..887df788ad4b978317d6b4bf1648386bbb79bee0 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -6103,6 +6103,9 @@ <entry> <key>To check</key> </entry> + <entry> + <key>DSGVO Disclosure</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language>