Skip to content
Snippets Groups Projects
Commit 2c231136 authored by Gerhard Bachmaier's avatar Gerhard Bachmaier
Browse files

1066189: Gebiet: Administratives Prüf-Cockpit

parent 4f6fd4cc
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,6 @@
<majorModelMode>DISTRIBUTED</majorModelMode>
<icon>VAADIN:GLOBE</icon>
<title>District Contact</title>
<initFilterProcess>%aditoprj%/entity/DistrictContact_entity/initFilterProcess.js</initFilterProcess>
<iconIdProcess>%aditoprj%/entity/DistrictContact_entity/iconIdProcess.js</iconIdProcess>
<image>VAADIN:GLOBE</image>
<titlePlural>District Contacts</titlePlural>
......@@ -22,7 +21,7 @@
<title>Company</title>
<consumer>Organisations</consumer>
<groupable v="true" />
<linkedContext>Person</linkedContext>
<linkedContext>Organisation</linkedContext>
<state>READONLY</state>
<valueProcess>%aditoprj%/entity/DistrictContact_entity/entityfields/contact_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/DistrictContact_entity/entityfields/contact_id/displayValueProcess.js</displayValueProcess>
......@@ -213,6 +212,10 @@
</entityActionField>
</children>
</entityActionGroup>
<entityParameter>
<name>isDashletView_param</name>
<expose v="true" />
</entityParameter>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("Contact_lib");
import("Employee_lib");
import("Keyword_lib");
import("KeywordRegistry_basic");
import("system.result");
import("system.vars");
import("system.neon");
if (vars.get("$sys.presentationmode") == neon.CONTEXT_PRESENTATIONMODE_DASHBOARD)
{
var statusInReview = $KeywordRegistry.contactStatus$inReview();
var districtOrigin = $KeywordRegistry.districtOrigin$auto();
var currentContactId = EmployeeUtils.getCurrentContactId();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "EQUAL",
contenttype: "TEXT",
key: statusInReview,
value: KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), statusInReview)
},
{
type: "row",
name: "ORIGIN",
operator: "EQUAL",
contenttype: "TEXT",
key: districtOrigin,
value: KeywordUtils.getViewValue($KeywordRegistry.districtOrigin(), districtOrigin)
},
{
type: "row",
name: "ADVISER_CONTACT_ID",
operator: "EQUAL",
contenttype: "TEXT",
key: currentContactId,
value: ContactUtils.getFullTitleByContactId(currentContactId, false)
}]
};
result.string(JSON.stringify(filter));
}
import("KeywordRegistry_basic");
import("Employee_lib");
import("system.entities");
import("system.result");
import("system.vars");
import("Sql_lib");
var isDashletView = vars.get("$param.isDashletView_param");
var organisationID = vars.get("$param.currentOrganisationId_param");
var cond = newWhere();
......@@ -18,4 +21,15 @@ if (organisationID)
cond.and("DISTRICTCONTACT.CONTACT_ID", organisationID);
}
if(isDashletView)
{
var statusInReview = $KeywordRegistry.contactStatus$inReview();
var districtOrigin = $KeywordRegistry.districtOrigin$auto();
var currentContactId = EmployeeUtils.getCurrentContactId();
cond.and("DISTRICTCONTACT.STATUS", statusInReview);
cond.and("DISTRICTCONTACT.ORIGIN", districtOrigin);
cond.and("DISTRICTCONTACT.ADVISER_CONTACT_ID", currentContactId);
}
result.string(cond.toString());
\ No newline at end of file
......@@ -16,6 +16,12 @@
<title>District</title>
</neonDashletCategory>
</categories>
<parameters>
<neonDashletParameter>
<name>isDashletView_param</name>
<value>true</value>
</neonDashletParameter>
</parameters>
</neonDashletConfiguration>
</dashletConfigurations>
<layout>
......
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