diff --git a/entity/DSGVO_entity/DSGVO_entity.aod b/entity/DSGVO_entity/DSGVO_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..1c1cfcbb565c986439557e29f7c54d81d39d8939 --- /dev/null +++ b/entity/DSGVO_entity/DSGVO_entity.aod @@ -0,0 +1,247 @@ +<?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.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6"> + <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> + </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>32dd6b4a-8fd0-48ed-b39a-b1bd222b7e88</name> + <tableName>DSGVO</tableName> + <primaryKey>DSGVOID</primaryKey> + <isUIDTable v="false" /> + <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> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/DSGVO_entity/recordcontainers/db/onDBInsert.js b/entity/DSGVO_entity/recordcontainers/db/onDBInsert.js new file mode 100644 index 0000000000000000000000000000000000000000..09754cf5860927f9a6380fa0a8dad7fa1c185b87 --- /dev/null +++ b/entity/DSGVO_entity/recordcontainers/db/onDBInsert.js @@ -0,0 +1,43 @@ +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 vals = [vars.get("$sys.user"), null, util.getNewUUID(), + vars.get("$field.ROW_ID"), vars.get("$sys.date"), vars.get("$field.TABLENAME"), + 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/neonView/DSGVOEdit_view/DSGVOEdit_view.aod b/neonView/DSGVOEdit_view/DSGVOEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..96193f454f7300b569415432801af91085bdc1bf --- /dev/null +++ b/neonView/DSGVOEdit_view/DSGVOEdit_view.aod @@ -0,0 +1,32 @@ +<?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>DSGVOEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <isSmall v="true" /> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>Generic</name> + <editMode v="true" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>c3923993-98fa-484d-bd74-607040917611</name> + <entityField>RIGHT</entityField> + </entityFieldLink> + <entityFieldLink> + <name>4108c82d-0359-44d5-bf76-6632f96852a5</name> + <entityField>USE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>a9e1245c-7798-4170-9f2f-2e33f61cd6aa</name> + <entityField>VALID_TO</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/neonView/DSGVOFilter_view/DSGVOFilter_view.aod b/neonView/DSGVOFilter_view/DSGVOFilter_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..39bb9ed2a99c3d4b3780468370729d56e5953da1 --- /dev/null +++ b/neonView/DSGVOFilter_view/DSGVOFilter_view.aod @@ -0,0 +1,45 @@ +<?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>DSGVOFilter_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <tableViewTemplate> + <name>Table</name> + <favoriteActionGroup1>DSGVOActions</favoriteActionGroup1> + <favoriteActionGroup2>Reports</favoriteActionGroup2> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>76d31355-bdff-4b4c-a61c-285ed96c6721</name> + <entityField>ROW_ID</entityField> + <width v="75" /> + <expandRatio v="100" /> + </neonTableColumn> + <neonTableColumn> + <name>ad9e414f-4f0f-4efb-887a-468e7a9fefb5</name> + <entityField>RIGHT</entityField> + <width v="75" /> + <expandRatio v="100" /> + </neonTableColumn> + <neonTableColumn> + <name>b9a96821-ed98-44e8-b1d9-c5577c53bf72</name> + <entityField>USE</entityField> + <width v="75" /> + <expandRatio v="100" /> + </neonTableColumn> + <neonTableColumn> + <name>ae9f07de-c29e-4d14-97a1-a01e47c84cbd</name> + <entityField>VALID_TO</entityField> + <width v="75" /> + <expandRatio v="100" /> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView> diff --git a/neonView/DSGVOPreviewAnonym_view/DSGVOPreviewAnonym_view.aod b/neonView/DSGVOPreviewAnonym_view/DSGVOPreviewAnonym_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..5609766c06a31201575f0b1ee1510c62aa823411 --- /dev/null +++ b/neonView/DSGVOPreviewAnonym_view/DSGVOPreviewAnonym_view.aod @@ -0,0 +1,25 @@ +<?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>DSGVOPreviewAnonym_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <isSmall v="true" /> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <tableViewTemplate> + <name>Table</name> + <entityField>CONTACT_ID</entityField> + <columns> + <neonTableColumn> + <name>9049aad8-2900-4c29-aa2e-c6de2d21c6e7</name> + <entityField>ROW_ID</entityField> + <width v="10" /> + <expandRatio v="15" /> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView>