From 8ee43475d2c73ba8cedcafb08badc5dfcae1066d Mon Sep 17 00:00:00 2001 From: Maria Hofmann <m.hofmann@adito.de> Date: Fri, 21 Jun 2019 12:13:17 +0200 Subject: [PATCH] fixes --- entity/DSGVO_entity/DSGVO_entity.aod | 1 + .../entityfields/row_id}/valueProcess.js | 0 .../entityfields/value/dropDownProcess.js | 34 +-- .../medium.value/expression.js | 3 +- .../value.value/expression.js | 3 +- entity/MediumValue/DSGVO_entity.aod | 257 ------------------ .../entityfields/date_edit/valueProcess.js | 7 - .../entityfields/date_new/valueProcess.js | 7 - .../children/anonymperson/onActionProcess.js | 5 - .../children/anonymperson/stateProcess.js | 0 .../entityfields/dsgvoid/valueProcess.js | 8 - .../containername_param/valueProcess.js | 4 - .../containername_param/valueProcess.js | 4 - .../opendisclosurereport/onActionProcess.js | 5 - .../openinforeport/onActionProcess.js | 5 - .../entityfields/right/displayValueProcess.js | 6 - .../entityfields/use/displayValueProcess.js | 6 - .../entityfields/user_edit/valueProcess.js | 7 - .../entityfields/user_new/valueProcess.js | 7 - .../recordcontainers/db/conditionProcess.js | 8 - .../recordcontainers/db/fromClauseProcess.js | 6 - .../recordcontainers/db/onDBInsert.js | 44 --- .../medium.value/expression.js | 22 -- .../right.displayvalue/expression.js | 6 - .../use.displayvalue/expression.js | 6 - neonView/DSGVOEdit_view/DSGVOEdit_view.aod | 4 +- .../DSGVOFilter_view/DSGVOFilter_view.aod | 6 - .../DSGVOPreviewAnonym_view.aod | 20 +- process/DSGVO_lib/process.js | 125 +++++---- 29 files changed, 93 insertions(+), 523 deletions(-) rename entity/{MediumValue/entityfields/contact_id => DSGVO_entity/entityfields/row_id}/valueProcess.js (100%) delete mode 100644 entity/MediumValue/DSGVO_entity.aod delete mode 100644 entity/MediumValue/entityfields/date_edit/valueProcess.js delete mode 100644 entity/MediumValue/entityfields/date_new/valueProcess.js delete mode 100644 entity/MediumValue/entityfields/dsgvoactions/children/anonymperson/onActionProcess.js delete mode 100644 entity/MediumValue/entityfields/dsgvoactions/children/anonymperson/stateProcess.js delete mode 100644 entity/MediumValue/entityfields/dsgvoid/valueProcess.js delete mode 100644 entity/MediumValue/entityfields/keywordright/children/containername_param/valueProcess.js delete mode 100644 entity/MediumValue/entityfields/keyworduse/children/containername_param/valueProcess.js delete mode 100644 entity/MediumValue/entityfields/reports/children/opendisclosurereport/onActionProcess.js delete mode 100644 entity/MediumValue/entityfields/reports/children/openinforeport/onActionProcess.js delete mode 100644 entity/MediumValue/entityfields/right/displayValueProcess.js delete mode 100644 entity/MediumValue/entityfields/use/displayValueProcess.js delete mode 100644 entity/MediumValue/entityfields/user_edit/valueProcess.js delete mode 100644 entity/MediumValue/entityfields/user_new/valueProcess.js delete mode 100644 entity/MediumValue/recordcontainers/db/conditionProcess.js delete mode 100644 entity/MediumValue/recordcontainers/db/fromClauseProcess.js delete mode 100644 entity/MediumValue/recordcontainers/db/onDBInsert.js delete mode 100644 entity/MediumValue/recordcontainers/db/recordfieldmappings/medium.value/expression.js delete mode 100644 entity/MediumValue/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js delete mode 100644 entity/MediumValue/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js diff --git a/entity/DSGVO_entity/DSGVO_entity.aod b/entity/DSGVO_entity/DSGVO_entity.aod index 56fc5b7998..a4701179b4 100644 --- a/entity/DSGVO_entity/DSGVO_entity.aod +++ b/entity/DSGVO_entity/DSGVO_entity.aod @@ -40,6 +40,7 @@ </entityField> <entityField> <name>ROW_ID</name> + <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/row_id/valueProcess.js</valueProcess> </entityField> <entityField> <name>STATUORITYSOURCE</name> diff --git a/entity/MediumValue/entityfields/contact_id/valueProcess.js b/entity/DSGVO_entity/entityfields/row_id/valueProcess.js similarity index 100% rename from entity/MediumValue/entityfields/contact_id/valueProcess.js rename to entity/DSGVO_entity/entityfields/row_id/valueProcess.js diff --git a/entity/DSGVO_entity/entityfields/value/dropDownProcess.js b/entity/DSGVO_entity/entityfields/value/dropDownProcess.js index 4cd9231de6..829572ad90 100644 --- a/entity/DSGVO_entity/entityfields/value/dropDownProcess.js +++ b/entity/DSGVO_entity/entityfields/value/dropDownProcess.js @@ -5,36 +5,6 @@ import("Sql_lib"); import("system.db"); import("DSGVO_lib"); -/*var addr = db.table(SqlCondition.begin() - .andPrepare("CONTACT.PERSON_ID", vars.get("$param.currentPerson_param")) - .buildSql("select ADDRESS, ADDRESSADDITION, ADDRIDENTIFIER, BUILDINGNO, CITY, COUNTRY, DISTRICT, REGION, STATE, ZIP from ADDRESS join CONTACT on ADDRESS.ADDRESSID = CONTACT.ADDRESS_ID", "1 = 1")); +var data = getDSGVOTable(vars.get("$param.currentPerson_param"), "combo"); -var comm = db.table(SqlCondition.begin() - //.andPrepare("COMMUNICATION.CONTACT_ID", vars.get("$field.CONTACT_ID")) - .andPrepare("CONTACT.PERSON_ID", vars.get("$param.currentPerson_param")) - .buildSql("select ADDR, MEDIUM_ID from COMMUNICATION join CONTACT on COMMUNICATION.CONTACT_ID = CONTACTID", "1 = 1")); -//var sql3 = db.table(SqlCondition.begin().andPrepare("AB_ATTRIBUTE.CONTACT_ID", vars.get("$field.CONTACT_ID")).buildSql("select * from AB_ATTRIBUTE", "1 = 1")); -var pers = db.table(SqlCondition.begin() - .andPrepare("PERSON.PERSONID", vars.get("$param.currentPerson_param")) - .buildSql("select DATEOFBIRTH, FIRSTNAME, MIDDLENAME, LASTNAME, GENDER, SALUTATION, TITLE, TITLESUFFIX, PICTURE from PERSON", "1 = 1")); - -var data = new Array(); - -for(i = 0; i < addr.length; i++) -{ - data.push(["Address-" + i, addr[i][4]]); -} - -for(i = 0; i < comm.length; i++) -{ - data.push(["Comm-"+i, comm[i][0]]); -} - -for(i = 0; i < pers.length; i++) -{ - data.push(["Personal-"+i, pers[i][3]]); -} - -result.object(data);*/ - -result.object(getDSGVOTable(vars.get("$param.currentPerson_param"), "combo")); \ No newline at end of file +result.object(data); \ No newline at end of file diff --git a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js index ede49d26ae..d848dd8256 100644 --- a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js +++ b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js @@ -1,4 +1,5 @@ +import("system.result"); import("system.vars"); import("DSGVO_lib"); -//getDSGVOTable(vars.get("$param.currentPerson_param"), "medium"); \ No newline at end of file +result.object(getDSGVOTable(vars.get("$param.currentPerson_param"), "medium")); \ No newline at end of file diff --git a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/value.value/expression.js b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/value.value/expression.js index 95250baeba..9c1830d99e 100644 --- a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/value.value/expression.js +++ b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/value.value/expression.js @@ -1,4 +1,5 @@ +import("system.result"); import("system.vars"); import("DSGVO_lib"); -//getDSGVOTable(vars.get("$param.currentPerson_param"), "value"); +result.object(getDSGVOTable(vars.get("$param.currentPerson_param"), "value")); diff --git a/entity/MediumValue/DSGVO_entity.aod b/entity/MediumValue/DSGVO_entity.aod deleted file mode 100644 index 034db36219..0000000000 --- a/entity/MediumValue/DSGVO_entity.aod +++ /dev/null @@ -1,257 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.7" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.7"> - <name>DSGVO_entity</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <icon>VAADIN:LOCK</icon> - <title>Data Privacy</title> - <titlePlural>Data Privacies</titlePlural> - <recordContainer>db</recordContainer> - <entityFields> - <entityProvider> - <name>#PROVIDER</name> - <dependencies> - <entityDependency> - <name>848916ba-482b-4e53-ac22-48ee6fbf2b64</name> - <entityName>Person_entity</entityName> - <fieldName>DSGVOEntries</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - </entityProvider> - <entityField> - <name>DSGVOID</name> - <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/dsgvoid/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>USER_NEW</name> - <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/user_new/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>USER_EDIT</name> - <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/user_edit/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>DATE_NEW</name> - <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/date_new/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>DATE_EDIT</name> - <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/date_edit/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>ROW_ID</name> - </entityField> - <entityField> - <name>RIGHT</name> - <title>DataPrivacy Right</title> - <description>The statutory source of the private data. Keyword DSGVORight</description> - <consumer>KeywordRight</consumer> - <groupable v="true" /> - <mandatory v="true" /> - <displayValueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/right/displayValueProcess.js</displayValueProcess> - </entityField> - <entityField> - <name>USE</name> - <title>DataPrivacy Use</title> - <description>The purpose of the private data. Keyword DSGVOUse</description> - <consumer>KeywordUse</consumer> - <groupable v="true" /> - <mandatory v="true" /> - <displayValueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/use/displayValueProcess.js</displayValueProcess> - </entityField> - <entityField> - <name>TABLENAME</name> - </entityField> - <entityField> - <name>VALID_TO</name> - <title>Valid to</title> - <description>How long the data will be saved</description> - <contentType>DATE</contentType> - <resolution>MINUTE</resolution> - <outputFormat>dd.MM.yyyy</outputFormat> - <inputFormat>dd.MM.yyyy</inputFormat> - <mandatory v="true" /> - </entityField> - <entityField> - <name>CONTACT_ID</name> - <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/contact_id/valueProcess.js</valueProcess> - </entityField> - <entityConsumer> - <name>ContactAdresses</name> - <dependency> - <name>dependency</name> - <entityName>Address_entity</entityName> - <fieldName>ContactAddresses</fieldName> - </dependency> - </entityConsumer> - <entityConsumer> - <name>KeywordUse</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContainerName_param</name> - <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/keyworduse/children/containername_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>KeywordRight</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContainerName_param</name> - <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/keywordright/children/containername_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>Communications</name> - <dependency> - <name>dependency</name> - <entityName>Communication_entity</entityName> - <fieldName>AllCommunications</fieldName> - </dependency> - </entityConsumer> - <entityField> - <name>MEDIUM</name> - <description>What kind of data is being saved, e.g. Mail, Home address</description> - </entityField> - <entityParameter> - <name>currentPerson_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="true" /> - </entityParameter> - <entityActionGroup> - <name>Reports</name> - <children> - <entityActionField> - <name>openDisclosureReport</name> - <title>Disclosure Report</title> - <onActionProcess>%aditoprj%/entity/DSGVO_entity/entityfields/reports/children/opendisclosurereport/onActionProcess.js</onActionProcess> - <isObjectAction v="false" /> - <isSelectionAction v="true" /> - <iconId>VAADIN:INFO_CIRCLE_O</iconId> - </entityActionField> - <entityActionField> - <name>openInfoReport</name> - <title>Information Report</title> - <onActionProcess>%aditoprj%/entity/DSGVO_entity/entityfields/reports/children/openinforeport/onActionProcess.js</onActionProcess> - <isSelectionAction v="true" /> - <iconId>VAADIN:INFO_CIRCLE</iconId> - </entityActionField> - </children> - </entityActionGroup> - <entityActionGroup> - <name>DSGVOActions</name> - <children> - <entityActionField> - <name>anonymPerson</name> - <title>Anonymization</title> - <onActionProcess>%aditoprj%/entity/DSGVO_entity/entityfields/dsgvoactions/children/anonymperson/onActionProcess.js</onActionProcess> - <actionOrder v="0" /> - <isSelectionAction v="true" /> - <iconId>VAADIN:MEH_O</iconId> - <stateProcess>%aditoprj%/entity/DSGVO_entity/entityfields/dsgvoactions/children/anonymperson/stateProcess.js</stateProcess> - </entityActionField> - </children> - </entityActionGroup> - <entityField> - <name>VALUE</name> - </entityField> - <entityFieldGroup> - <name>MediumValue</name> - </entityFieldGroup> - </entityFields> - <recordContainers> - <dbRecordContainer> - <name>db</name> - <alias>Data_alias</alias> - <maximumDbRows v="0" /> - <isPageable v="true" /> - <isRequireContainerFiltering v="false" /> - <fromClauseProcess>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess> - <conditionProcess>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/conditionProcess.js</conditionProcess> - <onDBInsert>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/onDBInsert.js</onDBInsert> - <linkInformation> - <linkInformation> - <name>ca40447a-06ab-4d49-97bb-dde5ccfc8c24</name> - <tableName>DSGVO</tableName> - <primaryKey>DSGVOID</primaryKey> - <isUIDTable v="true" /> - <readonly v="false" /> - </linkInformation> - </linkInformation> - <recordFieldMappings> - <dbRecordFieldMapping> - <name>CONTACT_ID.value</name> - <recordfield>DSGVO.CONTACT_ID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>DATE_EDIT.value</name> - <recordfield>DSGVO.DATE_EDIT</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>DATE_NEW.value</name> - <recordfield>DSGVO.DATE_NEW</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>DSGVOID.value</name> - <recordfield>DSGVO.DSGVOID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>RIGHT.value</name> - <recordfield>DSGVO.RIGHT</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>ROW_ID.value</name> - <recordfield>DSGVO.ROW_ID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>TABLENAME.value</name> - <recordfield>DSGVO.TABLENAME</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>USE.value</name> - <recordfield>DSGVO.USE</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>USER_EDIT.value</name> - <recordfield>DSGVO.USER_EDIT</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>USER_NEW.value</name> - <recordfield>DSGVO.USER_NEW</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>VALID_TO.value</name> - <recordfield>DSGVO.VALID_TO</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>RIGHT.displayValue</name> - <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js</expression> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>USE.displayValue</name> - <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js</expression> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>validToFormat.value</name> - <recordfield>DSGVO.VALID_TO</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>MEDIUM.value</name> - <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js</expression> - </dbRecordFieldMapping> - </recordFieldMappings> - </dbRecordContainer> - </recordContainers> -</entity> diff --git a/entity/MediumValue/entityfields/date_edit/valueProcess.js b/entity/MediumValue/entityfields/date_edit/valueProcess.js deleted file mode 100644 index 5e6ef05973..0000000000 --- a/entity/MediumValue/entityfields/date_edit/valueProcess.js +++ /dev/null @@ -1,7 +0,0 @@ -import("system.util"); -import("system.result"); -import("system.neon"); -import("system.vars"); - -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) - result.string(vars.get("$sys.date")); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/date_new/valueProcess.js b/entity/MediumValue/entityfields/date_new/valueProcess.js deleted file mode 100644 index a72892783b..0000000000 --- a/entity/MediumValue/entityfields/date_new/valueProcess.js +++ /dev/null @@ -1,7 +0,0 @@ -import("system.util"); -import("system.result"); -import("system.neon"); -import("system.vars"); - -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) - result.string(vars.get("$sys.date")); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/dsgvoactions/children/anonymperson/onActionProcess.js b/entity/MediumValue/entityfields/dsgvoactions/children/anonymperson/onActionProcess.js deleted file mode 100644 index 960e1c35e3..0000000000 --- a/entity/MediumValue/entityfields/dsgvoactions/children/anonymperson/onActionProcess.js +++ /dev/null @@ -1,5 +0,0 @@ -import("system.vars"); -import("DSGVO_lib"); - -// TODO open View DSGVOPreviewAnonym_view mit Auswahl an Kategorien -//dsgvoMkDataAnonymous(vars.get("$field.CONTACT_ID"), vars.get("$field.ROW_ID")); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/dsgvoactions/children/anonymperson/stateProcess.js b/entity/MediumValue/entityfields/dsgvoactions/children/anonymperson/stateProcess.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/entity/MediumValue/entityfields/dsgvoid/valueProcess.js b/entity/MediumValue/entityfields/dsgvoid/valueProcess.js deleted file mode 100644 index ef478411d7..0000000000 --- a/entity/MediumValue/entityfields/dsgvoid/valueProcess.js +++ /dev/null @@ -1,8 +0,0 @@ -import("system.neon"); -import("system.result"); -import("system.util"); -import("system.vars"); - -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW){ - result.string(util.getNewUUID()); -} \ No newline at end of file diff --git a/entity/MediumValue/entityfields/keywordright/children/containername_param/valueProcess.js b/entity/MediumValue/entityfields/keywordright/children/containername_param/valueProcess.js deleted file mode 100644 index 1ecc628d1e..0000000000 --- a/entity/MediumValue/entityfields/keywordright/children/containername_param/valueProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.result"); -import("KeywordRegistry_basic"); - -result.string($KeywordRegistry.DSGVORight()); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/keyworduse/children/containername_param/valueProcess.js b/entity/MediumValue/entityfields/keyworduse/children/containername_param/valueProcess.js deleted file mode 100644 index 6805dc6c2c..0000000000 --- a/entity/MediumValue/entityfields/keyworduse/children/containername_param/valueProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.result"); -import("KeywordRegistry_basic"); - -result.string($KeywordRegistry.DSGVOUse()); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/reports/children/opendisclosurereport/onActionProcess.js b/entity/MediumValue/entityfields/reports/children/opendisclosurereport/onActionProcess.js deleted file mode 100644 index eb6195e833..0000000000 --- a/entity/MediumValue/entityfields/reports/children/opendisclosurereport/onActionProcess.js +++ /dev/null @@ -1,5 +0,0 @@ - - -var params = {}; -// TODO params for Reports -// TODO open Report \ No newline at end of file diff --git a/entity/MediumValue/entityfields/reports/children/openinforeport/onActionProcess.js b/entity/MediumValue/entityfields/reports/children/openinforeport/onActionProcess.js deleted file mode 100644 index eb6195e833..0000000000 --- a/entity/MediumValue/entityfields/reports/children/openinforeport/onActionProcess.js +++ /dev/null @@ -1,5 +0,0 @@ - - -var params = {}; -// TODO params for Reports -// TODO open Report \ No newline at end of file diff --git a/entity/MediumValue/entityfields/right/displayValueProcess.js b/entity/MediumValue/entityfields/right/displayValueProcess.js deleted file mode 100644 index fa353b3a40..0000000000 --- a/entity/MediumValue/entityfields/right/displayValueProcess.js +++ /dev/null @@ -1,6 +0,0 @@ -import("system.result"); -import("system.vars"); -import("KeywordRegistry_basic"); -import("Keyword_lib"); - -result.string(KeywordUtils.getViewValue($KeywordRegistry.DSGVORight(), vars.get("$field.RIGHT"))); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/use/displayValueProcess.js b/entity/MediumValue/entityfields/use/displayValueProcess.js deleted file mode 100644 index 244c7f20cc..0000000000 --- a/entity/MediumValue/entityfields/use/displayValueProcess.js +++ /dev/null @@ -1,6 +0,0 @@ -import("system.result"); -import("system.vars"); -import("KeywordRegistry_basic"); -import("Keyword_lib"); - -result.string(KeywordUtils.getViewValue($KeywordRegistry.DSGVOUse(), vars.get("$field.USE"))); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/user_edit/valueProcess.js b/entity/MediumValue/entityfields/user_edit/valueProcess.js deleted file mode 100644 index 6af880ae3e..0000000000 --- a/entity/MediumValue/entityfields/user_edit/valueProcess.js +++ /dev/null @@ -1,7 +0,0 @@ -import("system.util"); -import("system.result"); -import("system.neon"); -import("system.vars"); - -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) - result.string(vars.get("$sys.user")); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/user_new/valueProcess.js b/entity/MediumValue/entityfields/user_new/valueProcess.js deleted file mode 100644 index e518bc75a9..0000000000 --- a/entity/MediumValue/entityfields/user_new/valueProcess.js +++ /dev/null @@ -1,7 +0,0 @@ -import("system.util"); -import("system.result"); -import("system.neon"); -import("system.vars"); - -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) - result.string(vars.get("$sys.user")); \ No newline at end of file diff --git a/entity/MediumValue/recordcontainers/db/conditionProcess.js b/entity/MediumValue/recordcontainers/db/conditionProcess.js deleted file mode 100644 index 6f5161310a..0000000000 --- a/entity/MediumValue/recordcontainers/db/conditionProcess.js +++ /dev/null @@ -1,8 +0,0 @@ -import("system.db"); -import("system.result"); -import("Sql_lib"); - -var cond = new SqlCondition(); -cond.andPrepareVars("DSGVO.CONTACT_ID", "$param.currentPerson_param"); -/* TODO: use a preparedCondition when available*/ -result.string(db.translateCondition(cond.build("1 = 2"))); \ No newline at end of file diff --git a/entity/MediumValue/recordcontainers/db/fromClauseProcess.js b/entity/MediumValue/recordcontainers/db/fromClauseProcess.js deleted file mode 100644 index f292981e98..0000000000 --- a/entity/MediumValue/recordcontainers/db/fromClauseProcess.js +++ /dev/null @@ -1,6 +0,0 @@ -import("system.result"); - -result.string("DSGVO "); -// + "join CONTACT on DSGVO.CONTACT_ID = CONTACT.CONTACTID "); -/* + "join COMMUNICATION on DSGVO.ROW_ID = COMMUNICATION.COMMUNICATIONID " - + "join ADDRESS on DSGVO.ROW_ID = ADDRESS.ADDRESSID");*/ \ No newline at end of file diff --git a/entity/MediumValue/recordcontainers/db/onDBInsert.js b/entity/MediumValue/recordcontainers/db/onDBInsert.js deleted file mode 100644 index db3acc78ba..0000000000 --- a/entity/MediumValue/recordcontainers/db/onDBInsert.js +++ /dev/null @@ -1,44 +0,0 @@ -import("KeywordRegistry_basic"); -import("Keyword_lib"); -import("system.db"); -import("system.neon"); -import("system.vars"); -import("system.util"); - - -if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) -{ - var cols = ["USER_NEW" , "USER_EDIT" , "DSGVOID" , "ROW_ID" , "DATE_NEW" , - "TABLENAME" , "DATE_EDIT" , "RIGHT" , "VALID_TO" , "CONTACT_ID" , "USE"]; - var table = vars.get("$field.TABLENAME"); - - var vals = [vars.get("$sys.user"), null, util.getNewUUID(), - vars.get("$field.ROW_ID"), vars.get("$sys.date"), table, - null, KeywordUtils. vars.get("$field.RIGHT").valueOf(), vars.get("$field.VALID_TO"), - vars.get("$field.CONTACT_ID"), vars.get("$field.USE").valueOf()]; - // KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVOUse(), "DSGVO.USE"); - db.insertData("DSGVO", cols, null, vals); -} - // TODO Eintrag in DSGVO Tabelle - - /* - * - var InputMapping = { - "OFFERITEM": { - condition: "OFFER_ID = '" + pSourceOfferId + "' order by ITEMSORT", - ValueMapping: { - "OFFER_ID" : pTargetOfferId - } - } - }; - CopyModuleUtils.copyModule(InputMapping); - - var oiUtils = new OfferItemUtils(pTargetOfferId); - - //update order price - cols = ["NET", "VAT"]; - var vals = oiUtils.getNetAndVat(); - - db.updateData("OFFER", cols, null, vals, SqlCondition.equals("OFFER.OFFERID", pTargetOfferId, "1 = 2")); - * - */ \ No newline at end of file diff --git a/entity/MediumValue/recordcontainers/db/recordfieldmappings/medium.value/expression.js b/entity/MediumValue/recordcontainers/db/recordfieldmappings/medium.value/expression.js deleted file mode 100644 index 4cb06aa85a..0000000000 --- a/entity/MediumValue/recordcontainers/db/recordfieldmappings/medium.value/expression.js +++ /dev/null @@ -1,22 +0,0 @@ -import("system.logging"); -import("KeywordRegistry_basic"); -import("Keyword_lib"); -import("system.vars"); -import("Sql_lib"); -import("system.result"); -import("system.db"); - -var sql = SqlCondition.begin() - .andPrepare("$field.CONTACT_ID", "CONTACT_ID") - .andPrepare("1=2"); -var table = vars.getString("$field.TABLENAME"); -if(table == "COMMUNICATION") - { - sql = db.cell(sql.buildSQL("select MEDIUM_ID from " + table)); - result.string(KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.communicationMedium(), sql)); - } -else - { - logging.log("Medium -->> Table -->> " + vars.getString("$field.TABLENAME")); - result.string("$field.TABLENAME"); - } \ No newline at end of file diff --git a/entity/MediumValue/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js b/entity/MediumValue/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js deleted file mode 100644 index 7bff6895d0..0000000000 --- a/entity/MediumValue/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js +++ /dev/null @@ -1,6 +0,0 @@ -import("system.result"); -import("Keyword_lib"); -import("KeywordRegistry_basic"); - -var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVORight(), "DSGVO.RIGHT"); -result.string(sql); diff --git a/entity/MediumValue/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js b/entity/MediumValue/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js deleted file mode 100644 index 4b55075d99..0000000000 --- a/entity/MediumValue/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js +++ /dev/null @@ -1,6 +0,0 @@ -import("system.result"); -import("Keyword_lib"); -import("KeywordRegistry_basic"); - -var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVOUse(), "DSGVO.USE"); -result.string(sql); diff --git a/neonView/DSGVOEdit_view/DSGVOEdit_view.aod b/neonView/DSGVOEdit_view/DSGVOEdit_view.aod index f8bf343556..2e5c22f42b 100644 --- a/neonView/DSGVOEdit_view/DSGVOEdit_view.aod +++ b/neonView/DSGVOEdit_view/DSGVOEdit_view.aod @@ -15,8 +15,8 @@ <entityField>#ENTITY</entityField> <fields> <entityFieldLink> - <name>a646ddb9-59b6-4773-af79-9f159fa5e6c9</name> - <entityField>TABLENAME</entityField> + <name>2d624b85-9dbc-4ab1-9682-9c4d50e4df5d</name> + <entityField>ROW_ID</entityField> </entityFieldLink> <entityFieldLink> <name>732a0a8a-4db3-4ff9-b4a2-c7ab6f2cf144</name> diff --git a/neonView/DSGVOFilter_view/DSGVOFilter_view.aod b/neonView/DSGVOFilter_view/DSGVOFilter_view.aod index f956e18ee2..946ae1b9b6 100644 --- a/neonView/DSGVOFilter_view/DSGVOFilter_view.aod +++ b/neonView/DSGVOFilter_view/DSGVOFilter_view.aod @@ -21,12 +21,6 @@ <width v="75" /> <expandRatio v="100" /> </neonTableColumn> - <neonTableColumn> - <name>d41fa261-39c6-4c47-a315-37eb5aebe78e</name> - <entityField>MEDIUM</entityField> - <width v="75" /> - <expandRatio v="100" /> - </neonTableColumn> <neonTableColumn> <name>1d329067-0959-4150-aaa4-ea7887a31ec2</name> <entityField>VALUE</entityField> diff --git a/neonView/DSGVOPreviewAnonym_view/DSGVOPreviewAnonym_view.aod b/neonView/DSGVOPreviewAnonym_view/DSGVOPreviewAnonym_view.aod index f0434c4f40..69a0f67d7a 100644 --- a/neonView/DSGVOPreviewAnonym_view/DSGVOPreviewAnonym_view.aod +++ b/neonView/DSGVOPreviewAnonym_view/DSGVOPreviewAnonym_view.aod @@ -19,9 +19,27 @@ <width v="10" /> <expandRatio v="15" /> </neonTableColumn> + <neonTableColumn> + <name>005e5b03-a3d8-478d-9a7c-7b68a314ffc1</name> + <entityField>VALUE</entityField> + <width v="10" /> + <expandRatio v="15" /> + </neonTableColumn> <neonTableColumn> <name>c3b92a4c-15c4-4276-a6da-b5d88d495c17</name> - <entityField>MEDIUM</entityField> + <entityField>PURPOSE</entityField> + <width v="10" /> + <expandRatio v="15" /> + </neonTableColumn> + <neonTableColumn> + <name>4341e1c0-f15b-477f-a893-b88cbf03fc8f</name> + <entityField>STATUORITYSOURCE</entityField> + <width v="10" /> + <expandRatio v="15" /> + </neonTableColumn> + <neonTableColumn> + <name>746a6468-39f2-4b00-955b-55734a13d407</name> + <entityField>VALID_TO</entityField> <width v="10" /> <expandRatio v="15" /> </neonTableColumn> diff --git a/process/DSGVO_lib/process.js b/process/DSGVO_lib/process.js index 856d712c28..d4c13a0711 100644 --- a/process/DSGVO_lib/process.js +++ b/process/DSGVO_lib/process.js @@ -13,16 +13,16 @@ function getDSGVOTable (pPerson, pType) { var addr = db.table(SqlCondition.begin() .andPrepare("CONTACT.PERSON_ID", pPerson) - .buildSql("select ADDRESS, ADDRESSADDITION, ADDRIDENTIFIER, BUILDINGNO, CITY, COUNTRY, DISTRICT, REGION, STATE, ZIP from ADDRESS join CONTACT on ADDRESS.ADDRESSID = CONTACT.ADDRESS_ID", "1 = 1")); + .buildSql("select ADDRESSID, ADDRESS, ADDRESSADDITION, ADDRIDENTIFIER, BUILDINGNO, CITY, COUNTRY, DISTRICT, REGION, STATE, ZIP from ADDRESS join CONTACT on ADDRESS.ADDRESSID = CONTACT.ADDRESS_ID", "1 = 1")); var comm = db.table(SqlCondition.begin() //.andPrepare("COMMUNICATION.CONTACT_ID", vars.get("$field.CONTACT_ID")) .andPrepare("CONTACT.PERSON_ID", pPerson) - .buildSql("select ADDR, MEDIUM_ID from COMMUNICATION join CONTACT on COMMUNICATION.CONTACT_ID = CONTACTID", "1 = 1")); + .buildSql("select COMMUNICATIONID, ADDR, MEDIUM_ID from COMMUNICATION join CONTACT on COMMUNICATION.CONTACT_ID = CONTACTID", "1 = 1")); //var sql3 = db.table(SqlCondition.begin().andPrepare("AB_ATTRIBUTE.CONTACT_ID", vars.get("$field.CONTACT_ID")).buildSql("select * from AB_ATTRIBUTE", "1 = 1")); var pers = db.table(SqlCondition.begin() .andPrepare("PERSON.PERSONID", pPerson) - .buildSql("select DATEOFBIRTH, FIRSTNAME, MIDDLENAME, LASTNAME, GENDER, SALUTATION, TITLE, TITLESUFFIX, PICTURE from PERSON", "1 = 1")); + .buildSql("select PERSONID, DATEOFBIRTH, FIRSTNAME, MIDDLENAME, LASTNAME, GENDER, SALUTATION, TITLE, TITLESUFFIX, PICTURE from PERSON", "1 = 1")); // var data = new Array(); var mediumData = new Array(); @@ -31,154 +31,159 @@ function getDSGVOTable (pPerson, pType) for(i = 0; i < addr.length; i++) { - var entry = null; - if(addr[i][0] != null) - { - mediumData.push("Street-" + i); - valueData.push(addr[i][0]); - } + var addrEntry = null; if(addr[i][1] != null) { - mediumData.push("Addressaddition-" + i); + mediumData.push(addr[i][0] + " Street"); valueData.push(addr[i][1]); } if(addr[i][2] != null) { - mediumData.push("Addressident-" + i); + mediumData.push(addr[i][0] + " Addressaddition"); valueData.push(addr[i][2]); } if(addr[i][3] != null) { - mediumData.push("Buildingno-" + i); + mediumData.push(addr[i][0] + " Addressident"); valueData.push(addr[i][3]); } if(addr[i][4] != null) { - mediumData.push("City-" + i); + mediumData.push(addr[i][0] + " Buildingno"); valueData.push(addr[i][4]); - entry = addr[i][4]; } if(addr[i][5] != null) { - mediumData.push("Country-" + i); + mediumData.push(addr[i][0] + " City"); valueData.push(addr[i][5]); + addrEntry = addr[i][5]; } if(addr[i][6] != null) { - mediumData.push("District-" + i); + mediumData.push(addr[i][0] + " Country"); valueData.push(addr[i][6]); - if(entry == null) - entry = addr[i][6]; } if(addr[i][7] != null) { - mediumData.push("Region-" + i); + mediumData.push(addr[i][0] + " District"); valueData.push(addr[i][7]); - if(entry == null) - entry = addr[i][7]; + if(addrEntry == null) + addrEntry = addr[i][7]; } if(addr[i][8] != null) { - mediumData.push("State-" + i); + mediumData.push(addr[i][0] + " Region"); valueData.push(addr[i][8]); + if(addrEntry == null) + addrEntry = addr[i][8]; } if(addr[i][9] != null) { - mediumData.push("ZIP-" + i); + mediumData.push(addr[i][0] + " State"); valueData.push(addr[i][9]); - if(entry == null) - entry = addr[i][9]; } - if(entry != null) - allData.push(["Address-" + i , entry]); + if(addr[i][10] != null) + { + mediumData.push(addr[i][0] + " ZIP"); + valueData.push(addr[i][10]); + if(addrEntry == null) + addrEntry = addr[i][10]; + } + if(addrEntry != null) + allData.push([addr[i][0] + "-address", addrEntry]); } for(i = 0; i < comm.length; i++) { - // TODO .... funktioniert nicht, findet gar keine Comms mehr - // info: Internet fehlt/funktioniert nicht? - if(comm[i][0] && comm[i][1]) + if(comm[i][1] && comm[i][2]) { - var medium = KeywordUtils.getViewValue($KeywordRegistry.communicationMedium(), comm[i][1]); + var medium = KeywordUtils.getViewValue($KeywordRegistry.communicationMedium(), comm[i][2]); if(medium != null) { mediumData.push(medium) - logging.log(medium); - valueData.push(comm[i][0]); - allData.push(["Communication-" + (allData.length + i), medium]) + valueData.push(comm[i][1]); + allData.push([comm[i][0] + "-communication", medium]) } } } for(i = 0; i < pers.length; i++) { - var entry = null; - if(pers[i][0] != null) - { - mediumData.push("Date of Birth-" + i); - valueData.push(pers[i][0]); - } + var persEntry = null; if(pers[i][1] != null) { - mediumData.push("Firstname-" + i); + mediumData.push(pers[i][0] + " Date of Birth"); valueData.push(pers[i][1]); } if(pers[i][2] != null) { - mediumData.push("Middlename-" + i); + mediumData.push(pers[i][0] + " Firstname"); valueData.push(pers[i][2]); } if(pers[i][3] != null) { - mediumData.push("Lastname-" + i); + mediumData.push(pers[i][0] + " Middlename"); valueData.push(pers[i][3]); - entry = pers[i][3]; } if(pers[i][4] != null) { - mediumData.push("Gender-" + i); + mediumData.push(pers[i][0] + " Lastname"); valueData.push(pers[i][4]); + persEntry = pers[i][4]; } if(pers[i][5] != null) { - mediumData.push("Salutation-" + i); + mediumData.push(pers[i][0] + " Gender"); valueData.push(pers[i][5]); } if(pers[i][6] != null) { - mediumData.push("Title-" + i); + mediumData.push(pers[i][0] + " Salutation"); valueData.push(pers[i][6]); } if(pers[i][7] != null) { - mediumData.push("Title suffix-" + i); + mediumData.push(pers[i][0] + " Title"); valueData.push(pers[i][7]); } - if(pers[i][8] != null) { - mediumData.push("Picture-" + i); + if(pers[i][8] != null) + { + mediumData.push(pers[i][0] + " Title suffix"); valueData.push(pers[i][8]); - if(entry == null) - entry = pers[i][8]; + } + if(pers[i][9] != null) { + mediumData.push(pers[i][0] + " Picture"); + valueData.push(pers[i][9]); + if(persEntry == null) + persEntry = pers[i][9]; } - if(entry != null) - allData.push(["Personal-" + allData.length + i, entry]); + if(persEntry != null) + allData.push([pers[i][0] + "-person", persEntry]); } //logging.log(mediumData.length); //logging.log(valueData.length); - logging.log(allData.length); - allData.forEach(function (entry) + //logging.log(allData.length); + /*allData.forEach(function (entry) { logging.log(entry); - }) + })*/ + + //logging.log(pType); if(pType == "medium") - result.object(mediumData); + { + return mediumData; + } else if(pType == "value") - result.object(valueData); + { + return valueData; + } else if(pType == "combo") - result.object(allData); + { + return allData; + } } -- GitLab