From 3f3facb2877d6c47d5a2e2e0134bcffcc0425eda Mon Sep 17 00:00:00 2001 From: Johannes Hoermann <j.hoermann@adito.de> Date: Mon, 18 Mar 2019 14:31:44 +0100 Subject: [PATCH] fix salutation --- entity/Person_entity/Person_entity.aod | 20 ++++++++----------- .../entityfields/language/onValueChange.js | 2 +- .../salutation/displayValueProcess.js | 16 ++++++++------- .../entityfields/salutation/onValueChange.js | 9 --------- .../entityfields/title/displayValueProcess.js | 16 ++++++++------- .../salutation.displayvalue/expression.js | 3 +++ .../title.displayvalue/expression.js | 3 +++ .../recordcontainers/jdito/contentProcess.js | 2 +- .../recordcontainers/jdito/contentProcess.js | 2 +- .../ObjectRelationTree_view.aod | 0 report/RPTJ_OFFER/RPTJ_OFFER.aod | 0 .../RPTJ_ORGANISATION/RPTJ_ORGANISATION.aod | 0 12 files changed, 35 insertions(+), 38 deletions(-) delete mode 100644 entity/Person_entity/entityfields/salutation/onValueChange.js create mode 100644 entity/Person_entity/recordcontainers/db/recordfieldmappings/salutation.displayvalue/expression.js create mode 100644 entity/Person_entity/recordcontainers/db/recordfieldmappings/title.displayvalue/expression.js delete mode 100644 neonView/ObjectRelationTree_view/ObjectRelationTree_view.aod delete mode 100644 report/RPTJ_OFFER/RPTJ_OFFER.aod delete mode 100644 report/RPTJ_ORGANISATION/RPTJ_ORGANISATION.aod diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index 1d02fe458c4..9cd0ce359ce 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -52,12 +52,6 @@ <title>Salutation</title> <consumer>Salutations</consumer> <displayValueProcess>%aditoprj%/entity/Person_entity/entityfields/salutation/displayValueProcess.js</displayValueProcess> - <onValueChange>%aditoprj%/entity/Person_entity/entityfields/salutation/onValueChange.js</onValueChange> - <onValueChangeTypes> - <element>MASK</element> - <element>PROCESS</element> - <element>RECORD</element> - </onValueChangeTypes> </entityField> <entityField> <name>TITLE</name> @@ -199,10 +193,6 @@ <description>This parameter is used for specifing a related &quot;CONTACTID&quot; to a COMMUNICATION-entry. Usually this is used for filtering COMMUNICATION-entries by a specified contact or creating a new entry that is related to a contact.</description> </entityParameter> - <entityParameter> - <name>CommCategory_param</name> - <description>TODO: expose auf false. aktuell wird der Code nicht ausgef�hrt, wenn Expose false ist.</description> - </entityParameter> </children> </entityConsumer> <entityConsumer> @@ -314,8 +304,6 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <onValueChange>%aditoprj%/entity/Person_entity/entityfields/language/onValueChange.js</onValueChange> <onValueChangeTypes> <element>MASK</element> - <element>PROCESS</element> - <element>RECORD</element> </onValueChangeTypes> </entityField> <entityConsumer> @@ -779,6 +767,14 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <name>LANGUAGE.displayValue</name> <expression>%aditoprj%/entity/Person_entity/recordcontainers/db/recordfieldmappings/language.displayvalue/expression.js</expression> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>SALUTATION.displayValue</name> + <expression>%aditoprj%/entity/Person_entity/recordcontainers/db/recordfieldmappings/salutation.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>TITLE.displayValue</name> + <expression>%aditoprj%/entity/Person_entity/recordcontainers/db/recordfieldmappings/title.displayvalue/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/Person_entity/entityfields/language/onValueChange.js b/entity/Person_entity/entityfields/language/onValueChange.js index 531e01b7ec4..bff15d2335a 100644 --- a/entity/Person_entity/entityfields/language/onValueChange.js +++ b/entity/Person_entity/entityfields/language/onValueChange.js @@ -7,5 +7,5 @@ if((vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.re neon.setFieldValue("$field.SALUTATION", ""); neon.setFieldValue("$field.TITLE", ""); - neon.refresh(["$field.SALUTATION", "$field.TITLE"]); + //neon.refresh(["$field.SALUTATION", "$field.TITLE"]); } \ No newline at end of file diff --git a/entity/Person_entity/entityfields/salutation/displayValueProcess.js b/entity/Person_entity/entityfields/salutation/displayValueProcess.js index e7bc31ecaed..47a0854d825 100644 --- a/entity/Person_entity/entityfields/salutation/displayValueProcess.js +++ b/entity/Person_entity/entityfields/salutation/displayValueProcess.js @@ -1,7 +1,9 @@ -//import("system.vars"); -//import("system.db"); -//import("system.result"); -//import("Sql_lib"); -// -//var cond = SqlCondition.begin() -//result.string(db.cell(cond.andPrepareVars("PERSON.PERSONID", "$field.PERSONID").buildSql("select SALUTATION from PERSON", "1=2"))); \ No newline at end of file +import("system.result"); +import("system.neon"); +import("system.vars"); + +if((vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)) +{ + if (!vars.get("$field.SALUTATION")) + result.string("") +} \ No newline at end of file diff --git a/entity/Person_entity/entityfields/salutation/onValueChange.js b/entity/Person_entity/entityfields/salutation/onValueChange.js deleted file mode 100644 index 161d7c37cf5..00000000000 --- a/entity/Person_entity/entityfields/salutation/onValueChange.js +++ /dev/null @@ -1,9 +0,0 @@ -import("system.vars"); -import("system.neon"); - -if((vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)) -{ - neon.setFieldValue("$field.TITLE", ""); - - neon.refresh(["$field.TITLE"]); -} \ No newline at end of file diff --git a/entity/Person_entity/entityfields/title/displayValueProcess.js b/entity/Person_entity/entityfields/title/displayValueProcess.js index 67f0faec9f0..3682b56b29c 100644 --- a/entity/Person_entity/entityfields/title/displayValueProcess.js +++ b/entity/Person_entity/entityfields/title/displayValueProcess.js @@ -1,7 +1,9 @@ -import("system.vars"); -import("system.db"); -import("system.result"); -import("Sql_lib"); - -var cond = SqlCondition.begin() -result.string(db.cell(cond.andPrepareVars("PERSON.PERSONID", "$field.PERSONID").buildSql("select TITLE from PERSON", "1=2"))); \ No newline at end of file +import("system.result"); +import("system.neon"); +import("system.vars"); + +if((vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)) +{ + if (!vars.get("$field.TITLE")) + result.string("") +} \ No newline at end of file diff --git a/entity/Person_entity/recordcontainers/db/recordfieldmappings/salutation.displayvalue/expression.js b/entity/Person_entity/recordcontainers/db/recordfieldmappings/salutation.displayvalue/expression.js new file mode 100644 index 00000000000..c4d0a4e0b67 --- /dev/null +++ b/entity/Person_entity/recordcontainers/db/recordfieldmappings/salutation.displayvalue/expression.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string("SALUTATION"); \ No newline at end of file diff --git a/entity/Person_entity/recordcontainers/db/recordfieldmappings/title.displayvalue/expression.js b/entity/Person_entity/recordcontainers/db/recordfieldmappings/title.displayvalue/expression.js new file mode 100644 index 00000000000..b02537f776e --- /dev/null +++ b/entity/Person_entity/recordcontainers/db/recordfieldmappings/title.displayvalue/expression.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string("TITLE"); \ No newline at end of file diff --git a/entity/SalutationDistinct_entity/recordcontainers/jdito/contentProcess.js b/entity/SalutationDistinct_entity/recordcontainers/jdito/contentProcess.js index 4e281d75224..0e53e6c736a 100644 --- a/entity/SalutationDistinct_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/SalutationDistinct_entity/recordcontainers/jdito/contentProcess.js @@ -6,4 +6,4 @@ import("Sql_lib"); result.object(db.table(SqlCondition.begin() .and("SALUTATION is not NULL") .andPrepareVars("SALUTATION.LANGUAGE", "$param.Language_param") - .buildSql("select distinct SALUTATION from SALUTATION", "1=2"))); \ No newline at end of file + .buildSql("select distinct SALUTATION from SALUTATION", "1=1"))); \ No newline at end of file diff --git a/entity/SalutationTitleDistinct_entity/recordcontainers/jdito/contentProcess.js b/entity/SalutationTitleDistinct_entity/recordcontainers/jdito/contentProcess.js index f584ebd50ba..8c0df5ff1d2 100644 --- a/entity/SalutationTitleDistinct_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/SalutationTitleDistinct_entity/recordcontainers/jdito/contentProcess.js @@ -7,4 +7,4 @@ result.object(db.table(SqlCondition.begin() .and("TITLE is not NULL") .andPrepareVars("SALUTATION.SALUTATION", "$param.Salutation_param") .andPrepareVars("SALUTATION.LANGUAGE", "$param.Language_param") - .buildSql("select distinct TITLE from SALUTATION", "1=2"))); \ No newline at end of file + .buildSql("select distinct TITLE from SALUTATION", "1=1"))); \ No newline at end of file diff --git a/neonView/ObjectRelationTree_view/ObjectRelationTree_view.aod b/neonView/ObjectRelationTree_view/ObjectRelationTree_view.aod deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/report/RPTJ_OFFER/RPTJ_OFFER.aod b/report/RPTJ_OFFER/RPTJ_OFFER.aod deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/report/RPTJ_ORGANISATION/RPTJ_ORGANISATION.aod b/report/RPTJ_ORGANISATION/RPTJ_ORGANISATION.aod deleted file mode 100644 index e69de29bb2d..00000000000 -- GitLab