Skip to content
Snippets Groups Projects
Commit 0efa7126 authored by Andre Loreth's avatar Andre Loreth
Browse files

#1051579: Implement DSGVOReport context

parent 733fbec7
No related branches found
No related tags found
No related merge requests found
<?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.13" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.13">
<name>DSGVOReport_entity</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<recordContainer>recordContainer</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
</entityProvider>
<entityParameter>
<name>ContactID_param</name>
<expose v="true" />
<mandatory v="false" />
</entityParameter>
<entityParameter>
<name>ReportName_param</name>
<expose v="true" />
<mandatory v="false" />
</entityParameter>
<entityParameter>
<name>DSGVOInfo_param</name>
<title></title>
<expose v="true" />
<mandatory v="false" />
<description></description>
</entityParameter>
<entityField>
<name>REPORT_DATA</name>
<valueProcess>%aditoprj%/entity/DSGVOReport_entity/entityfields/report_data/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>UID</name>
</entityField>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
<name>recordContainer</name>
<jDitoRecordAlias>Data_alias</jDitoRecordAlias>
<contentProcess>%aditoprj%/entity/DSGVOReport_entity/recordcontainers/recordcontainer/contentProcess.js</contentProcess>
<recordFieldMappings>
<jDitoRecordFieldMapping>
<name>UID.value</name>
</jDitoRecordFieldMapping>
</recordFieldMappings>
</jDitoRecordContainer>
</recordContainers>
</entity>
import("system.result");
import("system.vars");
import("system.logging");
import("DataPrivacy_lib")
result.string(DataPrivacyUtils.buildReport(vars.get("$param.ContactID_param"), vars.get("$param.ReportName_param"), JSON.parse(vars.get("$param.DSGVOInfo_param"))));
\ No newline at end of file
import("system.result");
result.object([["1"]]);
\ No newline at end of file
......@@ -16,6 +16,6 @@ if (entities.getRowCount(conf) > 0)
neon.openContext("DSGVOInfo", "DSGVOInfoEdit_view", null, mode,
{
ContactId_param: vars.get("$field.CONTACT_ID"),
ReportType_param: "DSGVO_Information_report"
"param.ContactId_param": vars.get("$field.CONTACT_ID"),
"param.ReportType_param": "DSGVO_Information_report"
});
\ No newline at end of file
<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.1">
<name>DSGVOReport</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<entity>DSGVOReport_entity</entity>
<references>
<neonViewReference>
<name>20227ee7-acc3-442b-a89a-5512179c0cdf</name>
<view>DSGVOReport_view</view>
</neonViewReference>
</references>
</neonContext>
<?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.4" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.4">
<name>DSGVOReport_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<children>
<reportViewTemplate>
<name>Report</name>
<reportData>REPORT_DATA</reportData>
<entityField>#ENTITY</entityField>
</reportViewTemplate>
</children>
</neonView>
......@@ -557,6 +557,18 @@ DataPrivacyUtils.DisclosureReportName = function() {
* @param {String} pLocale the locale to translate to
*/
DataPrivacyUtils.openReport = function(pContactId, pReportName, pDSGVOInfo, pLocale)
{
neon.openContext("DSGVOReport", "DSGVOReport_view", [], neon.OPERATINGSTATE_VIEW, {
"param.ReportName_param": pReportName,
"param.ContactID_param": pContactId,
"param.DSGVOInfo_param": JSON.stringify(pDSGVOInfo)
});
}
/**
* Will build the DSGVO disclosure report.
*/
DataPrivacyUtils.buildReport = function (pContactId, pReportName, pDSGVOInfo, pLocale)
{
if (pLocale == undefined)
pLocale = vars.get("$sys.clientlocale");
......@@ -659,7 +671,8 @@ Muster-Datenschutzberatung";
DSGVOReport.setReportData(ReportData.begin(dsgvoData[0]).add(dsgvoData[1]));
DSGVOReport.addImage("myLogo", imgData[1]);
DSGVOReport.addReportParams(params);
DSGVOReport.openReport();
return DSGVOReport.exportReport();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment