diff --git a/.liquibase/Data_alias/basic/2019.1.4/DSGVO/create_DSGVO.xml b/.liquibase/Data_alias/basic/2019.1.4/DSGVO/create_DSGVO.xml index 403ebc547c1cc6be0d2369a64cb7d73100921719..120216492724c5cb3b1a0a14d0ce54adf21b44c3 100644 --- a/.liquibase/Data_alias/basic/2019.1.4/DSGVO/create_DSGVO.xml +++ b/.liquibase/Data_alias/basic/2019.1.4/DSGVO/create_DSGVO.xml @@ -6,7 +6,7 @@ <constraints primaryKey="true" primaryKeyName="PK_DSGVO_DSGVOID"/> </column> - <column name="TYPE" type="CHAR(36)"/> + <column name="DSGVOTYPE" type="CHAR(36)"/> <column name="ROW_ID" type="CHAR(36)" /> <column name="STATUORITYSOURCE" type="CHAR(36)" /> @@ -27,5 +27,18 @@ <column name="USER_EDIT" type="NVARCHAR(50)" /> <column name="DATE_EDIT" type="TIMESTAMP" /> </createTable> + + <createTable tableName="DSGVOINFO"> + <column name="DSGVOINFOID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_DSGVOINFO_DSGVOINFOID"/> + </column> + + <column name="CONTACT_ID" type="CHAR(36)"/> + + <column name="DATASOURCE" type="NVARCHAR(100)" /> + <column name="GARANTEE" type="NVARCHAR(100)" /> + + <column name="RECIPIENT" type="NVARCHAR(100)" /> + </createTable> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index bd9c2644864f4c579b35fbaa4664818b01735f5b..f8233c9f7048b0465e2cf4dde877b1d36a31378f 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -10158,7 +10158,7 @@ <description></description> </entityFieldDb> <entityFieldDb> - <name>TYPE</name> + <name>DSGVOTYPE</name> <dbName></dbName> <primaryKey v="false" /> <columnType v="1" /> @@ -10423,6 +10423,96 @@ </entityFieldDb> </entityFields> </entityDb> + <entityDb> + <name>DSGVOINFO</name> + <dbName></dbName> + <idColumn>DSGVOINFOID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <documentation></documentation> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>RECIPIENT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="100" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>GARANTEE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="100" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DSGVOINFOID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATASOURCE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="100" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>CONTACT_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> </entities> </entityGroup> </aliasDefDb> diff --git a/entity/DSGVOInfo_entity/DSGVOInfo_entity.aod b/entity/DSGVOInfo_entity/DSGVOInfo_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..906a901aed30f543913f470bc66f711e97d3f806 --- /dev/null +++ b/entity/DSGVOInfo_entity/DSGVOInfo_entity.aod @@ -0,0 +1,82 @@ +<?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.9" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.9"> + <name>DSGVOInfo_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>RECIPIENT</name> + <title>Recipient, Country</title> + </entityField> + <entityField> + <name>GARANTEE</name> + <title>Garantees</title> + </entityField> + <entityField> + <name>DATASOURCE</name> + <title>External Datasource</title> + </entityField> + <entityField> + <name>CONTACT_ID</name> + <valueProcess>%aditoprj%/entity/DSGVOInfo_entity/entityfields/contact_id/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DSGVOINFOID</name> + </entityField> + <entityParameter> + <name>ContactId_param</name> + <expose v="true" /> + <mandatory v="true" /> + </entityParameter> + <entityParameter> + <name>ReportType_param</name> + <expose v="true" /> + </entityParameter> + <entityProvider> + <name>DSGVOInfos</name> + </entityProvider> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <conditionProcess>%aditoprj%/entity/DSGVOInfo_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <onDBInsert>%aditoprj%/entity/DSGVOInfo_entity/recordcontainers/db/onDBInsert.js</onDBInsert> + <onDBUpdate>%aditoprj%/entity/DSGVOInfo_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> + <linkInformation> + <linkInformation> + <name>23dd4eb2-0ac4-406e-92e3-031f1342bd05</name> + <tableName>DSGVOINFO</tableName> + <primaryKey>DSGVOINFOID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>CONTACT_ID.value</name> + <recordfield>DSGVOINFO.CONTACT_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATASOURCE.value</name> + <recordfield>DSGVOINFO.DATASOURCE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>RECIPIENT.value</name> + <recordfield>DSGVOINFO.RECIPIENT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DSGVOINFOID.value</name> + <recordfield>DSGVOINFO.DSGVOINFOID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>GARANTEE.value</name> + <recordfield>DSGVOINFO.GARANTEE</recordfield> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/DSGVOInfo_entity/entityfields/contact_id/valueProcess.js b/entity/DSGVOInfo_entity/entityfields/contact_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b7984c4ac33b1ccaedca82a93ead218a6ecd6f51 --- /dev/null +++ b/entity/DSGVOInfo_entity/entityfields/contact_id/valueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.vars"); +import("system.neon"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$param.ContactId_param")) +{ + result.string(vars.get("$param.ContactId_param")); +} \ No newline at end of file diff --git a/entity/DSGVOInfo_entity/recordcontainers/db/conditionProcess.js b/entity/DSGVOInfo_entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9b24cde593c67d750b3e45c66076b0dc3f66d2f4 --- /dev/null +++ b/entity/DSGVOInfo_entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,9 @@ +import("system.db"); +import("system.result"); +import("Sql_lib"); + +result.string(db.translateCondition( + SqlCondition.begin() + .andPrepareVars("DSGVOINFO.CONTACT_ID", "$param.ContactId_param") + .build())) + \ No newline at end of file diff --git a/entity/DSGVOInfo_entity/recordcontainers/db/onDBInsert.js b/entity/DSGVOInfo_entity/recordcontainers/db/onDBInsert.js new file mode 100644 index 0000000000000000000000000000000000000000..d76463319fd4dd6ea68f82e133a6ebbf293e780f --- /dev/null +++ b/entity/DSGVOInfo_entity/recordcontainers/db/onDBInsert.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("DataPrivacy_lib"); + +if (vars.get("$param.ReportType_param")) + DataPrivacyUtils.openReport(vars.get("$field.CONTACT_ID"), vars.get("$param.ReportType_param")); \ No newline at end of file diff --git a/entity/DSGVOInfo_entity/recordcontainers/db/onDBUpdate.js b/entity/DSGVOInfo_entity/recordcontainers/db/onDBUpdate.js new file mode 100644 index 0000000000000000000000000000000000000000..d76463319fd4dd6ea68f82e133a6ebbf293e780f --- /dev/null +++ b/entity/DSGVOInfo_entity/recordcontainers/db/onDBUpdate.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("DataPrivacy_lib"); + +if (vars.get("$param.ReportType_param")) + DataPrivacyUtils.openReport(vars.get("$field.CONTACT_ID"), vars.get("$param.ReportType_param")); \ No newline at end of file diff --git a/entity/DSGVO_entity/DSGVO_entity.aod b/entity/DSGVO_entity/DSGVO_entity.aod index 380ea04df55e327dd4c62da30124e3e266254c21..a6530524037c77ba0e5d2f1def151ec437ed786f 100644 --- a/entity/DSGVO_entity/DSGVO_entity.aod +++ b/entity/DSGVO_entity/DSGVO_entity.aod @@ -90,7 +90,7 @@ <children> <entityParameter> <name>OrganisationId_param</name> - <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/contactadresses/children/organisationid_param/valueProcess.js</valueProcess> + <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/organisationandcontactadresses/children/organisationid_param/valueProcess.js</valueProcess> </entityParameter> </children> </entityConsumer> @@ -132,12 +132,12 @@ </dependency> </entityConsumer> <entityField> - <name>TYPE</name> + <name>DSGVOTYPE</name> <title>Type</title> <description>What kind of data is being saved, e.g. Mail, Home address</description> <consumer>KeywordDSGVOType</consumer> <state>READONLY</state> - <displayValueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/type/displayValueProcess.js</displayValueProcess> + <displayValueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/dsgvotype/displayValueProcess.js</displayValueProcess> </entityField> <entityParameter> <name>ContactId_param</name> @@ -225,7 +225,7 @@ <name>CONTACT_ID.value</name> </jDitoRecordFieldMapping> <jDitoRecordFieldMapping> - <name>TYPE.value</name> + <name>DSGVOTYPE.value</name> </jDitoRecordFieldMapping> <jDitoRecordFieldMapping> <name>ROW_ID.value</name> @@ -255,7 +255,7 @@ <name>USER_EDIT.value</name> </jDitoRecordFieldMapping> <jDitoRecordFieldMapping> - <name>TYPE.displayValue</name> + <name>DSGVOTYPE.displayValue</name> </jDitoRecordFieldMapping> </recordFieldMappings> </jDitoRecordContainer> diff --git a/entity/DSGVO_entity/entityfields/type/displayValueProcess.js b/entity/DSGVO_entity/entityfields/dsgvotype/displayValueProcess.js similarity index 100% rename from entity/DSGVO_entity/entityfields/type/displayValueProcess.js rename to entity/DSGVO_entity/entityfields/dsgvotype/displayValueProcess.js diff --git a/entity/DSGVO_entity/entityfields/contactadresses/children/organisationid_param/valueProcess.js b/entity/DSGVO_entity/entityfields/organisationandcontactadresses/children/organisationid_param/valueProcess.js similarity index 100% rename from entity/DSGVO_entity/entityfields/contactadresses/children/organisationid_param/valueProcess.js rename to entity/DSGVO_entity/entityfields/organisationandcontactadresses/children/organisationid_param/valueProcess.js diff --git a/entity/DSGVO_entity/entityfields/reports/children/openinforeport/onActionProcess.js b/entity/DSGVO_entity/entityfields/reports/children/openinforeport/onActionProcess.js index 9dd9dbc2a2c74bfed8da7f88388b49263925d1c4..23afc7e82ee3ba730ef78300776e042b03dbc750 100644 --- a/entity/DSGVO_entity/entityfields/reports/children/openinforeport/onActionProcess.js +++ b/entity/DSGVO_entity/entityfields/reports/children/openinforeport/onActionProcess.js @@ -1,4 +1,21 @@ import("system.vars"); import("DataPrivacy_lib"); +import("system.neon"); +import("system.entities"); -DataPrivacyUtils.openReport(vars.get("$param.ContactId_param"), "DSGVO_Information_report"); \ No newline at end of file +var conf = entities.createConfigForLoadingRows() + .entity("DSGVOInfo_entity") + .provider("DSGVOInfos") + .addParameter("ContactId_param", vars.get("$field.CONTACT_ID")); + +var mode = neon.OPERATINGSTATE_NEW; +if (entities.getRowCount(conf) > 0) +{ + mode = neon.OPERATINGSTATE_EDIT; +} + +neon.openContext("DSGVOInfo", "DSGVOInfoEdit_view", null, mode, + { + ContactId_param: vars.get("$field.CONTACT_ID"), + ReportType_param: "DSGVO_Information_report" + }); \ No newline at end of file diff --git a/entity/DSGVO_entity/entityfields/value/contentTypeProcess.js b/entity/DSGVO_entity/entityfields/value/contentTypeProcess.js index af817fdb2a9d5a6121480475175f48ce90e2e087..a96c4d2059fdbcbdb397571422b72ed8da12e7a0 100644 --- a/entity/DSGVO_entity/entityfields/value/contentTypeProcess.js +++ b/entity/DSGVO_entity/entityfields/value/contentTypeProcess.js @@ -5,8 +5,8 @@ import("system.vars"); import("system.neon"); // NOTE: If there are more cases added, consider adding this to DSGVOType keyword as attribute or adding it to DataPrivacy_lib to the Types. -logging.log(vars.get("$field.TYPE")); -switch (vars.get("$field.TYPE").trim()) +logging.log(vars.get("$field.DSGVOTYPE")); +switch (vars.get("$field.DSGVOTYPE").trim()) { case $KeywordRegistry.DSGVOType$birth().trim(): result.string("DATE"); diff --git a/entity/DSGVO_entity/recordcontainers/jdito/onInsert.js b/entity/DSGVO_entity/recordcontainers/jdito/onInsert.js index 956568f269147c11b26322e6139a9bb22f2034d5..bf243418e8533ad06af90db8eca28d4e9272891b 100644 --- a/entity/DSGVO_entity/recordcontainers/jdito/onInsert.js +++ b/entity/DSGVO_entity/recordcontainers/jdito/onInsert.js @@ -7,7 +7,7 @@ var columns = [ "PURPOSE", "ROW_ID", "STATUORITYSOURCE", - "TYPE", + "DSGVOTYPE", "DSGVOID", "USER_NEW", "VALID_TO" @@ -18,7 +18,7 @@ var values = [ vars.get("$field.PURPOSE"), vars.get("$field.ROW_ID"), vars.get("$field.STATUORITYSOURCE"), - vars.get("$field.TYPE"), + vars.get("$field.DSGVOTYPE"), vars.get("$field.UID"), vars.get("$field.USER_NEW"), vars.get("$field.VALID_TO") diff --git a/entity/DSGVO_entity/recordcontainers/jdito/onUpdate.js b/entity/DSGVO_entity/recordcontainers/jdito/onUpdate.js index 17d5c99dfbec026e7a487a2624d3df61c8119b72..e93e6a8c937df1095ea120bc3ab69c5869cc554b 100644 --- a/entity/DSGVO_entity/recordcontainers/jdito/onUpdate.js +++ b/entity/DSGVO_entity/recordcontainers/jdito/onUpdate.js @@ -9,7 +9,7 @@ var columns = [ "PURPOSE", "ROW_ID", "STATUORITYSOURCE", - "TYPE", + "DSGVOTYPE", "USER_NEW", "USER_EDIT", "VALID_TO" @@ -21,7 +21,7 @@ var values = [ vars.get("$field.PURPOSE"), vars.get("$field.ROW_ID"), vars.get("$field.STATUORITYSOURCE"), - vars.get("$field.TYPE"), + vars.get("$field.DSGVOTYPE"), vars.get("$field.USER_NEW"), vars.get("$field.USER_EDIT"), vars.get("$field.VALID_TO") diff --git a/neonContext/DSGVOInfo/DSGVOInfo.aod b/neonContext/DSGVOInfo/DSGVOInfo.aod new file mode 100644 index 0000000000000000000000000000000000000000..90b294b3da79543c447386e2630c3186045d1c10 --- /dev/null +++ b/neonContext/DSGVOInfo/DSGVOInfo.aod @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0"> + <name>DSGVOInfo</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <entity>DSGVOInfo_entity</entity> + <references> + <neonViewReference> + <name>36bb346d-7f9b-4fa7-848c-4674cd195e73</name> + <view>DSGVOInfoEdit_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonView/DSGVOEdit_view/DSGVOEdit_view.aod b/neonView/DSGVOEdit_view/DSGVOEdit_view.aod index 0c4ab8073cd4a1fc31dc75713a8c23ac4f0a7b92..f7dfd445c86ddd8752503796da75b6590c05cee1 100644 --- a/neonView/DSGVOEdit_view/DSGVOEdit_view.aod +++ b/neonView/DSGVOEdit_view/DSGVOEdit_view.aod @@ -16,7 +16,7 @@ <fields> <entityFieldLink> <name>167afc20-3e2c-452d-9300-f5e105bc85e4</name> - <entityField>TYPE</entityField> + <entityField>DSGVOTYPE</entityField> </entityFieldLink> <entityFieldLink> <name>191e8712-abf8-42d8-89d5-649dd0164f56</name> diff --git a/neonView/DSGVOFilter_view/DSGVOFilter_view.aod b/neonView/DSGVOFilter_view/DSGVOFilter_view.aod index 55199a9557eede7ab76f1e00459e9907f4d1f066..4d681a32b698c7121556367b36cd43c360aa28f1 100644 --- a/neonView/DSGVOFilter_view/DSGVOFilter_view.aod +++ b/neonView/DSGVOFilter_view/DSGVOFilter_view.aod @@ -17,7 +17,7 @@ <columns> <neonTableColumn> <name>a09fc7e3-15d9-4739-84df-71f511f4b758</name> - <entityField>TYPE</entityField> + <entityField>DSGVOTYPE</entityField> </neonTableColumn> <neonTableColumn> <name>1d329067-0959-4150-aaa4-ea7887a31ec2</name> diff --git a/neonView/DSGVOInfoEdit_view/DSGVOInfoEdit_view.aod b/neonView/DSGVOInfoEdit_view/DSGVOInfoEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..fe2c94afc1ca30021e56432db7ebcc45ff4992fd --- /dev/null +++ b/neonView/DSGVOInfoEdit_view/DSGVOInfoEdit_view.aod @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>DSGVOInfoEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <isSmall v="true" /> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>Info</name> + <editMode v="true" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>f4ca0248-2945-4bf2-9255-999d5ae710cd</name> + <entityField>CONTACT_ID</entityField> + </entityFieldLink> + <entityFieldLink> + <name>c655e773-4d81-4d11-b014-52da00f54eba</name> + <entityField>DATASOURCE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>75fc7de5-9204-4102-8ecf-5975b1fcbe6a</name> + <entityField>GARANTEE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>0ce09906-6bfe-4f9c-a3d9-7aa76acda2fa</name> + <entityField>RECIPIENT</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/neonView/DSGVOPreviewAnonym_view/DSGVOPreviewAnonym_view.aod b/neonView/DSGVOPreviewAnonym_view/DSGVOPreviewAnonym_view.aod index e676ba48e71f0a720247af7f4ebd48fa14226832..b390eb562804071c7e62edf838e08b37bea1601d 100644 --- a/neonView/DSGVOPreviewAnonym_view/DSGVOPreviewAnonym_view.aod +++ b/neonView/DSGVOPreviewAnonym_view/DSGVOPreviewAnonym_view.aod @@ -21,7 +21,7 @@ </neonTableColumn> <neonTableColumn> <name>53d3702d-faa8-4b06-a50b-0e23e046ab9b</name> - <entityField>TYPE</entityField> + <entityField>DSGVOTYPE</entityField> </neonTableColumn> <neonTableColumn> <name>005e5b03-a3d8-478d-9a7c-7b68a314ffc1</name> diff --git a/neonView/DSGVOPreview_view/DSGVOPreview_view.aod b/neonView/DSGVOPreview_view/DSGVOPreview_view.aod index 1c7f23606cc6691e9ff3b798f1aaaaa5e699bd9b..9613b8764a3760a9b31121ce8bbcc41067ddcd13 100644 --- a/neonView/DSGVOPreview_view/DSGVOPreview_view.aod +++ b/neonView/DSGVOPreview_view/DSGVOPreview_view.aod @@ -16,7 +16,7 @@ <fields> <entityFieldLink> <name>bad933a4-c407-410d-989b-8970e95a035a</name> - <entityField>TYPE</entityField> + <entityField>DSGVOTYPE</entityField> </entityFieldLink> <entityFieldLink> <name>a66196f5-c136-493c-8b82-13cf629f4450</name> diff --git a/process/DataPrivacy_lib/process.js b/process/DataPrivacy_lib/process.js index c360e620bd31d6b8478dfa233f26ab5ad128dc7a..a852495d973b27df32610e5b234a2cd10ea81f7c 100644 --- a/process/DataPrivacy_lib/process.js +++ b/process/DataPrivacy_lib/process.js @@ -106,7 +106,7 @@ DataPrivacyType.get = function(pKey) function _getBirthday(pContactId, pContactIdSaved) { - // Todo Format or set content type + // Todo Format or set content dsgvotype var persData = _selectPersonal(pContactId, pContactIdSaved, ["DATEOFBIRTH"]); return [{ @@ -210,7 +210,7 @@ DataPrivacyUtils.getDSGVO = function(pContactId, pFilterCond) var select = "DSGVOID," + // 0 "CONTACT_ID," + // 1 - "TYPE," + // 2 + "DSGVOTYPE," + // 2 "ROW_ID," + // 3 "''," + // 4 - dummy for value "STATUORITYSOURCE," + // 5 @@ -220,7 +220,7 @@ DataPrivacyUtils.getDSGVO = function(pContactId, pFilterCond) "DATE_EDIT," + // 9 "USER_NEW," + // 10 "USER_EDIT, " + // 11 - KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVOType(), "TYPE") // 12 - type-displayvalue + KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVOType(), "DSGVOTYPE") // 12 - dsgvotype-displayvalue var data = db.table(cond.buildSql("select " + select + " from DSGVO", "1 = 2")); @@ -245,15 +245,15 @@ DataPrivacyUtils.collectAll = function(pContactId, pFilterCond) var currentUser = vars.getString("$sys.user"); var now = vars.getString("$sys.date"); - for (type in DataPrivacyType.get()) + for (dsgvotype in DataPrivacyType.get()) { - // get type object for current type - var type = DataPrivacyType.get(type); - if (type.getValues == undefined) + // get dsgvotype object for current dsgvotype + var dsgvotype = DataPrivacyType.get(dsgvotype); + if (dsgvotype.getValues == undefined) break; - // load all data of the current type - var data = type.getValues(pContactId); + // load all data of the current dsgvotype + var data = dsgvotype.getValues(pContactId); data.forEach(function(pRow) { @@ -261,7 +261,7 @@ DataPrivacyUtils.collectAll = function(pContactId, pFilterCond) var found = false; for (dat in contactDSGVO) { - if (contactDSGVO[dat][2].trim() == type.key && contactDSGVO[dat][3] == pRow.id) + if (contactDSGVO[dat][2].trim() == dsgvotype.key && contactDSGVO[dat][3] == pRow.id) { found = true; // add the loaded view value @@ -276,15 +276,15 @@ DataPrivacyUtils.collectAll = function(pContactId, pFilterCond) var newId = util.getNewUUID(); // insert inserts.push(["DSGVO", - ["DSGVOID", "USER_NEW", "DATE_NEW", "TYPE", "ROW_ID", "CONTACT_ID"], + ["DSGVOID", "USER_NEW", "DATE_NEW", "DSGVOTYPE", "ROW_ID", "CONTACT_ID"], null, - [newId, currentUser, now, type.key, pRow.id, pContactId]]); + [newId, currentUser, now, dsgvotype.key, pRow.id, pContactId]]); // and also insert it in the return data to avoid selecting from DSGVO again returnDSGVOData.push([ newId, // DSGVOID," + // 0 pContactId, // "CONTACT_ID," + // 1 - type.key, // "TYPE," + // 2 + dsgvotype.key, // "DSGVOTYPE," + // 2 pRow.id, // "ROW_ID," + // 3 pRow.value, // "''," + // 4 - value "", // "STATUORITYSOURCE," + // 5 @@ -294,7 +294,7 @@ DataPrivacyUtils.collectAll = function(pContactId, pFilterCond) "", // "DATE_EDIT," + // 9 currentUser, // "USER_NEW," + // 10 "", // "USER_EDIT " // 11 - KeywordUtils.getViewValue($KeywordRegistry.DSGVOType(), StringUtils.toChar36(type.key)), // 12 + KeywordUtils.getViewValue($KeywordRegistry.DSGVOType(), StringUtils.toChar36(dsgvotype.key)), // 12 ]) } }); @@ -334,7 +334,7 @@ DataPrivacyUtils.dataForExport = function(pContactId, pLocale) { var entity = vars.get("$sys.currententityname"); - var fields = ["TYPE", "VALUE", "STATUORITYSOURCE", "PURPOSE", "VALID_TO"]; + var fields = ["DSGVOTYPE", "VALUE", "STATUORITYSOURCE", "PURPOSE", "VALID_TO"]; var config = entities.createConfigForLoadingRows() .entity(entity) .provider("DSGVOEntries") @@ -342,11 +342,11 @@ DataPrivacyUtils.dataForExport = function(pContactId, pLocale) .fields(fields) return [fields, entities.getRows(config).map(function(pRow) { - var type = DataPrivacyType.get(pRow.TYPE); + var dsgvotype = DataPrivacyType.get(pRow.DSGVOTYPE); var newRow = [ - KeywordUtils.getViewValue($KeywordRegistry.DSGVOType(), pRow.TYPE, pLocale), - (type.formatAsDate ? datetime.toDate(pRow.VALUE, translate.text("dd.MM.yyyy", pLocale), "UTC") : pRow.VALUE), + KeywordUtils.getViewValue($KeywordRegistry.DSGVOType(), pRow.DSGVOTYPE, pLocale), + (dsgvotype.formatAsDate ? datetime.toDate(pRow.VALUE, translate.text("dd.MM.yyyy", pLocale), "UTC") : pRow.VALUE), KeywordUtils.getViewValue($KeywordRegistry.DSGVOStatuoritysource(), pRow.STATUORITYSOURCE, pLocale), KeywordUtils.getViewValue($KeywordRegistry.DSGVOPurpose(), pRow.PURPOSE, pLocale), datetime.toDate(pRow.VALID_TO, translate.text("dd.MM.yyyy", pLocale), "UTC"), @@ -401,7 +401,7 @@ DataPrivacyUtils.openReport = function(pPerson, pReportName) // TODO Parameter und Felder // params: adito.image.myLogo, myAddress, address, salutation, dateRequest, deadline, dateSaveTill, transmission, fromOther - // Felder PURPOSE, STATUORITYSOURCE, VALID_TO, TYPE, VALUE + // Felder PURPOSE, STATUORITYSOURCE, VALID_TO, DSGVOTYPE, VALUE var params = { "adito.image.myLogo" : "", @@ -419,7 +419,7 @@ DataPrivacyUtils.openReport = function(pPerson, pReportName) "PURPOSE", "STATUORITYSOURCE", "VALID_TO", - "TYPE", + "DSGVOTYPE", "VALUE" ])); DSGVOReport.addImage("myLogo", imgData[1]);