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

[Projekt: Entwicklung - Neon][TicketNr.: 1029627][Preview Kontakt: Standard-Kommunikationsadresse]

unified different commviews
parent 89a48621
No related branches found
No related tags found
No related merge requests found
Showing
with 665 additions and 910 deletions
<?xml version="1.0" encoding="UTF-8"?> <?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.0.5" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.0.5"> <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.5" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.0.5">
<name>Comm_entity</name> <name>Comm_entity</name>
<title>Communication</title> <title>Communication</title>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<recordContainerType>DB</recordContainerType> <recordContainerType>DB</recordContainerType>
<alias>Data_alias</alias> <recordContainer>db</recordContainer>
<conditionProcess>%aditoprj%/entity/Comm_entity/conditionProcess.js</conditionProcess> <entityFields>
<orderClauseProcess>%aditoprj%/entity/Comm_entity/orderClauseProcess.js</orderClauseProcess> <entityField>
<recordContainer>db</recordContainer> <name>ADDR</name>
<linkInformation> <title>${COMM_ADDRESS}</title>
<linkInformation> <tableName>COMM</tableName>
<name>54875441-f1b0-47d1-9fa6-c1927863f3e3</name> <columnName>ADDR</columnName>
<tableName>COMM</tableName> <contentTypeProcess>%aditoprj%/entity/Comm_entity/entityfields/addr/contentTypeProcess.js</contentTypeProcess>
<primaryKey>COMMID</primaryKey> <onValidation>%aditoprj%/entity/Comm_entity/entityfields/addr/onValidation.js</onValidation>
<isUIDTable v="true" /> </entityField>
</linkInformation> <entityField>
</linkInformation> <name>COMMID</name>
<entityFields> <tableName>COMM</tableName>
<entityField> <columnName>COMMID</columnName>
<name>ADDR</name> <valueProcess>%aditoprj%/entity/Comm_entity/entityfields/commid/valueProcess.js</valueProcess>
<title>${COMM_ADDRESS}</title> </entityField>
<tableName>COMM</tableName> <entityField>
<columnName>ADDR</columnName> <name>DATE_EDIT</name>
<contentTypeProcess>%aditoprj%/entity/Comm_entity/entityfields/addr/contentTypeProcess.js</contentTypeProcess> <tableName>COMM</tableName>
<onValidation>%aditoprj%/entity/Comm_entity/entityfields/addr/onValidation.js</onValidation> <columnName>DATE_EDIT</columnName>
</entityField> </entityField>
<entityField> <entityField>
<name>COMMID</name> <name>DATE_NEW</name>
<tableName>COMM</tableName> <tableName>COMM</tableName>
<columnName>COMMID</columnName> <columnName>DATE_NEW</columnName>
<valueProcess>%aditoprj%/entity/Comm_entity/entityfields/commid/valueProcess.js</valueProcess> <state>READONLY</state>
</entityField> <valueProcess>%aditoprj%/entity/Comm_entity/entityfields/date_new/valueProcess.js</valueProcess>
<entityField> </entityField>
<name>DATE_EDIT</name> <entityField>
<tableName>COMM</tableName> <name>MEDIUM_ID</name>
<columnName>DATE_EDIT</columnName> <title>Medium</title>
</entityField> <tableName>COMM</tableName>
<entityField> <columnName>MEDIUM_ID</columnName>
<name>DATE_NEW</name> <possibleItemsProcess>%aditoprj%/entity/Comm_entity/entityfields/medium_id/possibleItemsProcess.js</possibleItemsProcess>
<tableName>COMM</tableName> <valueProcess>%aditoprj%/entity/Comm_entity/entityfields/medium_id/valueProcess.js</valueProcess>
<columnName>DATE_NEW</columnName> </entityField>
<state>READONLY</state> <entityField>
<valueProcess>%aditoprj%/entity/Comm_entity/entityfields/date_new/valueProcess.js</valueProcess> <name>RELATION_ID</name>
</entityField> <tableName>COMM</tableName>
<entityField> <columnName>RELATION_ID</columnName>
<name>MEDIUM_ID</name> <valueProcess>%aditoprj%/entity/Comm_entity/entityfields/relation_id/valueProcess.js</valueProcess>
<title>Medium</title> </entityField>
<tableName>COMM</tableName> <entityField>
<columnName>MEDIUM_ID</columnName> <name>STANDARD</name>
<possibleItemsProcess>%aditoprj%/entity/Comm_entity/entityfields/medium_id/possibleItemsProcess.js</possibleItemsProcess> <tableName>COMM</tableName>
<valueProcess>%aditoprj%/entity/Comm_entity/entityfields/medium_id/valueProcess.js</valueProcess> <columnName>STANDARD</columnName>
</entityField> </entityField>
<entityField> <entityField>
<name>RELATION_ID</name> <name>USER_EDIT</name>
<tableName>COMM</tableName> <tableName>COMM</tableName>
<columnName>RELATION_ID</columnName> <columnName>USER_EDIT</columnName>
<valueProcess>%aditoprj%/entity/Comm_entity/entityfields/relation_id/valueProcess.js</valueProcess> </entityField>
</entityField> <entityField>
<entityField> <name>USER_NEW</name>
<name>STANDARD</name> <tableName>COMM</tableName>
<tableName>COMM</tableName> <columnName>USER_NEW</columnName>
<columnName>STANDARD</columnName> <state>READONLY</state>
</entityField> <valueProcess>%aditoprj%/entity/Comm_entity/entityfields/user_new/valueProcess.js</valueProcess>
<entityField> </entityField>
<name>USER_EDIT</name> <entityParameter>
<tableName>COMM</tableName> <name>RelId_param</name>
<columnName>USER_EDIT</columnName> <expose v="true" />
</entityField> <description>This parameter is used for specifing a related &amp;quot;RELATIONID&amp;quot; to a COMM-entry.
<entityField> Usually this is used for filtering COMM-entires by a specified contact or creating a new entry that is related to a contact.</description>
<name>USER_NEW</name> </entityParameter>
<tableName>COMM</tableName> <entityField>
<columnName>USER_NEW</columnName> <name>IS_STANDARD</name>
<state>READONLY</state> <contentType>BOOLEAN</contentType>
<valueProcess>%aditoprj%/entity/Comm_entity/entityfields/user_new/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/Comm_entity/entityfields/is_standard/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityParameter> <entityIncomingField>
<name>RelId_param</name> <name>#INCOMING</name>
<expose v="true" /> <recordContainer>db</recordContainer>
<description>This parameter is used for specifing a related &amp;quot;RELATIONID&amp;quot; to a COMM-entry. </entityIncomingField>
Usually this is used for filtering COMM-entires by a specified contact or creating a new entry that is related to a contact.</description> <entityParameter>
</entityParameter> <name>RelationsMainCountry_param</name>
<entityField> <code>%aditoprj%/entity/Comm_entity/entityfields/relationsmaincountry_param/code.js</code>
<name>IS_STANDARD</name> <mandatory v="false" />
<contentType>BOOLEAN</contentType> <description>PARAMETER</description>
<valueProcess>%aditoprj%/entity/Comm_entity/entityfields/is_standard/valueProcess.js</valueProcess> </entityParameter>
</entityField> <entityIncomingField>
<entityParameter> <name>OrgComm_dfi</name>
<name>MediumCategoriesFilter_param</name> <fieldType>DEPENDENCY_IN</fieldType>
<expose v="true" /> <recordContainer>db</recordContainer>
<mandatory v="false" /> <dependencies>
<description>This param is used for filtering the categories of MEDIUM_IDs. For example share mobile-phone and in-house-telephone the same category (it&amp;apos;s a telephone-number). <entityDependency>
So, for only showing telephone-types you&amp;apos;ve to specify this parameter with it&amp;apos;s phone-number-category. <name>070b2457-3766-4c8a-b43f-a2bf7c9ef638</name>
</description> <entityName>Org_entity</entityName>
</entityParameter> <fieldName>OrgComm_dfo</fieldName>
<entityIncomingField> <isOutgoing v="false" />
<name>#INCOMING</name> </entityDependency>
<recordContainer>db</recordContainer> </dependencies>
</entityIncomingField> </entityIncomingField>
<entityParameter> <entityIncomingField>
<name>RelationsMainCountry_param</name> <name>PersComm_dfi</name>
<code>%aditoprj%/entity/Comm_entity/entityfields/relationsmaincountry_param/code.js</code> <fieldType>DEPENDENCY_IN</fieldType>
<mandatory v="false" /> <recordContainer>db</recordContainer>
<description>PARAMETER</description> <dependencies>
</entityParameter> <entityDependency>
</entityFields> <name>e54350c7-b9a6-4f7a-ac35-506922f3964b</name>
<recordContainers> <entityName>Pers_entity</entityName>
<dbRecordContainer> <fieldName>PersComm_dfo</fieldName>
<name>db</name> <isOutgoing v="false" />
<alias>Data_alias</alias> </entityDependency>
<conditionProcess>%aditoprj%/entity/Comm_entity/recordcontainers/db/conditionProcess.js</conditionProcess> </dependencies>
<orderClauseProcess>%aditoprj%/entity/Comm_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> </entityIncomingField>
<linkInformation> </entityFields>
<linkInformation> <recordContainers>
<name>e3567770-187a-4366-bb87-fb22ff7ff257</name> <dbRecordContainer>
<tableName>COMM</tableName> <name>db</name>
<primaryKey>COMMID</primaryKey> <alias>Data_alias</alias>
<isUIDTable v="true" /> <conditionProcess>%aditoprj%/entity/Comm_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<readonly v="false" /> <orderClauseProcess>%aditoprj%/entity/Comm_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
</linkInformation> <linkInformation>
</linkInformation> <linkInformation>
<recordFieldMappings> <name>e3567770-187a-4366-bb87-fb22ff7ff257</name>
<dbRecordFieldMapping> <tableName>COMM</tableName>
<name>ADDR.value</name> <primaryKey>COMMID</primaryKey>
<value>COMM.ADDR</value> <isUIDTable v="true" />
</dbRecordFieldMapping> <readonly v="false" />
<dbRecordFieldMapping> </linkInformation>
<name>MEDIUM_ID.value</name> </linkInformation>
<value>COMM.MEDIUM_ID</value> <recordFieldMappings>
</dbRecordFieldMapping> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>ADDR.value</name>
<name>COMMID.value</name> <value>COMM.ADDR</value>
<value>COMM.COMMID</value> </dbRecordFieldMapping>
</dbRecordFieldMapping> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>MEDIUM_ID.value</name>
<name>RELATION_ID.value</name> <value>COMM.MEDIUM_ID</value>
<value>COMM.RELATION_ID</value> </dbRecordFieldMapping>
</dbRecordFieldMapping> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>COMMID.value</name>
<name>DATE_EDIT.value</name> <value>COMM.COMMID</value>
<value>COMM.DATE_EDIT</value> </dbRecordFieldMapping>
</dbRecordFieldMapping> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>RELATION_ID.value</name>
<name>STANDARD.value</name> <value>COMM.RELATION_ID</value>
<value>COMM.STANDARD</value> </dbRecordFieldMapping>
</dbRecordFieldMapping> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>DATE_EDIT.value</name>
<name>DATE_NEW.value</name> <value>COMM.DATE_EDIT</value>
<value>COMM.DATE_NEW</value> </dbRecordFieldMapping>
</dbRecordFieldMapping> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>STANDARD.value</name>
<name>USER_EDIT.value</name> <value>COMM.STANDARD</value>
<value>COMM.USER_EDIT</value> </dbRecordFieldMapping>
</dbRecordFieldMapping> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>DATE_NEW.value</name>
<name>USER_NEW.value</name> <value>COMM.DATE_NEW</value>
<value>COMM.USER_NEW</value> </dbRecordFieldMapping>
</dbRecordFieldMapping> <dbRecordFieldMapping>
</recordFieldMappings> <name>USER_EDIT.value</name>
</dbRecordContainer> <value>COMM.USER_EDIT</value>
</recordContainers> </dbRecordFieldMapping>
</entity> <dbRecordFieldMapping>
<name>USER_NEW.value</name>
<value>COMM.USER_NEW</value>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
</entity>
import("system.db");
import("system.result");
import("Sql_lib");
import("Keyword_lib");
var relId, cond;
cond = new SqlCondition();
cond.andPrepareVars("COMM.RELATION_ID", "$param.RelId_param");
if (vars.exists("$param.MediumCategoriesFilter_param")){
mediumCategories = vars.get("$param.MediumCategoriesFilter_param");
if (mediumCategories != null && mediumCategories != "") {
mediumCategories = text.decodeMS(mediumCategories);
var kwd = KeywordUtils.createKeyword("COMM.MEDIUM");
kwd.filter(function(id, name, customs){
return mediumCategories.indexOf(customs.category) > -1;
});
mediumIds = kwd.toArray("id");
if (mediumIds.length == 0)
throw new Error();//TODO: add message
cond.and("COMM.MEDIUM_ID in (" + mediumIds.join(", ") + ")");
}
}
result.string(db.translateCondition(cond.build("1 = 2")));
\ No newline at end of file
import("system.text"); import("system.text");
import("system.vars"); import("system.vars");
import("system.result"); import("system.result");
import("Keyword_lib"); import("Keyword_lib");
var mediumCategories, kwd, items; var items = KeywordUtils.getStandardArray("COMM.MEDIUM");
result.object(items);
if (vars.exists("$param.MediumCategoriesFilter_param") && (mediumCategories = vars.get("$param.MediumCategoriesFilter_param")) != ""){
mediumCategories = text.decodeMS(mediumCategories);
kwd = KeywordUtils.createKeyword("COMM.MEDIUM");
kwd.filter(function(id, name, customs){
return mediumCategories.indexOf(customs.category) > -1;
});
items = kwd.toArray();
}
else {
items = KeywordUtils.getStandardArray("COMM.MEDIUM");
}
result.object(items);
import("system.result");
import("system.db");
result.object({"COMM.MEDIUM_ID": db.ASCENDING});
\ No newline at end of file
import("system.db"); import("system.db");
import("system.result"); import("system.result");
import("Sql_lib"); import("Sql_lib");
import("Keyword_lib"); import("Keyword_lib");
var relId, cond; var cond = new SqlCondition();
cond = new SqlCondition(); cond.andPrepareVars("COMM.RELATION_ID", "$param.RelId_param");
cond.andPrepareVars("COMM.RELATION_ID", "$param.RelId_param");
if (vars.exists("$param.MediumCategoriesFilter_param")){
mediumCategories = vars.get("$param.MediumCategoriesFilter_param");
if (mediumCategories != null && mediumCategories != "") {
mediumCategories = text.decodeMS(mediumCategories);
var kwd = KeywordUtils.createKeyword("COMM.MEDIUM");
kwd.filter(function(id, name, customs){
return mediumCategories.indexOf(customs.category) > -1;
});
mediumIds = kwd.toArray("id");
if (mediumIds.length == 0)
throw new Error();//TODO: add message
cond.and("COMM.MEDIUM_ID in (" + mediumIds.join(", ") + ")");
}
}
result.string(db.translateCondition([cond.toString("1 = 2"), cond.preparedValues])); result.string(db.translateCondition([cond.toString("1 = 2"), cond.preparedValues]));
\ No newline at end of file
This diff is collapsed.
import("system.text");
import("system.result");
result.string(text.encodeMS(["EMAIL"]));
import("system.result");
import("system.vars");
result.string(vars.get("$field.RELATIONID"));
\ No newline at end of file
import("system.text");
import("system.result");
result.string(text.encodeMS(["OTHER"]));
import("system.result");
import("system.vars");
result.string(vars.get("$field.RELATIONID"));
\ No newline at end of file
import("system.text");
import("system.result");
result.string(text.encodeMS(["PHONE"]));
import("system.result");
import("system.vars");
result.string(vars.get("$field.RELATIONID"));
\ No newline at end of file
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
<dependency> <dependency>
<name>dependency</name> <name>dependency</name>
<entityName>Comm_entity</entityName> <entityName>Comm_entity</entityName>
<fieldName>#INCOMING</fieldName> <fieldName>PersComm_dfi</fieldName>
</dependency> </dependency>
<children> <children>
<entityParameter> <entityParameter>
...@@ -307,72 +307,6 @@ ...@@ -307,72 +307,6 @@
<fieldName>Org_dfi</fieldName> <fieldName>Org_dfi</fieldName>
</dependency> </dependency>
</entityOutgoingField> </entityOutgoingField>
<entityOutgoingField>
<name>PersCommPhone_dfo</name>
<title>Communication Phone</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>Comm_entity</entityName>
<fieldName>#INCOMING</fieldName>
</dependency>
<children>
<entityParameter>
<name>RelId_param</name>
<code>%aditoprj%/entity/Pers_entity/entityfields/perscommphone_dfo/children/relid_param/code.js</code>
<triggerRecalculation v="true" />
</entityParameter>
<entityParameter>
<name>MediumCategoriesFilter_param</name>
<code>%aditoprj%/entity/Pers_entity/entityfields/perscommphone_dfo/children/mediumcategoriesfilter_param/code.js</code>
<triggerRecalculation v="true" />
</entityParameter>
</children>
</entityOutgoingField>
<entityOutgoingField>
<name>PersCommEmail_dfo</name>
<title>Communication E-Mail</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>Comm_entity</entityName>
<fieldName>#INCOMING</fieldName>
</dependency>
<children>
<entityParameter>
<name>RelId_param</name>
<code>%aditoprj%/entity/Pers_entity/entityfields/perscommemail_dfo/children/relid_param/code.js</code>
<triggerRecalculation v="true" />
</entityParameter>
<entityParameter>
<name>MediumCategoriesFilter_param</name>
<code>%aditoprj%/entity/Pers_entity/entityfields/perscommemail_dfo/children/mediumcategoriesfilter_param/code.js</code>
<triggerRecalculation v="true" />
</entityParameter>
</children>
</entityOutgoingField>
<entityOutgoingField>
<name>PersCommOthers_dfo</name>
<title>Communication Other</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>Comm_entity</entityName>
<fieldName>#INCOMING</fieldName>
</dependency>
<children>
<entityParameter>
<name>RelId_param</name>
<code>%aditoprj%/entity/Pers_entity/entityfields/perscommothers_dfo/children/relid_param/code.js</code>
<triggerRecalculation v="true" />
</entityParameter>
<entityParameter>
<name>MediumCategoriesFilter_param</name>
<code>%aditoprj%/entity/Pers_entity/entityfields/perscommothers_dfo/children/mediumcategoriesfilter_param/code.js</code>
<triggerRecalculation v="true" />
</entityParameter>
</children>
</entityOutgoingField>
<entityOutgoingField> <entityOutgoingField>
<name>PersContract_dfo</name> <name>PersContract_dfo</name>
<fieldType>DEPENDENCY_OUT</fieldType> <fieldType>DEPENDENCY_OUT</fieldType>
......
import("system.text");
import("system.result");
result.string(text.encodeMS(["EMAIL"]));
import("system.result");
import("system.vars");
result.string(vars.get("$field.RELATIONID"));
\ No newline at end of file
import("system.text");
import("system.result");
result.string(text.encodeMS(["OTHER"]));
import("system.result");
import("system.vars");
result.string(vars.get("$field.RELATIONID"));
\ No newline at end of file
import("system.text");
import("system.result");
result.string(text.encodeMS(["PHONE"]));
import("system.result");
import("system.vars");
result.string(vars.get("$field.RELATIONID"));
\ No newline at end of file
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
<descriptionField>CUSTOMERCODE_DISPLAY_fieldGroup</descriptionField> <descriptionField>CUSTOMERCODE_DISPLAY_fieldGroup</descriptionField>
<entityField>#ENTITY</entityField> <entityField>#ENTITY</entityField>
</cardViewTemplate> </cardViewTemplate>
<neonViewReference>
<name>2cb11b4e-dd8e-419b-8fff-ef0852ef2641</name>
<entityField>OrgComm_dfo</entityField>
<view>CommList_view</view>
</neonViewReference>
<neonViewReference> <neonViewReference>
<name>df605bb6-5d18-4233-abc0-1da82e4910ca</name> <name>df605bb6-5d18-4233-abc0-1da82e4910ca</name>
<entityField>OrgAddress_dfo</entityField> <entityField>OrgAddress_dfo</entityField>
...@@ -43,20 +48,5 @@ ...@@ -43,20 +48,5 @@
</entityFieldLink> </entityFieldLink>
</fields> </fields>
</genericViewTemplate> </genericViewTemplate>
<neonViewReference>
<name>7b3f1253-f671-4cf4-83ec-81e229910014</name>
<entityField>OrgCommEmail_dfo</entityField>
<view>CommList_view</view>
</neonViewReference>
<neonViewReference>
<name>23f420cb-fd45-433f-b385-55a49e98744f</name>
<entityField>OrgCommPhone_dfo</entityField>
<view>CommList_view</view>
</neonViewReference>
<neonViewReference>
<name>c45d71cf-b81f-4d75-876d-7f9c26b1eb12</name>
<entityField>OrgCommOthers_dfo</entityField>
<view>CommList_view</view>
</neonViewReference>
</children> </children>
</neonView> </neonView>
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