From d358e5ff38c1131c788cb91e2d3ea47b134fe887 Mon Sep 17 00:00:00 2001 From: Johannes Hoermann <j.hoermann@adito.de> Date: Thu, 6 Jun 2019 09:46:43 +0200 Subject: [PATCH] Split Classification into two entities. One for admin one for usage --- .../ClassificationAdmin_entity.aod | 221 +++++++--- .../displayValueProcess.js | 5 + .../classificationgroup/dropDownProcess.js | 12 + .../classificationgroup/mandatoryProcess.js | 5 + .../classificationgroup/onValidation.js | 2 +- .../classificationgroup/titleProcess.js | 13 + .../displayValueProcess.js | 9 + .../classificationscore_id/titleProcess.js | 9 + .../classificationgroup_param/valueProcess.js | 4 + .../classificationtype_param/valueProcess.js | 4 + .../valueProcess.js | 4 + .../classificationtype/displayValueProcess.js | 6 + .../classificationtype/stateProcess.js | 11 + .../classificationtype/valueProcess.js | 8 + .../classificationtype_id/valueProcess.js | 8 + .../classificationtypeid/valueProcess.js | 10 + .../entityfields/object_rowid/valueProcess.js | 8 + .../entityfields/object_type/valueProcess.js | 8 + .../scoretype/displayValueProcess.js | 5 + .../grantDeleteProcess.js | 23 + .../recordcontainers/jdito/contentProcess.js | 49 ++- .../recordcontainers/jdito/onDelete.js | 0 .../recordcontainers/jdito/onInsert.js | 0 .../recordcontainers/jdito/onUpdate.js | 54 +++ .../ClassificationScore_entity.aod | 268 ++++++------ .../Classification_entity.aod | 401 ++++++++---------- .../displayValueProcess.js | 29 +- .../classificationgroup/dropDownProcess.js | 12 - .../isadminmode_param/valueProcess.js | 3 - .../isadminmode_param/valueProcess.js | 3 - .../classificationscores/stateProcess.js | 12 - .../entityfields/edit/onActionProcess.js | 23 - .../isadminmode_param/valueProcess.js | 4 - .../grantDeleteProcess.js | 23 - .../recordcontainers/jdito/contentProcess.js | 22 +- .../recordcontainers/jdito/onUpdate.js | 22 - .../classificationresult/valueProcess.js | 5 +- neonContext/Classification/Classification.aod | 48 +-- .../ClassificationAdmin.aod | 40 +- .../ClassificationScore.aod | 28 +- .../ClassificationAdminEdit_view.aod | 40 ++ .../ClassificationAdminMain_view.aod | 17 - .../ClassificationAdminTree_view.aod | 48 +-- .../ClassificationFilter_view.aod | 22 - .../ClassificationScoreMultipleEdit_view.aod | 64 ++- ...lassificationScoreMultiplePreview_view.aod | 32 ++ .../ClassificationTree_view.aod | 63 ++- .../ClassificatonAdminEdit_view.aod | 0 .../ClassificatonAdminPreview_view.aod} | 77 ++-- .../ClassificatonPreview_view.aod} | 73 ++-- 50 files changed, 1039 insertions(+), 818 deletions(-) create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationgroup/displayValueProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationgroup/dropDownProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationgroup/mandatoryProcess.js rename entity/{Classification_entity => ClassificationAdmin_entity}/entityfields/classificationgroup/onValidation.js (85%) create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationgroup/titleProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationscore_id/displayValueProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationscore_id/titleProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationgroup_param/valueProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationtype_param/valueProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationtypeid_param/valueProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationtype/displayValueProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationtype/stateProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationtype/valueProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationtype_id/valueProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/classificationtypeid/valueProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/object_rowid/valueProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/object_type/valueProcess.js create mode 100644 entity/ClassificationAdmin_entity/entityfields/scoretype/displayValueProcess.js create mode 100644 entity/ClassificationAdmin_entity/grantDeleteProcess.js rename entity/{Classification_entity => ClassificationAdmin_entity}/recordcontainers/jdito/onDelete.js (100%) rename entity/{Classification_entity => ClassificationAdmin_entity}/recordcontainers/jdito/onInsert.js (100%) create mode 100644 entity/ClassificationAdmin_entity/recordcontainers/jdito/onUpdate.js delete mode 100644 entity/Classification_entity/entityfields/classificationgroup/dropDownProcess.js delete mode 100644 entity/Classification_entity/entityfields/classifications/children/isadminmode_param/valueProcess.js delete mode 100644 entity/Classification_entity/entityfields/classificationsadministration/children/isadminmode_param/valueProcess.js delete mode 100644 entity/Classification_entity/entityfields/classificationscores/stateProcess.js delete mode 100644 entity/Classification_entity/entityfields/edit/onActionProcess.js delete mode 100644 entity/Classification_entity/entityfields/isadminmode_param/valueProcess.js create mode 100644 neonView/ClassificationAdminEdit_view/ClassificationAdminEdit_view.aod delete mode 100644 neonView/ClassificationAdminMain_view/ClassificationAdminMain_view.aod delete mode 100644 neonView/ClassificationFilter_view/ClassificationFilter_view.aod create mode 100644 neonView/ClassificationScoreMultiplePreview_view/ClassificationScoreMultiplePreview_view.aod create mode 100644 neonView/ClassificatonAdminEdit_view_/ClassificatonAdminEdit_view.aod rename neonView/{ClassificatonAdminEdit_view/ClassificatonAdminEdit_view.aod => ClassificatonAdminPreview_view/ClassificatonAdminPreview_view.aod} (86%) rename neonView/{ClassificatonEdit_view/ClassificatonEdit_view.aod => ClassificatonPreview_view/ClassificatonPreview_view.aod} (91%) diff --git a/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod b/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod index 7acf0adec73..48a89e78e18 100644 --- a/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod +++ b/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod @@ -1,58 +1,163 @@ -<?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.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6"> - <name>ClassificationAdmin_entity</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <icon>VAADIN:LIST_OL</icon> - <title>Classification</title> - <grantView v="true" /> - <grantCreate v="false" /> - <grantUpdate v="false" /> - <grantDelete v="false" /> - <contentTitleProcess>%aditoprj%/entity/ClassificationAdmin_entity/contentTitleProcess.js</contentTitleProcess> - <usePermissions v="true" /> - <titlePlural>Classifications</titlePlural> - <recordContainer>jdito</recordContainer> - <entityFields> - <entityProvider> - <name>#PROVIDER</name> - </entityProvider> - <entityField> - <name>UID</name> - <title>Usage</title> - <consumer>KeywordClassificationTypes</consumer> - <displayValueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/uid/displayValueProcess.js</displayValueProcess> - </entityField> - <entityConsumer> - <name>ClassificationsAdmin</name> - <dependency> - <name>dependency</name> - <entityName>Classification_entity</entityName> - <fieldName>ClassificationsAdministration</fieldName> - </dependency> - </entityConsumer> - <entityConsumer> - <name>KeywordClassificationTypes</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContainerName_param</name> - <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/keywordclassificationtypes/children/containername_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - </entityFields> - <recordContainers> - <jDitoRecordContainer> - <name>jdito</name> - <jDitoRecordAlias>Data_alias</jDitoRecordAlias> - <contentProcess>%aditoprj%/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js</contentProcess> - <recordFields> - <element>UID.value</element> - </recordFields> - </jDitoRecordContainer> - </recordContainers> -</entity> +<?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.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6"> + <name>ClassificationAdmin_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:LIST_OL</icon> + <title>Classification</title> + <grantDeleteProcess>%aditoprj%/entity/ClassificationAdmin_entity/grantDeleteProcess.js</grantDeleteProcess> + <contentTitleProcess>%aditoprj%/entity/ClassificationAdmin_entity/contentTitleProcess.js</contentTitleProcess> + <titlePlural>Classifications</titlePlural> + <recordContainer>jdito</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>UID</name> + <title>Usage</title> + <consumer>KeywordClassificationTypes</consumer> + <displayValueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/uid/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>CLASSIFICATIONID</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationid/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>CLASSIFICATIONSCORE_ID</name> + <title>Selection</title> + <consumer>ClassificationScores</consumer> + <searchable v="false" /> + <titleProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationscore_id/titleProcess.js</titleProcess> + <displayValueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationscore_id/displayValueProcess.js</displayValueProcess> + </entityField> + <entityParameter> + <name>ClassificationType_param</name> + <expose v="true" /> + <mandatory v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <expose v="true" /> + <mandatory v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>ObjectRowid_param</name> + <expose v="true" /> + <mandatory v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityField> + <name>CLASSIFICATIONTYPEID</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationtypeid/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>CLASSIFICATIONGROUP</name> + <contentType>TEXT</contentType> + <groupable v="true" /> + <mandatoryProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationgroup/mandatoryProcess.js</mandatoryProcess> + <dropDownProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationgroup/dropDownProcess.js</dropDownProcess> + <textInputAllowed v="true" /> + <searchable v="false" /> + <titleProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationgroup/titleProcess.js</titleProcess> + <displayValueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationgroup/displayValueProcess.js</displayValueProcess> + <onValidation>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationgroup/onValidation.js</onValidation> + </entityField> + <entityField> + <name>CLASSIFICATIONTYPE_ID</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationtype_id/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>OBJECT_ROWID</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/object_rowid/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>OBJECT_TYPE</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/object_type/valueProcess.js</valueProcess> + </entityField> + <entityConsumer> + <name>KeywordClassificationTypes</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/keywordclassificationtypes/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>ClassificationScores</name> + <state>EDITABLE</state> + <dependency> + <name>dependency</name> + <entityName>ClassificationScore_entity</entityName> + <fieldName>ClassificationScores</fieldName> + </dependency> + <children> + <entityParameter> + <name>ClassificationGroup_param</name> + <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationgroup_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ClassificationTypeId_param</name> + <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationtypeid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ClassificationType_param</name> + <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationtype_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>CLASSIFICATIONTYPE</name> + <title>Usage</title> + <consumer>KeywordClassificationTypes</consumer> + <groupable v="true" /> + <mandatory v="true" /> + <searchable v="true" /> + <stateProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationtype/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationtype/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationtype/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>SCORETYPE</name> + <title>Scoretype</title> + <mandatory v="true" /> + <displayValueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/scoretype/displayValueProcess.js</displayValueProcess> + </entityField> + </entityFields> + <recordContainers> + <jDitoRecordContainer> + <name>jdito</name> + <jDitoRecordAlias>Data_alias</jDitoRecordAlias> + <isFilterable v="true" /> + <isRequireContainerFiltering v="true" /> + <contentProcess>%aditoprj%/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js</contentProcess> + <onInsert>%aditoprj%/entity/ClassificationAdmin_entity/recordcontainers/jdito/onInsert.js</onInsert> + <onUpdate>%aditoprj%/entity/ClassificationAdmin_entity/recordcontainers/jdito/onUpdate.js</onUpdate> + <onDelete>%aditoprj%/entity/ClassificationAdmin_entity/recordcontainers/jdito/onDelete.js</onDelete> + <recordFields> + <element>UID.value</element> + <element>CLASSIFICATIONID.value</element> + <element>CLASSIFICATIONGROUP.value</element> + <element>CLASSIFICATIONSCORE_ID.value</element> + <element>CLASSIFICATIONTYPEID.value</element> + <element>CLASSIFICATIONTYPE_ID.value</element> + <element>OBJECT_TYPE.value</element> + <element>OBJECT_ROWID.value</element> + <element>SCORETYPE.value</element> + <element>CLASSIFICATIONTYPE.value</element> + </recordFields> + </jDitoRecordContainer> + </recordContainers> +</entity> diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationgroup/displayValueProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationgroup/displayValueProcess.js new file mode 100644 index 00000000000..a5717eabb76 --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationgroup/displayValueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.translate"); +import("system.result"); + +result.string(translate.text(vars.get("$this.value"))); \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationgroup/dropDownProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationgroup/dropDownProcess.js new file mode 100644 index 00000000000..b20aec8464c --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationgroup/dropDownProcess.js @@ -0,0 +1,12 @@ +import("Classification_lib"); +import("system.neon"); +import("system.vars"); +import("system.db"); +import("system.result"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + var classificationType = vars.get("$field.CLASSIFICATIONTYPE") + if (classificationType) + result.object(ClassificationUtils.getAllGroups(classificationType, true)); +} \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationgroup/mandatoryProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationgroup/mandatoryProcess.js new file mode 100644 index 00000000000..7bbc5aa02d8 --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationgroup/mandatoryProcess.js @@ -0,0 +1,5 @@ +import("system.neon"); +import("system.result"); +import("system.vars"); + +result.object(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT); \ No newline at end of file diff --git a/entity/Classification_entity/entityfields/classificationgroup/onValidation.js b/entity/ClassificationAdmin_entity/entityfields/classificationgroup/onValidation.js similarity index 85% rename from entity/Classification_entity/entityfields/classificationgroup/onValidation.js rename to entity/ClassificationAdmin_entity/entityfields/classificationgroup/onValidation.js index 92e2b5ca560..54c0a302da1 100644 --- a/entity/Classification_entity/entityfields/classificationgroup/onValidation.js +++ b/entity/ClassificationAdmin_entity/entityfields/classificationgroup/onValidation.js @@ -5,7 +5,7 @@ import("system.vars"); import("Classification_lib"); import("Entity_lib"); -if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT && vars.exists("$param.IsAdminMode_param") && vars.get("$param.IsAdminMode_param") == "1") +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) { var newGroup = ProcessHandlingUtils.getOnValidationValue(); diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationgroup/titleProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationgroup/titleProcess.js new file mode 100644 index 00000000000..de080516afe --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationgroup/titleProcess.js @@ -0,0 +1,13 @@ +import("system.neon"); +import("system.translate"); +import("system.vars"); +import("system.result"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + result.string(translate.text("Group")); +} +else +{ + result.string(translate.text("Group name")); +} \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationscore_id/displayValueProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationscore_id/displayValueProcess.js new file mode 100644 index 00000000000..c4b352e1b6d --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationscore_id/displayValueProcess.js @@ -0,0 +1,9 @@ +import("system.translate"); +import("Sql_lib"); +import("system.db"); +import("system.result"); + +// TODO: loadEntity / #Title +result.string(translate.text(db.cell(SqlCondition.begin() + .andPrepareVars("CLASSIFICATIONSCORE.CLASSIFICATIONSCOREID", "$field.CLASSIFICATIONSCORE_ID") + .buildSql("select TITLE from CLASSIFICATIONSCORE", "1=2")))); \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationscore_id/titleProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationscore_id/titleProcess.js new file mode 100644 index 00000000000..7865e4544cd --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationscore_id/titleProcess.js @@ -0,0 +1,9 @@ +import("system.neon"); +import("system.result"); +import("system.vars"); +import("system.translate"); + +if (vars.get("$sys.recordstate") && vars.get("$sys.recordstate") != neon.OPERATINGSTATE_VIEW) +{ + result.string(translate.text(vars.get("$field.SCORETYPE"))); +} \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationgroup_param/valueProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationgroup_param/valueProcess.js new file mode 100644 index 00000000000..199c2e918d4 --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationgroup_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.CLASSIFICATIONGROUP")); \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationtype_param/valueProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationtype_param/valueProcess.js new file mode 100644 index 00000000000..d3275a8eaa9 --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationtype_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.CLASSIFICATIONTYPE")) \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationtypeid_param/valueProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationtypeid_param/valueProcess.js new file mode 100644 index 00000000000..b11d099579d --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationscores/children/classificationtypeid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.CLASSIFICATIONTYPEID")); \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationtype/displayValueProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationtype/displayValueProcess.js new file mode 100644 index 00000000000..e56601c6151 --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationtype/displayValueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.vars"); +import("Keyword_lib"); +import("KeywordRegistry_basic"); + +result.string(KeywordUtils.getViewValue($KeywordRegistry.classificationType(), vars.get("$this.value"))); \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationtype/stateProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationtype/stateProcess.js new file mode 100644 index 00000000000..bcc88cc57c1 --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationtype/stateProcess.js @@ -0,0 +1,11 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + result.string(neon.COMPONENTSTATE_EDITABLE); +} +else +{ + result.string(neon.COMPONENTSTATE_READONLY); +} \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationtype/valueProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationtype/valueProcess.js new file mode 100644 index 00000000000..2bccd5eb7fb --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationtype/valueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + result.string(vars.get("$param.ClassificationType_param")); +} \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationtype_id/valueProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationtype_id/valueProcess.js new file mode 100644 index 00000000000..3886bb2dbef --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationtype_id/valueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if ((vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) && !vars.get("$this.value")) +{ + result.string(vars.get("$field.CLASSIFICATIONTYPEID")); +} \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationtypeid/valueProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationtypeid/valueProcess.js new file mode 100644 index 00000000000..16c47d8b584 --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/classificationtypeid/valueProcess.js @@ -0,0 +1,10 @@ +import("system.util"); +import("system.result"); +import("system.neon"); +import("system.vars"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + var newId = util.getNewUUID(); + result.string(newId); +} \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/object_rowid/valueProcess.js b/entity/ClassificationAdmin_entity/entityfields/object_rowid/valueProcess.js new file mode 100644 index 00000000000..d15a596ff10 --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/object_rowid/valueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT && !vars.get("$this.value")) +{ + result.string(vars.get("$param.ObjectRowid_param")); +} \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/object_type/valueProcess.js b/entity/ClassificationAdmin_entity/entityfields/object_type/valueProcess.js new file mode 100644 index 00000000000..b532aa65a13 --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/object_type/valueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT && !vars.get("$this.value")) +{ + result.string(vars.get("$param.ObjectType_param")); +} \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/scoretype/displayValueProcess.js b/entity/ClassificationAdmin_entity/entityfields/scoretype/displayValueProcess.js new file mode 100644 index 00000000000..a5717eabb76 --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/scoretype/displayValueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.translate"); +import("system.result"); + +result.string(translate.text(vars.get("$this.value"))); \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/grantDeleteProcess.js b/entity/ClassificationAdmin_entity/grantDeleteProcess.js new file mode 100644 index 00000000000..8fa84c56342 --- /dev/null +++ b/entity/ClassificationAdmin_entity/grantDeleteProcess.js @@ -0,0 +1,23 @@ +import("system.logging"); +import("system.result"); +import("system.db"); +import("system.vars"); +import("Sql_lib"); + +logging.log(db.cell(SqlCondition.begin() + .andPrepare("CLASSIFICATION.CLASSIFICATIONTYPE_ID", vars.get("$field.CLASSIFICATIONTYPEID")) + .buildSql("select count(*) from CLASSIFICATION", "1=2"))) +result.object(parseInt(db.cell(SqlCondition.begin() + .andPrepare("CLASSIFICATION.CLASSIFICATIONTYPE_ID", vars.get("$field.CLASSIFICATIONTYPEID")) + .buildSql("select count(*) from CLASSIFICATION", "1=2"))) <= 0); + +//{ + /*db.deleteData("CLASSIFICATION", "CLASSIFICATION.CLASSIFICATIONTYPE_ID in (" + db.translateStatement( + SqlCondition.begin() + .andPrepare("CLASSIFICATIONTYPE.SCORETYPE", type) + .buildSql("select CLASSIFICATIONTYPE.CLASSIFICATIONTYPEID from CLASSIFICATIONTYPE", "1=2")) + ")"); + db.deleteData("CLASSIFICATIONTYPE", SqlCondition.equals("CLASSIFICATIONTYPE.SCORETYPE", type, "1=2")); + db.deleteData("CLASSIFICATIONSCORE", SqlCondition.equals("CLASSIFICATIONSCORE.SCORETYPE", type, "1=2"));*/ + +//} +//neon.refreshAll(); \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js b/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js index 04f641a1be6..ce320096bfa 100644 --- a/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js @@ -1,4 +1,49 @@ -import("system.result"); +import("JditoFilter_lib"); +import("Classification_lib"); +import("system.vars"); +import("Sql_lib"); import("system.db"); +import("system.result"); + +var classificationId; +var classificationTypeId; + +// if the id starts with "C," it is a classificationId. If it starts with "T,", it is a classificationtypeId +if (vars.exists("$local.idvalues") && vars.get("$local.idvalues") && vars.get("$local.idvalues").length > 0) +{ + var selected = vars.get("$local.idvalues")[0].split(","); + if (selected.length == 2) + { + if (selected[0] == 'C') + classificationId = selected[1] + else if (selected[0] == 'T') + classificationTypeId = selected[1] + } +} + +var cond = SqlCondition.begin() + .andPrepareVars("CLASSIFICATIONTYPE.CLASSIFICATIONTYPE", "$param.ClassificationType_param") + .andPrepareIfSet("CLASSIFICATION.CLASSIFICATIONID", classificationId) + + + +if (!classificationId) +{ + cond.andPrepareIfSet("CLASSIFICATIONTYPE.CLASSIFICATIONTYPEID", classificationTypeId); +} + +if (vars.exists("$local.filter") && vars.get("$local.filter")) +{ + var filter = vars.get("$local.filter"); + if (filter.filter) + cond.andSqlCondition((JditoFilterUtils.getSqlCondition(filter.filter, "CLASSIFICATION", undefined, { + CLASSIFICATIONTYPE : "CLASSIFICATIONTYPE.CLASSIFICATIONTYPE" + }))); +} -result.object([[""]]); \ No newline at end of file +result.object(db.table(cond.buildSql("select case when CLASSIFICATIONID is not null then 'C,' || CLASSIFICATIONID else 'T,' || CLASSIFICATIONTYPEID end, CLASSIFICATIONID, CLASSIFICATIONGROUP, CLASSIFICATIONSCORE_ID, CLASSIFICATIONTYPEID, CLASSIFICATIONTYPE_ID, OBJECT_TYPE, OBJECT_ROWID, SCORETYPE, CLASSIFICATIONTYPE.CLASSIFICATIONTYPE from CLASSIFICATION \n\ + right join CLASSIFICATIONTYPE on " + db.translateCondition(SqlCondition.begin() + .and("CLASSIFICATIONTYPE_ID = CLASSIFICATIONTYPEID") + .andPrepareVars("CLASSIFICATION.OBJECT_TYPE", "$param.ObjectType_param") + .andPrepareVars("CLASSIFICATION.OBJECT_ROWID", "$param.ObjectRowid_param").build()), "1=1", "order by CLASSIFICATIONGROUP asc")) + ); \ No newline at end of file diff --git a/entity/Classification_entity/recordcontainers/jdito/onDelete.js b/entity/ClassificationAdmin_entity/recordcontainers/jdito/onDelete.js similarity index 100% rename from entity/Classification_entity/recordcontainers/jdito/onDelete.js rename to entity/ClassificationAdmin_entity/recordcontainers/jdito/onDelete.js diff --git a/entity/Classification_entity/recordcontainers/jdito/onInsert.js b/entity/ClassificationAdmin_entity/recordcontainers/jdito/onInsert.js similarity index 100% rename from entity/Classification_entity/recordcontainers/jdito/onInsert.js rename to entity/ClassificationAdmin_entity/recordcontainers/jdito/onInsert.js diff --git a/entity/ClassificationAdmin_entity/recordcontainers/jdito/onUpdate.js b/entity/ClassificationAdmin_entity/recordcontainers/jdito/onUpdate.js new file mode 100644 index 00000000000..5670bb70474 --- /dev/null +++ b/entity/ClassificationAdmin_entity/recordcontainers/jdito/onUpdate.js @@ -0,0 +1,54 @@ +import("Classification_lib"); +import("system.neon"); +import("system.util"); +import("Sql_lib"); +import("system.db"); +import("system.vars"); + +var changed = vars.get("$local.changed"); + +// check if it already exists. Else it only exists as ScoreType but has no Classification-Entry +if (vars.get("$field.CLASSIFICATIONID")) +{ + if (vars.get("$field.CLASSIFICATIONSCORE_ID")) + { + db.updateData("CLASSIFICATION", ["CLASSIFICATIONSCORE_ID"], null, [ + vars.get("$field.CLASSIFICATIONSCORE_ID") + ], SqlCondition.equals("CLASSIFICATION.CLASSIFICATIONID", vars.get("$field.CLASSIFICATIONID"), "1=2")); + } + else + { + db.deleteData("CLASSIFICATION", SqlCondition.equals("CLASSIFICATION.CLASSIFICATIONID", vars.get("$field.CLASSIFICATIONID"))); + } +} +else if (vars.get("$field.CLASSIFICATIONSCORE_ID")) +{ + var newId = util.getNewUUID(); + db.insertData("CLASSIFICATION", ["CLASSIFICATIONID", "OBJECT_TYPE", "OBJECT_ROWID", "CLASSIFICATIONTYPE_ID", "CLASSIFICATIONSCORE_ID"], null, [ + newId, + vars.get("$field.OBJECT_TYPE"), + vars.get("$field.OBJECT_ROWID"), + vars.get("$field.CLASSIFICATIONTYPE_ID"), + vars.get("$field.CLASSIFICATIONSCORE_ID"), + ]); + + neon.setFieldValue("$field.CLASSIFICATIONID", newId); +} + +// update classificationgroup-name and scoretype-name if they were changed +changed.forEach(function(change) +{ + switch (change) + { + case "CLASSIFICATIONGROUP.value": + var oldGroupName = ClassificationUtils.getGroupFromDb(vars.get("$field.CLASSIFICATIONTYPEID")); + var newGroupName = vars.get("$field.CLASSIFICATIONGROUP"); + + ClassificationUtils.changeGroupName(oldGroupName, newGroupName, vars.get("$field.CLASSIFICATIONTYPE")) + case "SCORETYPE.value": + var classificationTypeId = vars.get("$field.CLASSIFICATIONTYPEID"); + var newScoreName = vars.get("$field.SCORETYPE"); + + ClassificationUtils.changeScoreName(newScoreName, classificationTypeId); + } +}) \ No newline at end of file diff --git a/entity/ClassificationScore_entity/ClassificationScore_entity.aod b/entity/ClassificationScore_entity/ClassificationScore_entity.aod index 938ac430214..e299b4b560e 100644 --- a/entity/ClassificationScore_entity/ClassificationScore_entity.aod +++ b/entity/ClassificationScore_entity/ClassificationScore_entity.aod @@ -1,138 +1,130 @@ -<?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.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6"> - <name>ClassificationScore_entity</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <title>Possible Value</title> - <contentTitleProcess>%aditoprj%/entity/ClassificationScore_entity/contentTitleProcess.js</contentTitleProcess> - <titlePlural>Possible Values</titlePlural> - <recordContainer>db</recordContainer> - <entityFields> - <entityProvider> - <name>#PROVIDER</name> - </entityProvider> - <entityField> - <name>CLASSIFICATIONSCOREID</name> - <valueProcess>%aditoprj%/entity/ClassificationScore_entity/entityfields/classificationscoreid/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>TITLE</name> - <title>Title</title> - <mandatory v="true" /> - </entityField> - <entityField> - <name>CLASSIFICATIONTYPE_ID</name> - <valueProcess>%aditoprj%/entity/ClassificationScore_entity/entityfields/classificationtype_id/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/ClassificationScore_entity/entityfields/classificationtype_id/displayValueProcess.js</displayValueProcess> - </entityField> - <entityField> - <name>SORT</name> - <title>Sorting</title> - <mandatory v="true" /> - </entityField> - <entityField> - <name>SCORE</name> - <title>Score</title> - <contentType>NUMBER</contentType> - <outputFormat>#,##0.00</outputFormat> - <inputFormat>#,##0.00</inputFormat> - <mandatory v="true" /> - <onValidation>%aditoprj%/entity/ClassificationScore_entity/entityfields/score/onValidation.js</onValidation> - </entityField> - <entityProvider> - <name>ClassificationScores</name> - <dependencies> - <entityDependency> - <name>85ff242d-a743-413f-8112-6d589baa30de</name> - <entityName>Classification_entity</entityName> - <fieldName>ClassificationScores</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - <children> - <entityParameter> - <name>ClassificationGroup_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="true" /> - </entityParameter> - <entityParameter> - <name>ClassificationTypeId_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="true" /> - </entityParameter> - <entityParameter> - <name>ClassificationType_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="true" /> - </entityParameter> - </children> - </entityProvider> - <entityParameter> - <name>ClassificationTypeId_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityField> - <name>MaxValue</name> - <valueProcess>%aditoprj%/entity/ClassificationScore_entity/entityfields/maxvalue/valueProcess.js</valueProcess> - </entityField> - <entityParameter> - <name>ClassificationGroup_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>ClassificationType_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - </entityFields> - <recordContainers> - <dbRecordContainer> - <name>db</name> - <alias>Data_alias</alias> - <conditionProcess>%aditoprj%/entity/ClassificationScore_entity/recordcontainers/db/conditionProcess.js</conditionProcess> - <orderClauseProcess>%aditoprj%/entity/ClassificationScore_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> - <onDBDelete>%aditoprj%/entity/ClassificationScore_entity/recordcontainers/db/onDBDelete.js</onDBDelete> - <linkInformation> - <linkInformation> - <name>e2fecaf8-bc95-4a4d-bd96-88731568b1a4</name> - <tableName>CLASSIFICATIONSCORE</tableName> - <primaryKey>CLASSIFICATIONSCOREID</primaryKey> - <isUIDTable v="true" /> - <readonly v="false" /> - </linkInformation> - </linkInformation> - <recordFieldMappings> - <dbRecordFieldMapping> - <name>CLASSIFICATIONSCOREID.value</name> - <recordfield>CLASSIFICATIONSCORE.CLASSIFICATIONSCOREID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>SCORE.value</name> - <recordfield>CLASSIFICATIONSCORE.SCORE</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>SORT.value</name> - <recordfield>CLASSIFICATIONSCORE.SORT</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>TITLE.value</name> - <recordfield>CLASSIFICATIONSCORE.TITLE</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>CLASSIFICATIONTYPE_ID.value</name> - <recordfield>CLASSIFICATIONSCORE.CLASSIFICATIONTYPE_ID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>CLASSIFICATIONTYPE_ID.displayValue</name> - <expression>%aditoprj%/entity/ClassificationScore_entity/recordcontainers/db/recordfieldmappings/classificationtype_id.displayvalue/expression.js</expression> - </dbRecordFieldMapping> - </recordFieldMappings> - </dbRecordContainer> - </recordContainers> -</entity> +<?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.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6"> + <name>ClassificationScore_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <title>Possible Value</title> + <contentTitleProcess>%aditoprj%/entity/ClassificationScore_entity/contentTitleProcess.js</contentTitleProcess> + <titlePlural>Possible Values</titlePlural> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>CLASSIFICATIONSCOREID</name> + <valueProcess>%aditoprj%/entity/ClassificationScore_entity/entityfields/classificationscoreid/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>TITLE</name> + <title>Title</title> + <mandatory v="true" /> + </entityField> + <entityField> + <name>CLASSIFICATIONTYPE_ID</name> + <valueProcess>%aditoprj%/entity/ClassificationScore_entity/entityfields/classificationtype_id/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/ClassificationScore_entity/entityfields/classificationtype_id/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>SORT</name> + <title>Sorting</title> + <mandatory v="true" /> + </entityField> + <entityField> + <name>SCORE</name> + <title>Score</title> + <contentType>NUMBER</contentType> + <outputFormat>#,##0.00</outputFormat> + <inputFormat>#,##0.00</inputFormat> + <mandatory v="true" /> + <onValidation>%aditoprj%/entity/ClassificationScore_entity/entityfields/score/onValidation.js</onValidation> + </entityField> + <entityProvider> + <name>ClassificationScores</name> + <children> + <entityParameter> + <name>ClassificationGroup_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="true" /> + </entityParameter> + <entityParameter> + <name>ClassificationTypeId_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="true" /> + </entityParameter> + <entityParameter> + <name>ClassificationType_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="true" /> + </entityParameter> + </children> + </entityProvider> + <entityParameter> + <name>ClassificationTypeId_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityField> + <name>MaxValue</name> + <valueProcess>%aditoprj%/entity/ClassificationScore_entity/entityfields/maxvalue/valueProcess.js</valueProcess> + </entityField> + <entityParameter> + <name>ClassificationGroup_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>ClassificationType_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <conditionProcess>%aditoprj%/entity/ClassificationScore_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <orderClauseProcess>%aditoprj%/entity/ClassificationScore_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> + <onDBDelete>%aditoprj%/entity/ClassificationScore_entity/recordcontainers/db/onDBDelete.js</onDBDelete> + <linkInformation> + <linkInformation> + <name>e2fecaf8-bc95-4a4d-bd96-88731568b1a4</name> + <tableName>CLASSIFICATIONSCORE</tableName> + <primaryKey>CLASSIFICATIONSCOREID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>CLASSIFICATIONSCOREID.value</name> + <recordfield>CLASSIFICATIONSCORE.CLASSIFICATIONSCOREID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>SCORE.value</name> + <recordfield>CLASSIFICATIONSCORE.SCORE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>SORT.value</name> + <recordfield>CLASSIFICATIONSCORE.SORT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>TITLE.value</name> + <recordfield>CLASSIFICATIONSCORE.TITLE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CLASSIFICATIONTYPE_ID.value</name> + <recordfield>CLASSIFICATIONSCORE.CLASSIFICATIONTYPE_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CLASSIFICATIONTYPE_ID.displayValue</name> + <expression>%aditoprj%/entity/ClassificationScore_entity/recordcontainers/db/recordfieldmappings/classificationtype_id.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/Classification_entity/Classification_entity.aod b/entity/Classification_entity/Classification_entity.aod index 05231fb10e0..d31d020aac4 100644 --- a/entity/Classification_entity/Classification_entity.aod +++ b/entity/Classification_entity/Classification_entity.aod @@ -1,221 +1,180 @@ -<?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.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6"> - <name>Classification_entity</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <title>Classification</title> - <grantDeleteProcess>%aditoprj%/entity/Classification_entity/grantDeleteProcess.js</grantDeleteProcess> - <afterOperatingState>%aditoprj%/entity/Classification_entity/afterOperatingState.js</afterOperatingState> - <titlePlural>Classifications</titlePlural> - <recordContainer>jdito</recordContainer> - <entityFields> - <entityProvider> - <name>#PROVIDER</name> - </entityProvider> - <entityField> - <name>CLASSIFICATIONID</name> - <searchable v="false" /> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationid/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>CLASSIFICATIONSCORE_ID</name> - <title>Selection</title> - <consumer>ClassificationScores</consumer> - <searchable v="false" /> - <titleProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationscore_id/titleProcess.js</titleProcess> - <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationscore_id/displayValueProcess.js</displayValueProcess> - </entityField> - <entityParameter> - <name>ClassificationType_param</name> - <expose v="true" /> - <mandatory v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <expose v="true" /> - <mandatory v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>ObjectRowid_param</name> - <expose v="true" /> - <mandatory v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityProvider> - <name>Classifications</name> - <dependencies> - <entityDependency> - <name>6274acfa-3dbf-4a9b-8926-2a2d1ff80d6d</name> - <entityName>Salesproject_entity</entityName> - <fieldName>Classifications</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - <children> - <entityParameter> - <name>IsAdminMode_param</name> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classifications/children/isadminmode_param/valueProcess.js</valueProcess> - <expose v="true" /> - <triggerRecalculation v="true" /> - </entityParameter> - </children> - </entityProvider> - <entityField> - <name>CLASSIFICATIONTYPEID</name> - <searchable v="false" /> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtypeid/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>CLASSIFICATIONGROUP</name> - <contentType>TEXT</contentType> - <mandatoryProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/mandatoryProcess.js</mandatoryProcess> - <dropDownProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/dropDownProcess.js</dropDownProcess> - <textInputAllowed v="true" /> - <searchable v="false" /> - <groupable v="true" /> - <titleProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/titleProcess.js</titleProcess> - <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/displayValueProcess.js</displayValueProcess> - <onValidation>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/onValidation.js</onValidation> - </entityField> - <entityField> - <name>CLASSIFICATIONTYPE_ID</name> - <searchable v="false" /> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtype_id/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>OBJECT_ROWID</name> - <searchable v="false" /> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/object_rowid/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>OBJECT_TYPE</name> - <searchable v="false" /> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/object_type/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>UID</name> - <searchable v="false" /> - </entityField> - <entityConsumer> - <name>ClassificationScores</name> - <state>INVISIBLE</state> - <stateProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationscores/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>ClassificationScore_entity</entityName> - <fieldName>ClassificationScores</fieldName> - </dependency> - <children> - <entityParameter> - <name>ClassificationGroup_param</name> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationscores/children/classificationgroup_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>ClassificationTypeId_param</name> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationscores/children/classificationtypeid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>ClassificationType_param</name> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationscores/children/classificationtype_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityActionField> - <name>edit</name> - <onActionProcess>%aditoprj%/entity/Classification_entity/entityfields/edit/onActionProcess.js</onActionProcess> - </entityActionField> - <entityField> - <name>CLASSIFICATIONTYPE</name> - <title>Usage</title> - <consumer>KeywordClassificationTypes</consumer> - <mandatory v="true" /> - <searchable v="true" /> - <groupable v="true" /> - <stateProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtype/stateProcess.js</stateProcess> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtype/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtype/displayValueProcess.js</displayValueProcess> - </entityField> - <entityProvider> - <name>ClassificationsAdministration</name> - <dependencies> - <entityDependency> - <name>67603e12-a23a-4f3f-9fcd-b128bd5f9b5f</name> - <entityName>ClassificationAdmin_entity</entityName> - <fieldName>ClassificationsAdmin</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - <children> - <entityParameter> - <name>IsAdminMode_param</name> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationsadministration/children/isadminmode_param/valueProcess.js</valueProcess> - <expose v="false" /> - </entityParameter> - </children> - </entityProvider> - <entityParameter> - <name>IsAdminMode_param</name> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/isadminmode_param/valueProcess.js</valueProcess> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityField> - <name>Info</name> - <title>Rating</title> - <contentType>HTML</contentType> - <searchable v="false" /> - <state>READONLY</state> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/info/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>SCORE_RESULTS</name> - <searchable v="false" /> - </entityField> - <entityConsumer> - <name>KeywordClassificationTypes</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContainerName_param</name> - <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/keywordclassificationtypes/children/containername_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityField> - <name>SCORETYPE</name> - <title>Scoretype</title> - <mandatory v="true" /> - <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/scoretype/displayValueProcess.js</displayValueProcess> - </entityField> - </entityFields> - <recordContainers> - <jDitoRecordContainer> - <name>jdito</name> - <jDitoRecordAlias>Data_alias</jDitoRecordAlias> - <isFilterable v="true" /> - <isRequireContainerFiltering v="true" /> - <contentProcess>%aditoprj%/entity/Classification_entity/recordcontainers/jdito/contentProcess.js</contentProcess> - <onInsert>%aditoprj%/entity/Classification_entity/recordcontainers/jdito/onInsert.js</onInsert> - <onUpdate>%aditoprj%/entity/Classification_entity/recordcontainers/jdito/onUpdate.js</onUpdate> - <onDelete>%aditoprj%/entity/Classification_entity/recordcontainers/jdito/onDelete.js</onDelete> - <recordFields> - <element>UID.value</element> - <element>CLASSIFICATIONID.value</element> - <element>CLASSIFICATIONGROUP.value</element> - <element>CLASSIFICATIONSCORE_ID.value</element> - <element>CLASSIFICATIONTYPEID.value</element> - <element>CLASSIFICATIONTYPE_ID.value</element> - <element>OBJECT_ROWID.value</element> - <element>OBJECT_TYPE.value</element> - <element>SCORETYPE.value</element> - <element>CLASSIFICATIONTYPE.value</element> - <element>SCORE_RESULTS.value</element> - </recordFields> - </jDitoRecordContainer> - </recordContainers> -</entity> +<?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.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6"> + <name>Classification_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <title>Classification</title> + <grantCreate v="false" /> + <grantDelete v="false" /> + <grantDeleteProcess>%aditoprj%/entity/Classification_entity/grantDeleteProcess.js</grantDeleteProcess> + <afterOperatingState>%aditoprj%/entity/Classification_entity/afterOperatingState.js</afterOperatingState> + <titlePlural>Classifications</titlePlural> + <recordContainer>jdito</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>CLASSIFICATIONID</name> + <searchable v="false" /> + </entityField> + <entityField> + <name>CLASSIFICATIONSCORE_ID</name> + <title>Selection</title> + <consumer>ClassificationScores</consumer> + <searchable v="false" /> + <titleProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationscore_id/titleProcess.js</titleProcess> + <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationscore_id/displayValueProcess.js</displayValueProcess> + </entityField> + <entityParameter> + <name>ClassificationType_param</name> + <expose v="true" /> + <mandatory v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <expose v="true" /> + <mandatory v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>ObjectRowid_param</name> + <expose v="true" /> + <mandatory v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityProvider> + <name>Classifications</name> + <dependencies> + <entityDependency> + <name>6274acfa-3dbf-4a9b-8926-2a2d1ff80d6d</name> + <entityName>Salesproject_entity</entityName> + <fieldName>Classifications</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityField> + <name>CLASSIFICATIONTYPEID</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtypeid/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>CLASSIFICATIONGROUP</name> + <contentType>TEXT</contentType> + <groupable v="true" /> + <mandatoryProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/mandatoryProcess.js</mandatoryProcess> + <textInputAllowed v="true" /> + <searchable v="false" /> + <titleProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/titleProcess.js</titleProcess> + <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationgroup/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>CLASSIFICATIONTYPE_ID</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtype_id/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>OBJECT_ROWID</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/object_rowid/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>OBJECT_TYPE</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/object_type/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>UID</name> + <searchable v="false" /> + </entityField> + <entityConsumer> + <name>ClassificationScores</name> + <dependency> + <name>dependency</name> + <entityName>ClassificationScore_entity</entityName> + <fieldName>ClassificationScores</fieldName> + </dependency> + <children> + <entityParameter> + <name>ClassificationGroup_param</name> + <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationscores/children/classificationgroup_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ClassificationTypeId_param</name> + <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationscores/children/classificationtypeid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ClassificationType_param</name> + <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationscores/children/classificationtype_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>CLASSIFICATIONTYPE</name> + <title>Usage</title> + <consumer>KeywordClassificationTypes</consumer> + <groupable v="true" /> + <mandatory v="true" /> + <searchable v="true" /> + <stateProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtype/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtype/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/classificationtype/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>Info</name> + <title>Rating</title> + <contentType>HTML</contentType> + <searchable v="false" /> + <state>READONLY</state> + <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/info/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>SCORE_RESULTS</name> + <searchable v="false" /> + </entityField> + <entityConsumer> + <name>KeywordClassificationTypes</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/Classification_entity/entityfields/keywordclassificationtypes/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>SCORETYPE</name> + <title>Scoretype</title> + <mandatory v="true" /> + <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/scoretype/displayValueProcess.js</displayValueProcess> + </entityField> + </entityFields> + <recordContainers> + <jDitoRecordContainer> + <name>jdito</name> + <jDitoRecordAlias>Data_alias</jDitoRecordAlias> + <isFilterable v="true" /> + <isRequireContainerFiltering v="true" /> + <contentProcess>%aditoprj%/entity/Classification_entity/recordcontainers/jdito/contentProcess.js</contentProcess> + <onUpdate>%aditoprj%/entity/Classification_entity/recordcontainers/jdito/onUpdate.js</onUpdate> + <recordFields> + <element>UID.value</element> + <element>CLASSIFICATIONID.value</element> + <element>CLASSIFICATIONGROUP.value</element> + <element>CLASSIFICATIONSCORE_ID.value</element> + <element>CLASSIFICATIONTYPEID.value</element> + <element>CLASSIFICATIONTYPE_ID.value</element> + <element>OBJECT_ROWID.value</element> + <element>OBJECT_TYPE.value</element> + <element>SCORETYPE.value</element> + <element>CLASSIFICATIONTYPE.value</element> + <element>SCORE_RESULTS.value</element> + </recordFields> + </jDitoRecordContainer> + </recordContainers> +</entity> diff --git a/entity/Classification_entity/entityfields/classificationgroup/displayValueProcess.js b/entity/Classification_entity/entityfields/classificationgroup/displayValueProcess.js index 3d98527e13f..6a123b06858 100644 --- a/entity/Classification_entity/entityfields/classificationgroup/displayValueProcess.js +++ b/entity/Classification_entity/entityfields/classificationgroup/displayValueProcess.js @@ -1,26 +1,17 @@ -import("system.db"); -import("system.vars"); -import("system.result"); +import("Classification_lib"); import("system.translate"); -import("Sql_lib"); -import("Classification_lib") +import("system.result"); +import("system.vars"); -if (vars.exists("$param.IsAdminMode_param") && vars.get("$param.IsAdminMode_param") == "1") -{ - result.string(translate.text(vars.get("$this.value"))); -} -else +if (vars.getString("$field.CLASSIFICATIONGROUP")) { - if (vars.getString("$field.CLASSIFICATIONGROUP")) - { - var score = JSON.parse(vars.getString("$field.SCORE_RESULTS"))[vars.getString("$field.CLASSIFICATIONGROUP")]; + var score = JSON.parse(vars.getString("$field.SCORE_RESULTS"))[vars.getString("$field.CLASSIFICATIONGROUP")]; - if (!score) - score = 0; - else - score = parseInt(score); + if (!score) + score = 0; + else + score = parseInt(score); - result.string(translate.text(vars.get("$this.value")) + ": " + score + " " + translate.text("points") + " = " + ClassificationUtils.mapToClass(score)); + result.string(translate.text(vars.get("$this.value")) + ": " + score + " " + translate.text("points") + " = " + ClassificationUtils.mapToClass(score)); - } } diff --git a/entity/Classification_entity/entityfields/classificationgroup/dropDownProcess.js b/entity/Classification_entity/entityfields/classificationgroup/dropDownProcess.js deleted file mode 100644 index 455cfc292bc..00000000000 --- a/entity/Classification_entity/entityfields/classificationgroup/dropDownProcess.js +++ /dev/null @@ -1,12 +0,0 @@ -import("Classification_lib"); -import("system.neon"); -import("system.vars"); -import("system.db"); -import("system.result"); -if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.IsAdminMode_param") && vars.get("$param.IsAdminMode_param") == "1") -{ - // use param if available or current selectionRows - var classificationType = vars.get("$field.CLASSIFICATIONTYPE") - if (classificationType) - result.object(ClassificationUtils.getAllGroups(classificationType, true)); -} \ No newline at end of file diff --git a/entity/Classification_entity/entityfields/classifications/children/isadminmode_param/valueProcess.js b/entity/Classification_entity/entityfields/classifications/children/isadminmode_param/valueProcess.js deleted file mode 100644 index 9358b57687a..00000000000 --- a/entity/Classification_entity/entityfields/classifications/children/isadminmode_param/valueProcess.js +++ /dev/null @@ -1,3 +0,0 @@ -import("system.result"); - -result.string(0); \ No newline at end of file diff --git a/entity/Classification_entity/entityfields/classificationsadministration/children/isadminmode_param/valueProcess.js b/entity/Classification_entity/entityfields/classificationsadministration/children/isadminmode_param/valueProcess.js deleted file mode 100644 index 0488a23572b..00000000000 --- a/entity/Classification_entity/entityfields/classificationsadministration/children/isadminmode_param/valueProcess.js +++ /dev/null @@ -1,3 +0,0 @@ -import("system.result"); - -result.string(1); \ No newline at end of file diff --git a/entity/Classification_entity/entityfields/classificationscores/stateProcess.js b/entity/Classification_entity/entityfields/classificationscores/stateProcess.js deleted file mode 100644 index 02b7fbc2bb2..00000000000 --- a/entity/Classification_entity/entityfields/classificationscores/stateProcess.js +++ /dev/null @@ -1,12 +0,0 @@ -import("system.neon"); -import("system.result"); -import("system.vars"); - -if (vars.exists("$param.IsAdminMode_param") && vars.getString("$param.IsAdminMode_param") == "1") -{ - result.string(neon.COMPONENTSTATE_EDITABLE); -} -else -{ - result.string(neon.COMPONENTSTATE_INVISIBLE); -} \ No newline at end of file diff --git a/entity/Classification_entity/entityfields/edit/onActionProcess.js b/entity/Classification_entity/entityfields/edit/onActionProcess.js deleted file mode 100644 index 8d018fd74f1..00000000000 --- a/entity/Classification_entity/entityfields/edit/onActionProcess.js +++ /dev/null @@ -1,23 +0,0 @@ -import("system.vars"); -import("system.neon"); -import("KeywordRegistry_basic"); - -var selection = vars.get("$sys.selectionRows"); -if (selection.length > 0) -{ - var params = { - "ClassificationType_param" : vars.get("$param.ClassificationType_param"), - "ObjectType_param" : vars.get("$param.ObjectType_param"), - "ObjectRowid_param" : vars.get("$param.ObjectRowid_param"), - "IsAdminMode_param" : vars.get("$param.IsAdminMode_param") - } - - var view = "ClassificatonEdit_view"; - - if (vars.exists("$param.IsAdminMode_param") && vars.get("$param.IsAdminMode_param") == "1") - view = "ClassificatonAdminEdit_view"; - - neon.openContext("Classification", view, [selection[0].UID], neon.OPERATINGSTATE_EDIT, params); -} - - diff --git a/entity/Classification_entity/entityfields/isadminmode_param/valueProcess.js b/entity/Classification_entity/entityfields/isadminmode_param/valueProcess.js deleted file mode 100644 index 55b34600836..00000000000 --- a/entity/Classification_entity/entityfields/isadminmode_param/valueProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.vars"); -import("system.result"); - -result.string(1); \ No newline at end of file diff --git a/entity/Classification_entity/grantDeleteProcess.js b/entity/Classification_entity/grantDeleteProcess.js index 9a1336d5cf5..e69de29bb2d 100644 --- a/entity/Classification_entity/grantDeleteProcess.js +++ b/entity/Classification_entity/grantDeleteProcess.js @@ -1,23 +0,0 @@ -import("system.logging"); -import("system.result"); -import("system.db"); -import("system.vars"); -import("Sql_lib"); - -/*logging.log(db.cell(SqlCondition.begin() - .andPrepare("CLASSIFICATION.CLASSIFICATIONTYPE_ID", vars.get("$field.CLASSIFICATIONTYPEID")) - .buildSql("select count(*) from CLASSIFICATION", "1=2"))) -/*result.object(parseInt(db.cell(SqlCondition.begin() - .andPrepare("CLASSIFICATION.CLASSIFICATIONTYPE_ID", vars.get("$field.CLASSIFICATIONTYPEID")) - .buildSql("select count(*) from CLASSIFICATION", "1=2"))) <= 0);*/ - -//{ - /*db.deleteData("CLASSIFICATION", "CLASSIFICATION.CLASSIFICATIONTYPE_ID in (" + db.translateStatement( - SqlCondition.begin() - .andPrepare("CLASSIFICATIONTYPE.SCORETYPE", type) - .buildSql("select CLASSIFICATIONTYPE.CLASSIFICATIONTYPEID from CLASSIFICATIONTYPE", "1=2")) + ")"); - db.deleteData("CLASSIFICATIONTYPE", SqlCondition.equals("CLASSIFICATIONTYPE.SCORETYPE", type, "1=2")); - db.deleteData("CLASSIFICATIONSCORE", SqlCondition.equals("CLASSIFICATIONSCORE.SCORETYPE", type, "1=2"));*/ - -//} -//neon.refreshAll(); \ No newline at end of file diff --git a/entity/Classification_entity/recordcontainers/jdito/contentProcess.js b/entity/Classification_entity/recordcontainers/jdito/contentProcess.js index 2ec8ccdd5b6..a1d32e641ea 100644 --- a/entity/Classification_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Classification_entity/recordcontainers/jdito/contentProcess.js @@ -5,15 +5,7 @@ import("Sql_lib"); import("system.db"); import("system.result"); -var admin = (vars.exists("$param.IsAdminMode_param") && vars.get("$param.IsAdminMode_param") == "1") -var scores = {}; - - - -if (!admin) -{ - scores = JSON.stringify(ClassificationUtils.getScore(vars.get("$param.ClassificationType_param"), vars.get("$param.ObjectType_param"), vars.get("$param.ObjectRowid_param"))); -} +var scores = JSON.stringify(ClassificationUtils.getScore(vars.get("$param.ClassificationType_param"), vars.get("$param.ObjectType_param"), vars.get("$param.ObjectRowid_param"))); @@ -41,13 +33,11 @@ var cond = SqlCondition.begin() if (!classificationId) { - cond.andPrepareIfSet("CLASSIFICATIONTYPE.CLASSIFICATIONTYPEID", classificationTypeId); - - if(!admin) - cond.andSqlCondition(SqlCondition.begin().orPrepareVars("CLASSIFICATION.OBJECT_TYPE", "$param.ObjectType_param") + cond.andPrepareIfSet("CLASSIFICATIONTYPE.CLASSIFICATIONTYPEID", classificationTypeId) + .andSqlCondition(SqlCondition.begin().orPrepareVars("CLASSIFICATION.OBJECT_TYPE", "$param.ObjectType_param") .or("CLASSIFICATION.OBJECT_TYPE is null")) - .andSqlCondition(SqlCondition.begin().orPrepareVars("CLASSIFICATION.OBJECT_ROWID", "$param.ObjectRowid_param") - .or("CLASSIFICATION.OBJECT_ROWID is null")) + .andSqlCondition(SqlCondition.begin().orPrepareVars("CLASSIFICATION.OBJECT_ROWID", "$param.ObjectRowid_param") + .or("CLASSIFICATION.OBJECT_ROWID is null")); } if (vars.exists("$local.filter") && vars.get("$local.filter")) @@ -63,7 +53,7 @@ result.object(db.table(cond.buildSql("select case when CLASSIFICATIONID is not n right join CLASSIFICATIONTYPE on " + db.translateCondition(SqlCondition.begin() .and("CLASSIFICATIONTYPE_ID = CLASSIFICATIONTYPEID") .andPrepareVars("CLASSIFICATION.OBJECT_TYPE", "$param.ObjectType_param") - .andPrepareVars("CLASSIFICATION.OBJECT_ROWID", "$param.ObjectRowid_param").build()), (admin ? "1=1" : "1=2"), "order by CLASSIFICATIONGROUP asc")) + .andPrepareVars("CLASSIFICATION.OBJECT_ROWID", "$param.ObjectRowid_param").build()), "1=2", "order by CLASSIFICATIONGROUP asc")) .map(function(pRow) { pRow.push(scores); diff --git a/entity/Classification_entity/recordcontainers/jdito/onUpdate.js b/entity/Classification_entity/recordcontainers/jdito/onUpdate.js index 3bd1eec5345..97a12f0cbc5 100644 --- a/entity/Classification_entity/recordcontainers/jdito/onUpdate.js +++ b/entity/Classification_entity/recordcontainers/jdito/onUpdate.js @@ -33,26 +33,4 @@ else if (vars.get("$field.CLASSIFICATIONSCORE_ID")) ]); neon.setFieldValue("$field.CLASSIFICATIONID", newId); -} - -// update classificationgroup-name and scoretype-name if they were changed (only in admin) -if (vars.exists("$param.IsAdminMode_param") && vars.exists("$param.IsAdminMode_param") == "1") -{ - changed.forEach(function(change) - { - switch (change) - { - case "CLASSIFICATIONGROUP.value": - var oldGroupName = ClassificationUtils.getGroupFromDb(vars.get("$field.CLASSIFICATIONTYPEID")); - var newGroupName = vars.get("$field.CLASSIFICATIONGROUP"); - - ClassificationUtils.changeGroupName(oldGroupName, newGroupName, vars.get("$field.CLASSIFICATIONTYPE")) - case "SCORETYPE.value": - var classificationTypeId = vars.get("$field.CLASSIFICATIONTYPEID"); - var newScoreName = vars.get("$field.SCORETYPE"); - - ClassificationUtils.changeScoreName(newScoreName, classificationTypeId); - } - }) - } \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/classificationresult/valueProcess.js b/entity/Salesproject_entity/entityfields/classificationresult/valueProcess.js index aa00d635b63..1a3d4a1e24a 100644 --- a/entity/Salesproject_entity/entityfields/classificationresult/valueProcess.js +++ b/entity/Salesproject_entity/entityfields/classificationresult/valueProcess.js @@ -1,7 +1,10 @@ +import("system.logging"); import("KeywordRegistry_basic"); import("system.vars"); import("system.result"); import("Classification_lib") import("Context_lib") -result.string(ClassificationUtils.getClass($KeywordRegistry.classificationType$salesproject(), ContextUtils.getCurrentContextId(), vars.get("$sys.uid"))); \ No newline at end of file +var classes = ClassificationUtils.getClass($KeywordRegistry.classificationType$salesproject(), ContextUtils.getCurrentContextId(), vars.get("$sys.uid")) +logging.log(classes) +result.string(classes); \ No newline at end of file diff --git a/neonContext/Classification/Classification.aod b/neonContext/Classification/Classification.aod index 958b89c743a..06dec410669 100644 --- a/neonContext/Classification/Classification.aod +++ b/neonContext/Classification/Classification.aod @@ -1,30 +1,18 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0"> - <name>Classification</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <documentation>%aditoprj%/neonContext/Classification/documentation.adoc</documentation> - <editview>ClassificatonAdminEdit_view</editview> - <entity>Classification_entity</entity> - <references> - <neonViewReference> - <name>3ab6b4d1-e6db-42be-8262-2499a3d114e9</name> - <view>ClassificationTree_view</view> - </neonViewReference> - <neonViewReference> - <name>359f42a2-1014-4d81-aa65-8f6aeba10f2d</name> - <view>ClassificatonAdminEdit_view</view> - </neonViewReference> - <neonViewReference> - <name>b54f49d0-3577-4221-8fd1-fc1c8239d689</name> - <view>ClassificationAdminTree_view</view> - </neonViewReference> - <neonViewReference> - <name>50c0d5c5-c84f-452d-9f77-41b82ac0319f</name> - <view>ClassificatonEdit_view</view> - </neonViewReference> - <neonViewReference> - <name>8412dc60-bffd-49bd-a68d-c730404b807b</name> - <view>ClassificationFilter_view</view> - </neonViewReference> - </references> -</neonContext> +<?xml version="1.0" encoding="UTF-8"?> +<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0"> + <name>Classification</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <documentation>%aditoprj%/neonContext/Classification/documentation.adoc</documentation> + <preview>ClassificatonPreview_view</preview> + <entity>Classification_entity</entity> + <references> + <neonViewReference> + <name>3ab6b4d1-e6db-42be-8262-2499a3d114e9</name> + <view>ClassificationTree_view</view> + </neonViewReference> + <neonViewReference> + <name>50c0d5c5-c84f-452d-9f77-41b82ac0319f</name> + <view>ClassificatonPreview_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonContext/ClassificationAdmin/ClassificationAdmin.aod b/neonContext/ClassificationAdmin/ClassificationAdmin.aod index a1594f3adbd..809c94a1d06 100644 --- a/neonContext/ClassificationAdmin/ClassificationAdmin.aod +++ b/neonContext/ClassificationAdmin/ClassificationAdmin.aod @@ -1,15 +1,25 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0"> - <name>ClassificationAdmin</name> - <title></title> - <majorModelMode>DISTRIBUTED</majorModelMode> - <documentation>%aditoprj%/neonContext/ClassificationAdmin/documentation.adoc</documentation> - <mainview>ClassificationAdminMain_view</mainview> - <entity>ClassificationAdmin_entity</entity> - <references> - <neonViewReference> - <name>4a240156-6c62-46d8-890e-b5c239ef8128</name> - <view>ClassificationAdminMain_view</view> - </neonViewReference> - </references> -</neonContext> +<?xml version="1.0" encoding="UTF-8"?> +<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0"> + <name>ClassificationAdmin</name> + <title></title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <documentation>%aditoprj%/neonContext/ClassificationAdmin/documentation.adoc</documentation> + <filterview>ClassificationAdminTree_view</filterview> + <editview>ClassificationAdminEdit_view</editview> + <preview>ClassificatonAdminPreview_view</preview> + <entity>ClassificationAdmin_entity</entity> + <references> + <neonViewReference> + <name>d2a900f6-8860-4bd6-bc8a-3a8261fb9b3d</name> + <view>ClassificationAdminTree_view</view> + </neonViewReference> + <neonViewReference> + <name>3d860a00-13a4-45ef-8087-487ea80bb84b</name> + <view>ClassificatonAdminPreview_view</view> + </neonViewReference> + <neonViewReference> + <name>2c6e2b30-0fd1-4f12-bf9f-d4bbcfbed8aa</name> + <view>ClassificationAdminEdit_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonContext/ClassificationScore/ClassificationScore.aod b/neonContext/ClassificationScore/ClassificationScore.aod index 30e849af745..1b36df91560 100644 --- a/neonContext/ClassificationScore/ClassificationScore.aod +++ b/neonContext/ClassificationScore/ClassificationScore.aod @@ -1,12 +1,16 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0"> - <name>ClassificationScore</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <entity>ClassificationScore_entity</entity> - <references> - <neonViewReference> - <name>ccaf4443-07e0-4e29-a73d-2073d132fbe6</name> - <view>ClassificationScoreMultipleEdit_view</view> - </neonViewReference> - </references> -</neonContext> +<?xml version="1.0" encoding="UTF-8"?> +<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0"> + <name>ClassificationScore</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <entity>ClassificationScore_entity</entity> + <references> + <neonViewReference> + <name>ccaf4443-07e0-4e29-a73d-2073d132fbe6</name> + <view>ClassificationScoreMultiplePreview_view</view> + </neonViewReference> + <neonViewReference> + <name>e857034a-2e2c-4026-8833-12ba4ce597d0</name> + <view>ClassificationScoreMultipleEdit_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonView/ClassificationAdminEdit_view/ClassificationAdminEdit_view.aod b/neonView/ClassificationAdminEdit_view/ClassificationAdminEdit_view.aod new file mode 100644 index 00000000000..4c48e7bb07f --- /dev/null +++ b/neonView/ClassificationAdminEdit_view/ClassificationAdminEdit_view.aod @@ -0,0 +1,40 @@ +<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>ClassificationAdminEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <isSmall v="true" /> + <layout> + <boxLayout> + <name>layout</name> + <autoHeight v="true" /> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>classification</name> + <editMode v="true" /> + <showDrawer v="true" /> + <drawerCaption>Classification</drawerCaption> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>c702f17c-af6c-4674-bbef-9586adfa3f3b</name> + <entityField>CLASSIFICATIONTYPE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>66ce2c02-1cd3-4867-91a6-825655d6d16a</name> + <entityField>CLASSIFICATIONGROUP</entityField> + </entityFieldLink> + <entityFieldLink> + <name>85cf625b-8ea4-4e6f-8b21-2e42314b46d6</name> + <entityField>SCORETYPE</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + <neonViewReference> + <name>cedafb39-a59c-480f-aeff-e6276ea4fb9e</name> + <entityField>ClassificationScores</entityField> + <view>ClassificationScoreMultipleEdit_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/ClassificationAdminMain_view/ClassificationAdminMain_view.aod b/neonView/ClassificationAdminMain_view/ClassificationAdminMain_view.aod deleted file mode 100644 index 638e8eede21..00000000000 --- a/neonView/ClassificationAdminMain_view/ClassificationAdminMain_view.aod +++ /dev/null @@ -1,17 +0,0 @@ -<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> - <name>ClassificationAdminMain_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <layout> - <boxLayout> - <name>layout</name> - </boxLayout> - </layout> - <children> - <neonViewReference> - <name>ce2fe9f5-b504-45fb-9cf0-be394f7aa901</name> - <entityField>ClassificationsAdmin</entityField> - <view>ClassificationAdminTree_view</view> - </neonViewReference> - </children> -</neonView> diff --git a/neonView/ClassificationAdminTree_view/ClassificationAdminTree_view.aod b/neonView/ClassificationAdminTree_view/ClassificationAdminTree_view.aod index 740c24327fa..e2b1d8b0bc7 100644 --- a/neonView/ClassificationAdminTree_view/ClassificationAdminTree_view.aod +++ b/neonView/ClassificationAdminTree_view/ClassificationAdminTree_view.aod @@ -1,25 +1,23 @@ -<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> - <name>ClassificationAdminTree_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <filterable v="true" /> - <layout> - <boxLayout> - <name>layout</name> - </boxLayout> - </layout> - <children> - <treeViewTemplate> - <name>classificationTree</name> - <titleField>SCORETYPE</titleField> - <defaultGroupFields> - <element>CLASSIFICATIONTYPE</element> - <element>CLASSIFICATIONGROUP</element> - </defaultGroupFields> - <hideContentSearch v="true" /> - <showChildrenCount v="false" /> - <entryAction>edit</entryAction> - <entityField>#ENTITY</entityField> - </treeViewTemplate> - </children> -</neonView> +<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>ClassificationAdminTree_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <treeViewTemplate> + <name>classificationTree</name> + <titleField>SCORETYPE</titleField> + <defaultGroupFields> + <element>CLASSIFICATIONTYPE</element> + <element>CLASSIFICATIONGROUP</element> + </defaultGroupFields> + <showChildrenCount v="false" /> + <entityField>#ENTITY</entityField> + </treeViewTemplate> + </children> +</neonView> diff --git a/neonView/ClassificationFilter_view/ClassificationFilter_view.aod b/neonView/ClassificationFilter_view/ClassificationFilter_view.aod deleted file mode 100644 index 94fe9606866..00000000000 --- a/neonView/ClassificationFilter_view/ClassificationFilter_view.aod +++ /dev/null @@ -1,22 +0,0 @@ -<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> - <name>ClassificationFilter_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <layout> - <boxLayout> - <name>layout</name> - </boxLayout> - </layout> - <children> - <tableViewTemplate> - <name>Classifications</name> - <entityField>#ENTITY</entityField> - <columns> - <neonTableColumn> - <name>f87e6f40-74ad-4f27-b9b0-32e1c6b294f4</name> - <entityField>CLASSIFICATIONTYPE</entityField> - </neonTableColumn> - </columns> - </tableViewTemplate> - </children> -</neonView> diff --git a/neonView/ClassificationScoreMultipleEdit_view/ClassificationScoreMultipleEdit_view.aod b/neonView/ClassificationScoreMultipleEdit_view/ClassificationScoreMultipleEdit_view.aod index c3ace8559d2..db967914146 100644 --- a/neonView/ClassificationScoreMultipleEdit_view/ClassificationScoreMultipleEdit_view.aod +++ b/neonView/ClassificationScoreMultipleEdit_view/ClassificationScoreMultipleEdit_view.aod @@ -1,33 +1,31 @@ -<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> - <name>ClassificationScoreMultipleEdit_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <isSmall v="true" /> - <layout> - <drawerLayout> - <name>layout</name> - <layoutCaption>Possible Values</layoutCaption> - </drawerLayout> - </layout> - <children> - <genericMultipleViewTemplate> - <name>scores</name> - <autoNewRow v="true" /> - <entityField>#ENTITY</entityField> - <columns> - <neonTableColumn> - <name>4c9b65c7-96a8-4524-a465-2e928b51242f</name> - <entityField>TITLE</entityField> - </neonTableColumn> - <neonTableColumn> - <name>9321f0c5-321e-4962-843b-f274d33916be</name> - <entityField>SCORE</entityField> - </neonTableColumn> - <neonTableColumn> - <name>1170097d-0206-445e-8f2d-5768300f0262</name> - <entityField>SORT</entityField> - </neonTableColumn> - </columns> - </genericMultipleViewTemplate> - </children> -</neonView> +<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>ClassificationScoreMultipleEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <drawerLayout> + <name>layout</name> + <layoutCaption>Possible Values</layoutCaption> + </drawerLayout> + </layout> + <children> + <genericMultipleViewTemplate> + <name>scores</name> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>7d49c1b4-3525-410c-92d2-b21a69fd8dec</name> + <entityField>TITLE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>db21eec0-16c6-4267-a785-cb63f15e43b3</name> + <entityField>SCORE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>38641e7a-a8fe-4ad4-af63-efde73d66a9a</name> + <entityField>SORT</entityField> + </neonTableColumn> + </columns> + </genericMultipleViewTemplate> + </children> +</neonView> diff --git a/neonView/ClassificationScoreMultiplePreview_view/ClassificationScoreMultiplePreview_view.aod b/neonView/ClassificationScoreMultiplePreview_view/ClassificationScoreMultiplePreview_view.aod new file mode 100644 index 00000000000..52c6ef70281 --- /dev/null +++ b/neonView/ClassificationScoreMultiplePreview_view/ClassificationScoreMultiplePreview_view.aod @@ -0,0 +1,32 @@ +<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>ClassificationScoreMultiplePreview_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <isSmall v="false" /> + <layout> + <noneLayout> + <name>layout</name> + </noneLayout> + </layout> + <children> + <titledListViewTemplate> + <name>scores</name> + <autoNewRow v="true" /> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>a50378a0-74dd-47fb-804b-f83bc1d25910</name> + <entityField>TITLE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>d56f97c1-a634-4b12-8dd3-c2c32a9e16f1</name> + <entityField>SCORE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>9fb3ba45-55e6-44f0-a612-7ddd54dacce0</name> + <entityField>SORT</entityField> + </neonTableColumn> + </columns> + </titledListViewTemplate> + </children> +</neonView> diff --git a/neonView/ClassificationTree_view/ClassificationTree_view.aod b/neonView/ClassificationTree_view/ClassificationTree_view.aod index f1b678bf8fd..5343c1ed7a9 100644 --- a/neonView/ClassificationTree_view/ClassificationTree_view.aod +++ b/neonView/ClassificationTree_view/ClassificationTree_view.aod @@ -1,32 +1,31 @@ -<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> - <name>ClassificationTree_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <layout> - <noneLayout> - <name>layout</name> - </noneLayout> - </layout> - <children> - <treeTableViewTemplate> - <name>ClassificationTreeTable</name> - <defaultGroupFields> - <element>CLASSIFICATIONGROUP</element> - </defaultGroupFields> - <hideActions v="true" /> - <showChildrenCount v="false" /> - <entryAction>edit</entryAction> - <entityField>#ENTITY</entityField> - <columns> - <neonTableColumn> - <name>246c0212-dadb-4d71-9567-ceab37e9ef10</name> - <entityField>SCORETYPE</entityField> - </neonTableColumn> - <neonTableColumn> - <name>9a62baa4-71cf-4b9d-8cd6-883b233a9b84</name> - <entityField>CLASSIFICATIONSCORE_ID</entityField> - </neonTableColumn> - </columns> - </treeTableViewTemplate> - </children> -</neonView> +<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>ClassificationTree_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <noneLayout> + <name>layout</name> + </noneLayout> + </layout> + <children> + <treeTableViewTemplate> + <name>ClassificationTreeTable</name> + <defaultGroupFields> + <element>CLASSIFICATIONGROUP</element> + </defaultGroupFields> + <hideActions v="true" /> + <showChildrenCount v="false" /> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>246c0212-dadb-4d71-9567-ceab37e9ef10</name> + <entityField>SCORETYPE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>9a62baa4-71cf-4b9d-8cd6-883b233a9b84</name> + <entityField>CLASSIFICATIONSCORE_ID</entityField> + </neonTableColumn> + </columns> + </treeTableViewTemplate> + </children> +</neonView> diff --git a/neonView/ClassificatonAdminEdit_view_/ClassificatonAdminEdit_view.aod b/neonView/ClassificatonAdminEdit_view_/ClassificatonAdminEdit_view.aod new file mode 100644 index 00000000000..e69de29bb2d diff --git a/neonView/ClassificatonAdminEdit_view/ClassificatonAdminEdit_view.aod b/neonView/ClassificatonAdminPreview_view/ClassificatonAdminPreview_view.aod similarity index 86% rename from neonView/ClassificatonAdminEdit_view/ClassificatonAdminEdit_view.aod rename to neonView/ClassificatonAdminPreview_view/ClassificatonAdminPreview_view.aod index e068b060e8c..ee90e4bcd01 100644 --- a/neonView/ClassificatonAdminEdit_view/ClassificatonAdminEdit_view.aod +++ b/neonView/ClassificatonAdminPreview_view/ClassificatonAdminPreview_view.aod @@ -1,38 +1,39 @@ -<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> - <name>ClassificatonAdminEdit_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <isSmall v="true" /> - <layout> - <noneLayout> - <name>layout</name> - </noneLayout> - </layout> - <children> - <genericViewTemplate> - <name>classification</name> - <editMode v="true" /> - <drawerCaption>Classification</drawerCaption> - <entityField>#ENTITY</entityField> - <fields> - <entityFieldLink> - <name>31662c73-7352-4eb2-889d-3f63bff25686</name> - <entityField>CLASSIFICATIONTYPE</entityField> - </entityFieldLink> - <entityFieldLink> - <name>7fddc4d4-6bdc-4c7a-9d69-bba4a9506707</name> - <entityField>CLASSIFICATIONGROUP</entityField> - </entityFieldLink> - <entityFieldLink> - <name>cb6e8f64-b2a4-4cc4-88b7-2f64f56b83dc</name> - <entityField>SCORETYPE</entityField> - </entityFieldLink> - </fields> - </genericViewTemplate> - <neonViewReference> - <name>214fbe22-378d-404e-99f8-f175e037f196</name> - <entityField>ClassificationScores</entityField> - <view>ClassificationScoreMultipleEdit_view</view> - </neonViewReference> - </children> -</neonView> +<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>ClassificatonAdminPreview_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <isSmall v="true" /> + <layout> + <boxLayout> + <name>layout</name> + <autoHeight v="true" /> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>classification</name> + <showDrawer v="true" /> + <drawerCaption>Classification</drawerCaption> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>31662c73-7352-4eb2-889d-3f63bff25686</name> + <entityField>CLASSIFICATIONTYPE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>7fddc4d4-6bdc-4c7a-9d69-bba4a9506707</name> + <entityField>CLASSIFICATIONGROUP</entityField> + </entityFieldLink> + <entityFieldLink> + <name>cb6e8f64-b2a4-4cc4-88b7-2f64f56b83dc</name> + <entityField>SCORETYPE</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + <neonViewReference> + <name>214fbe22-378d-404e-99f8-f175e037f196</name> + <entityField>ClassificationScores</entityField> + <view>ClassificationScoreMultiplePreview_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/ClassificatonEdit_view/ClassificatonEdit_view.aod b/neonView/ClassificatonPreview_view/ClassificatonPreview_view.aod similarity index 91% rename from neonView/ClassificatonEdit_view/ClassificatonEdit_view.aod rename to neonView/ClassificatonPreview_view/ClassificatonPreview_view.aod index 85140d5bd17..38b3c867605 100644 --- a/neonView/ClassificatonEdit_view/ClassificatonEdit_view.aod +++ b/neonView/ClassificatonPreview_view/ClassificatonPreview_view.aod @@ -1,36 +1,37 @@ -<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> - <name>ClassificatonEdit_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <isSmall v="true" /> - <layout> - <boxLayout> - <name>layout</name> - <autoHeight v="true" /> - </boxLayout> - </layout> - <children> - <genericViewTemplate> - <name>classification</name> - <editMode v="true" /> - <drawerCaption>Classification</drawerCaption> - <entityField>#ENTITY</entityField> - <fields> - <entityFieldLink> - <name>dfdbc6f4-4859-495b-96e7-0853bdbc611f</name> - <entityField>CLASSIFICATIONSCORE_ID</entityField> - </entityFieldLink> - </fields> - </genericViewTemplate> - <genericViewTemplate> - <name>info</name> - <entityField>#ENTITY</entityField> - <fields> - <entityFieldLink> - <name>2d1fae5e-1b2b-4e29-9bcb-646db9fd9653</name> - <entityField>Info</entityField> - </entityFieldLink> - </fields> - </genericViewTemplate> - </children> -</neonView> +<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>ClassificatonPreview_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <isSmall v="true" /> + <layout> + <boxLayout> + <name>layout</name> + <autoHeight v="true" /> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>classification</name> + <showDrawer v="true" /> + <drawerCaption>Classification</drawerCaption> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>dfdbc6f4-4859-495b-96e7-0853bdbc611f</name> + <entityField>CLASSIFICATIONSCORE_ID</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + <genericViewTemplate> + <name>info</name> + <entityField>#ENTITY</entityField> + <title></title> + <fields> + <entityFieldLink> + <name>2d1fae5e-1b2b-4e29-9bcb-646db9fd9653</name> + <entityField>Info</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> -- GitLab