Skip to content
Snippets Groups Projects
Commit fc5302e9 authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

Merge branch '#1058762-DistrictResponsibleAtOrgPers' into '2020.2.0'

#1058762: Display district responsibles in PersonMain_view.

See merge request xrm/basic!412
parents 15494d2f 76c06585
No related branches found
No related tags found
No related merge requests found
Showing
with 63 additions and 36 deletions
......@@ -6,6 +6,7 @@
<icon>VAADIN:GLOBE</icon>
<title>District Responsible</title>
<contentTitleProcess>%aditoprj%/entity/DistrictResponsible_entity/contentTitleProcess.js</contentTitleProcess>
<iconIdProcess>%aditoprj%/entity/DistrictResponsible_entity/iconIdProcess.js</iconIdProcess>
<image>VAADIN:GLOBE</image>
<recordContainer>db</recordContainer>
<entityFields>
......@@ -164,6 +165,12 @@
<fieldName>DistrictResponsibles</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>2b3318a3-4925-4aa8-bf6e-bc5489549327</name>
<entityName>Person_entity</entityName>
<fieldName>DistrictResponsibles</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
......
import("system.vars");
import("system.result");
var res = "TEXT:" + vars.get("$field.EMPLOYEE_CONTACT_ID.displayValue");
result.string(res);
\ No newline at end of file
import("system.logging");
import("system.result");
import("Contact_lib");
import("Sql_lib");
var contact = Contact.createWithColumnPreset();
var renderer = new ContactTitleRenderer(contact, ContactTitleRenderer.OPTIONS.NoOption);
var selectExpression = renderer.asSql();
result.string(newSelect(selectExpression));
\ No newline at end of file
var res = ContactUtils.getResolvingDisplaySubSql("DISTRICTRESPONSIBLE.EMPLOYEE_CONTACT_ID", false);
result.string(res);
\ No newline at end of file
......@@ -1365,6 +1365,22 @@
</entityParameter>
</children>
</entityProvider>
<entityConsumer>
<name>DistrictResponsibles</name>
<state>INVISIBLE</state>
<stateProcess>%aditoprj%/entity/Person_entity/entityfields/districtresponsibles/stateProcess.js</stateProcess>
<dependency>
<name>dependency</name>
<entityName>DistrictResponsible_entity</entityName>
<fieldName>OrganisationResponsibles</fieldName>
</dependency>
<children>
<entityParameter>
<name>OrgUid_param</name>
<valueProcess>%aditoprj%/entity/Person_entity/entityfields/districtresponsibles/children/orguid_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.result");
import("system.vars");
if (vars.exists("$field.ORGANISATION_CONTACTID") && vars.get("$field.ORGANISATION_CONTACTID"))
{
result.string(vars.get("$field.ORGANISATION_CONTACTID"));
}
\ No newline at end of file
import("Employee_lib");
import("system.result");
import("system.vars");
import("system.neon");
if (vars.get("$field.ORGANISATION_CONTACTID") && !EmployeeUtils.isUser(vars.get("$field.CONTACTID")))
{
result.string(neon.COMPONENTSTATE_EDITABLE);
}
\ No newline at end of file
......@@ -9304,7 +9304,7 @@ Bitte Datumseingabe prüfen</value>
</entry>
<entry>
<key>District Responsible</key>
<value>Gebietsverantwortlicher</value>
<value>Gebietsverantwortliche</value>
</entry>
<entry>
<key>Responsibles</key>
......
......@@ -67,9 +67,5 @@
<name>0b052872-d6b4-41ac-ad0b-580575893e1b</name>
<view>OrganisationLesserNoiseTable_view</view>
</neonViewReference>
<neonViewReference>
<name>2193fe84-ff57-4382-8200-5d1d846f455c</name>
<view>OrganisationDistrictResponsibles_view</view>
</neonViewReference>
</references>
</neonContext>
......@@ -20,7 +20,12 @@
<isCreatable v="false" />
<isDeletable v="false" />
<isEditable v="false" />
<title>Responsibles</title>
<columns>
<neonTableColumn>
<name>785ec0b8-e71d-4766-a03e-f125a465aa58</name>
<entityField>#ICON</entityField>
</neonTableColumn>
<neonTableColumn>
<name>158f589a-497f-4522-9b43-d7a6155c6818</name>
<entityField>DISTRICT_ID</entityField>
......
<?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.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6">
<name>OrganisationDistrictResponsibles_view</name>
<title>Responsibles</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<noneLayout>
<name>layout</name>
</noneLayout>
</layout>
<children>
<neonViewReference>
<name>a698babd-271c-4f21-94f7-391f4ad80877</name>
<entityField>DistrictResponsibles</entityField>
<view>DistrictResponsibleList_view</view>
</neonViewReference>
</children>
</neonView>
......@@ -55,16 +55,16 @@
<entityField>#ENTITY</entityField>
<view>OrganisationAttributeRestriction_view</view>
</neonViewReference>
<neonViewReference>
<name>a806bf0f-6214-4aad-872b-74e6f7fd1ee5</name>
<entityField>DistrictResponsibles</entityField>
<view>DistrictResponsibleList_view</view>
</neonViewReference>
<neonViewReference>
<name>eba90ed2-5e55-4cdb-9e0b-5a09feeb7536</name>
<entityField>Documents</entityField>
<view>DocumentFilter_view</view>
</neonViewReference>
<neonViewReference>
<name>db26269b-32ae-47da-ba22-41e0a5952103</name>
<entityField>#ENTITY</entityField>
<view>OrganisationDistrictResponsibles_view</view>
</neonViewReference>
<neonViewReference>
<name>0686ad7e-8dc7-4b10-9df2-bf066ae3a310</name>
<entityField>LogHistories</entityField>
......
......@@ -49,6 +49,11 @@
<entityField>Districts</entityField>
<view>DistrictList_view</view>
</neonViewReference>
<neonViewReference>
<name>19a5f9ed-228d-4352-9e82-e7aa690648e9</name>
<entityField>DistrictResponsibles</entityField>
<view>DistrictResponsibleList_view</view>
</neonViewReference>
<neonViewReference>
<name>4b50b784-484f-4cdf-a705-4c356da763fa</name>
<entityField>Documents</entityField>
......
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