Skip to content
Snippets Groups Projects
Commit 44e5e017 authored by j.luginger's avatar j.luginger
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1035025][SALUTATION]

parent 295c697a
No related branches found
No related tags found
No related merge requests found
Showing
with 265 additions and 17 deletions
...@@ -247,6 +247,12 @@ ...@@ -247,6 +247,12 @@
<fieldName>KeywordProbabilties</fieldName> <fieldName>KeywordProbabilties</fieldName>
<isConsumer v="false" /> <isConsumer v="false" />
</entityDependency> </entityDependency>
<entityDependency>
<name>6e9de468-5c32-4a73-bcf9-988a9f9e943c</name>
<entityName>Salutation_entity</entityName>
<fieldName>KeywordGender</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies> </dependencies>
<children> <children>
<entityParameter> <entityParameter>
......
...@@ -62,6 +62,12 @@ ...@@ -62,6 +62,12 @@
<fieldName>Languages</fieldName> <fieldName>Languages</fieldName>
<isConsumer v="false" /> <isConsumer v="false" />
</entityDependency> </entityDependency>
<entityDependency>
<name>6b4c3907-9174-4a88-8f30-97b7702e4393</name>
<entityName>Salutation_entity</entityName>
<fieldName>Languages</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies> </dependencies>
</entityProvider> </entityProvider>
</entityFields> </entityFields>
......
...@@ -23,6 +23,13 @@ ...@@ -23,6 +23,13 @@
<name>GENDER</name> <name>GENDER</name>
<title>Gender</title> <title>Gender</title>
<consumer>KeywordGenders</consumer> <consumer>KeywordGenders</consumer>
<valueProcess>%aditoprj%/entity/Person_entity/entityfields/gender/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Person_entity/entityfields/gender/displayValueProcess.js</displayValueProcess>
<onValueChange>%aditoprj%/entity/Person_entity/entityfields/gender/onValueChange.js</onValueChange>
<onValueChangeTypes>
<element>MASK</element>
<element>PROCESS</element>
</onValueChangeTypes>
</entityField> </entityField>
<entityField> <entityField>
<name>LASTNAME</name> <name>LASTNAME</name>
...@@ -42,10 +49,19 @@ ...@@ -42,10 +49,19 @@
<entityField> <entityField>
<name>SALUTATION</name> <name>SALUTATION</name>
<title>Salutation</title> <title>Salutation</title>
<possibleItemsProcess>%aditoprj%/entity/Person_entity/entityfields/salutation/possibleItemsProcess.js</possibleItemsProcess>
<onValidation>%aditoprj%/entity/Person_entity/entityfields/salutation/onValidation.js</onValidation>
<onValueChange>%aditoprj%/entity/Person_entity/entityfields/salutation/onValueChange.js</onValueChange>
<onValueChangeTypes>
<element>MASK</element>
<element>PROCESS</element>
<element>RECORD</element>
</onValueChangeTypes>
</entityField> </entityField>
<entityField> <entityField>
<name>TITLE</name> <name>TITLE</name>
<title>Title</title> <title>Title</title>
<possibleItemsProcess>%aditoprj%/entity/Person_entity/entityfields/title/possibleItemsProcess.js</possibleItemsProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>TITLESUFFIX</name> <name>TITLESUFFIX</name>
...@@ -517,21 +533,21 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact ...@@ -517,21 +533,21 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<onDBUpdate>%aditoprj%/entity/Person_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> <onDBUpdate>%aditoprj%/entity/Person_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate>
<linkInformation> <linkInformation>
<linkInformation> <linkInformation>
<name>cb2de42b-de48-4543-91d6-8d00af5c5736</name> <name>8c7dedf5-276a-4dff-a755-af9fd6e8a102</name>
<tableName>PERSON</tableName> <tableName>PERSON</tableName>
<primaryKey>PERSONID</primaryKey> <primaryKey>PERSONID</primaryKey>
<isUIDTable v="false" /> <isUIDTable v="false" />
<readonly v="false" /> <readonly v="false" />
</linkInformation> </linkInformation>
<linkInformation> <linkInformation>
<name>23fde8db-a3fe-421d-9e39-f6a0294e6883</name> <name>c832aa10-3f49-4e3a-ac26-41cebecac7ee</name>
<tableName>CONTACT</tableName> <tableName>CONTACT</tableName>
<primaryKey>CONTACTID</primaryKey> <primaryKey>CONTACTID</primaryKey>
<isUIDTable v="true" /> <isUIDTable v="true" />
<readonly v="false" /> <readonly v="false" />
</linkInformation> </linkInformation>
<linkInformation> <linkInformation>
<name>6766787e-d39b-4030-bd26-cacfcd80d386</name> <name>1a59ebc4-5334-4e11-9d55-89fc5c5f6d46</name>
<tableName>ORGANISATION</tableName> <tableName>ORGANISATION</tableName>
<primaryKey>ORGANISATIONID</primaryKey> <primaryKey>ORGANISATIONID</primaryKey>
<isUIDTable v="false" /> <isUIDTable v="false" />
......
import("system.vars");
import("Keyword_lib");
import("system.logging");
import("system.result");
import("system.db");
import("system.vars");
import("system.neon");
var salutation = vars.get("$field.SALUTATION");
if (salutation)
{
var sex = db.cell("select SEX from SALUTATION where SALUTATION = '" + salutation + "'");
if (sex)
{
var keyword = KeywordUtils.getViewValue("PersonGender", sex);
logging.log("ii" + keyword)
result.string(keyword)
}
}
import("system.logging");
import("system.result");
import("system.db");
import("system.vars");
import("system.neon");
var salutation = vars.get("$field.SALUTATION")
;
logging.log("value process: " + salutation);
if((vars.get("sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("sys.recordstate") == neon.OPERATINGSTATE_EDIT) && !vars.get("$field.GENDER") && vars.get("$field.SALUTATION"))
{
var sex = db.cell("select SEX from SALUTATION where SALUTATION = '" + salutation + "'");
logging.log(sex)
result.string( sex)
}
\ No newline at end of file
//import("system.logging");
//import("system.result");
//import("system.db");
//import("system.vars");
//
//var salutation = vars.get("$field.SALUTATION")
//
//if(!vars.get("$field.GENDER"))
// {
//
// var sex = db.cell("select SEX from SALUTATION where SALUTATION = '" + salutation + "'");
// vars.set("$field.GENDER", sex)
//
// }
\ No newline at end of file
import("system.result");
import("system.db");
//var salutation = db.array(db.COLUMN, "select distinct SALUTATION from SALUTATION where SALUTATION is not NULL");
var salutation2 = db.table("select distinct SALUTATION, SALUTATION from SALUTATION where SALUTATION is not NULL");
result.object(salutation2);
\ No newline at end of file
import("system.logging");
import("system.vars");
import("system.result");
import("system.db");
var salutation = vars.get("$field.SALUTATION");
logging.log(salutation)
var title = db.table("select TITLE, TITLE from SALUTATION where TITLE is not null and SALUTATION = '" + salutation + "'");
result.object(title);
<?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.2.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.2.0"> <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.2.0">
<name>Salutation_entity</name> <name>Salutation_entity</name>
<title>Anrede</title>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<recordContainer>db</recordContainer> <recordContainer>db</recordContainer>
<entityFields> <entityFields>
<entityProvider> <entityProvider>
<name>#PROVIDER</name> <name>#PROVIDER</name>
<recordContainer>db</recordContainer>
</entityProvider> </entityProvider>
<entityField> <entityField>
<name>SALUTATIONID</name> <name>SALUTATIONID</name>
<valueProcess>%aditoprj%/entity/Salutation_entity/entityfields/salutationid/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>HEADLINE</name> <name>HEADLINE</name>
<title>Anrede im Briedkopf</title> <title>Anrede im Briefkopf</title>
</entityField> </entityField>
<entityField> <entityField>
<name>LANGUAGE_SALUTATION</name> <name>LANGUAGE_SALUTATION</name>
<title>Sprache</title> <title>Sprache</title>
<consumer>Languages</consumer>
</entityField> </entityField>
<entityField> <entityField>
<name>LETTERSALUTATION</name> <name>LETTERSALUTATION</name>
...@@ -29,6 +33,7 @@ ...@@ -29,6 +33,7 @@
<entityField> <entityField>
<name>SEX</name> <name>SEX</name>
<title>Geschlecht</title> <title>Geschlecht</title>
<consumer>KeywordGender</consumer>
</entityField> </entityField>
<entityField> <entityField>
<name>SORT</name> <name>SORT</name>
...@@ -38,6 +43,30 @@ ...@@ -38,6 +43,30 @@
<name>TITLE</name> <name>TITLE</name>
<title>(Akademischer) Titel</title> <title>(Akademischer) Titel</title>
</entityField> </entityField>
<entityConsumer>
<name>Languages</name>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>Language_entity</entityName>
<fieldName>LanguagesISO3Code</fieldName>
</dependency>
</entityConsumer>
<entityConsumer>
<name>KeywordGender</name>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>KeywordEntry_entity</entityName>
<fieldName>SpecificContainerKeywords</fieldName>
</dependency>
<children>
<entityParameter>
<name>containerName_param</name>
<code>%aditoprj%/entity/Salutation_entity/entityfields/keywordgender/children/containername_param/code.js</code>
</entityParameter>
</children>
</entityConsumer>
</entityFields> </entityFields>
<recordContainers> <recordContainers>
<dbRecordContainer> <dbRecordContainer>
...@@ -85,6 +114,14 @@ ...@@ -85,6 +114,14 @@
<name>TITLE.value</name> <name>TITLE.value</name>
<recordfield>SALUTATION.TITLE</recordfield> <recordfield>SALUTATION.TITLE</recordfield>
</dbRecordFieldMapping> </dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>LANGUAGE_SALUTATION.displayValue</name>
<expression>%aditoprj%/entity/Salutation_entity/recordcontainers/db/recordfieldmappings/language_salutation.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>SEX.displayValue</name>
<expression>%aditoprj%/entity/Salutation_entity/recordcontainers/db/recordfieldmappings/sex.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
</recordFieldMappings> </recordFieldMappings>
</dbRecordContainer> </dbRecordContainer>
</recordContainers> </recordContainers>
......
import("system.result");
result.string("PersonGender")
\ No newline at end of file
import("system.util");
import("system.vars");
import("system.result");
import("system.neon");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
result.string(util.getNewUUID());
\ No newline at end of file
import("system.result");
import("Keyword_lib");
var sql = LanguageKeywordUtils.getResolvedTitleSqlPart("SALUTATION.LANGUAGE");
result.string(sql);
\ No newline at end of file
import("system.result");
import("Keyword_lib");
var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.get.PersonGender, "SALUTATION.SEX");
result.string(sql);
...@@ -4,11 +4,21 @@ ...@@ -4,11 +4,21 @@
<title>Anrede</title> <title>Anrede</title>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<filterview>SalutationFilter_view</filterview> <filterview>SalutationFilter_view</filterview>
<editview>SalutationEdit_view</editview>
<lookupview>SalutationLookup_view</lookupview>
<entity>Salutation_entity</entity> <entity>Salutation_entity</entity>
<references> <references>
<neonViewReference> <neonViewReference>
<name>e1ddbe88-af31-4860-9b9e-447282060ec2</name> <name>e1ddbe88-af31-4860-9b9e-447282060ec2</name>
<view>SalutationFilter_view</view> <view>SalutationFilter_view</view>
</neonViewReference> </neonViewReference>
<neonViewReference>
<name>2663038a-4f51-4152-bbb2-2c8aa552deee</name>
<view>SalutationEdit_view</view>
</neonViewReference>
<neonViewReference>
<name>3bb3eb80-414e-4d1b-aec1-94b0fddb4a29</name>
<view>SalutationLookup_view</view>
</neonViewReference>
</references> </references>
</neonContext> </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.0.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.1">
<name>SalutationEdit_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<children>
<genericViewTemplate>
<name>Generic</name>
<editMode v="true" />
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>3414fd26-d0bf-42e0-b7c7-7ca505e2c70d</name>
<entityField>LANGUAGE_SALUTATION</entityField>
</entityFieldLink>
<entityFieldLink>
<name>b56a3b42-346e-48f2-88f0-0e3c5f4b76fe</name>
<entityField>SALUTATION</entityField>
</entityFieldLink>
<entityFieldLink>
<name>39b0ef67-57f9-40ac-b759-e32c70f16ce0</name>
<entityField>TITLE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>7a6e5f1b-12c8-4d50-ad2f-bfd35fc94d5f</name>
<entityField>HEADLINE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>83feed8a-aca8-4c2a-bac3-fa3d5f9d21b0</name>
<entityField>LETTERSALUTATION</entityField>
</entityFieldLink>
<entityFieldLink>
<name>3179d4c2-98dd-4edf-8bfb-462935bd8d50</name>
<entityField>SEX</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
</children>
</neonView>
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.1"> <neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.1">
<name>SalutationFilter_view</name> <name>SalutationFilter_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<filterable v="true" />
<layout> <layout>
<boxLayout> <boxLayout>
<name>layout</name> <name>layout</name>
...@@ -13,8 +14,10 @@ ...@@ -13,8 +14,10 @@
<entityField>#ENTITY</entityField> <entityField>#ENTITY</entityField>
<columns> <columns>
<neonTableColumn> <neonTableColumn>
<name>4a0e3f58-8d0c-4481-8ff5-2f1762460c21</name> <name>b4108c6a-173d-4692-b9dc-a0c02de7d373</name>
<entityField>SORT</entityField> <entityField>LANGUAGE_SALUTATION</entityField>
<width v="75" />
<expandRatio v="100" />
</neonTableColumn> </neonTableColumn>
<neonTableColumn> <neonTableColumn>
<name>cd9277bb-e254-41d2-bbfa-5d328e348405</name> <name>cd9277bb-e254-41d2-bbfa-5d328e348405</name>
...@@ -22,27 +25,23 @@ ...@@ -22,27 +25,23 @@
<width v="75" /> <width v="75" />
</neonTableColumn> </neonTableColumn>
<neonTableColumn> <neonTableColumn>
<name>68809674-e641-4965-8977-20f6b3e1002a</name> <name>229e8fa9-e4c3-4cab-b692-6695c4bff4aa</name>
<entityField>SEX</entityField> <entityField>TITLE</entityField>
<width v="75" /> <width v="75" />
</neonTableColumn> </neonTableColumn>
<neonTableColumn> <neonTableColumn>
<name>b4108c6a-173d-4692-b9dc-a0c02de7d373</name> <name>dd21b360-22e4-448b-906d-059bc6c4033f</name>
<entityField>LANGUAGE_SALUTATION</entityField> <entityField>HEADLINE</entityField>
<expandRatio v="100" />
</neonTableColumn>
<neonTableColumn>
<name>229e8fa9-e4c3-4cab-b692-6695c4bff4aa</name>
<entityField>TITLE</entityField>
<width v="75" /> <width v="75" />
</neonTableColumn> </neonTableColumn>
<neonTableColumn> <neonTableColumn>
<name>5aa35e22-4ca3-4a65-a9de-44bd209248e8</name> <name>5aa35e22-4ca3-4a65-a9de-44bd209248e8</name>
<entityField>LETTERSALUTATION</entityField> <entityField>LETTERSALUTATION</entityField>
<width v="75" />
</neonTableColumn> </neonTableColumn>
<neonTableColumn> <neonTableColumn>
<name>dd21b360-22e4-448b-906d-059bc6c4033f</name> <name>68809674-e641-4965-8977-20f6b3e1002a</name>
<entityField>HEADLINE</entityField> <entityField>SEX</entityField>
<width v="75" /> <width v="75" />
</neonTableColumn> </neonTableColumn>
</columns> </columns>
......
<?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.0.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.1">
<name>SalutationLookup_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<children>
<tableViewTemplate>
<name>Table</name>
<entityField>#ENTITY</entityField>
<columns>
<neonTableColumn>
<name>fbf20ad5-75b0-4c5c-8fbf-a2c0369f2adc</name>
<entityField>SALUTATION</entityField>
</neonTableColumn>
<neonTableColumn>
<name>ba27a68a-f353-4365-8127-e3a652137a10</name>
<entityField>TITLE</entityField>
</neonTableColumn>
</columns>
</tableViewTemplate>
</children>
</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