From 594f6dc4a72af0420f1573f68b52d584cdc01b96 Mon Sep 17 00:00:00 2001 From: Johannes Hoermann <j.hoermann@adito.de> Date: Mon, 24 Jun 2019 06:36:50 +0200 Subject: [PATCH] first iteration of icons for object relation --- .../basic/2019.1.4/add_objectRelationIcon.xml | 8 ++ .../Data_alias/basic/2019.1.4/changelog.xml | 2 + aliasDefinition/Data_alias/Data_alias.aod | 14 +++ .../ObjectRelationType_entity.aod | 9 ++ .../entityfields/icon/valueProcess.js | 6 ++ .../grantDeleteProcess.js | 8 ++ .../grantUpdateProcess.js | 8 ++ .../recordcontainers/jdito/onInsert.js | 6 +- .../recordcontainers/jdito/onUpdate.js | 2 + .../ObjectTree_entity/ObjectTree_entity.aod | 1 + .../recordcontainers/jdito/contentProcess.js | 17 ++-- .../ObjectRelationTypeEdit_view.aod | 92 ++++++++++--------- .../ObjectRelationTypeFilter_view.aod | 80 ++++++++-------- process/ObjectRelation_lib/process.js | 6 +- 14 files changed, 164 insertions(+), 95 deletions(-) create mode 100644 .liquibase/Data_alias/basic/2019.1.4/add_objectRelationIcon.xml create mode 100644 entity/ObjectRelationType_entity/entityfields/icon/valueProcess.js create mode 100644 entity/ObjectRelationType_entity/grantDeleteProcess.js create mode 100644 entity/ObjectRelationType_entity/grantUpdateProcess.js diff --git a/.liquibase/Data_alias/basic/2019.1.4/add_objectRelationIcon.xml b/.liquibase/Data_alias/basic/2019.1.4/add_objectRelationIcon.xml new file mode 100644 index 00000000000..f7dd0d1a745 --- /dev/null +++ b/.liquibase/Data_alias/basic/2019.1.4/add_objectRelationIcon.xml @@ -0,0 +1,8 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="j.hoermann" id="90a57bcb-6293-48f0-b856-a809f5a6bdc9"> + <addColumn tableName="AB_OBJECTRELATIONTYPE"> + <column name="ICON" type="NVARCHAR(36)"/> + </addColumn> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2019.1.4/changelog.xml b/.liquibase/Data_alias/basic/2019.1.4/changelog.xml index bde28eca0c4..eae75875830 100644 --- a/.liquibase/Data_alias/basic/2019.1.4/changelog.xml +++ b/.liquibase/Data_alias/basic/2019.1.4/changelog.xml @@ -199,4 +199,6 @@ <include relativeToChangelogFile="true" file="BulkMail/create_bulkmail.xml"/> <include relativeToChangelogFile="true" file="BulkMail/create_bulkMailRecipient.xml"/> + + <include relativeToChangelogFile="true" file="add_objectRelationIcon.xml"/> </databaseChangeLog> diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index 99ea27eefcc..b5a90d401ea 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -7051,6 +7051,20 @@ </customBooleanProperty> </customProperties> </entityFieldDb> + <entityFieldDb> + <name>ICON</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> </entityFields> </entityDb> <entityDb> diff --git a/entity/ObjectRelationType_entity/ObjectRelationType_entity.aod b/entity/ObjectRelationType_entity/ObjectRelationType_entity.aod index d0c14753f16..4e6a3a74740 100644 --- a/entity/ObjectRelationType_entity/ObjectRelationType_entity.aod +++ b/entity/ObjectRelationType_entity/ObjectRelationType_entity.aod @@ -4,6 +4,8 @@ <majorModelMode>DISTRIBUTED</majorModelMode> <icon>VAADIN:SPLIT</icon> <title>Relation type</title> + <grantUpdateProcess>%aditoprj%/entity/ObjectRelationType_entity/grantUpdateProcess.js</grantUpdateProcess> + <grantDeleteProcess>%aditoprj%/entity/ObjectRelationType_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/ObjectRelationType_entity/contentTitleProcess.js</contentTitleProcess> <recordContainer>jdito</recordContainer> <entityFields> @@ -121,6 +123,12 @@ <dropDownProcess>%aditoprj%/entity/ObjectRelationType_entity/entityfields/type2enabled_proxy/dropDownProcess.js</dropDownProcess> <valueProcess>%aditoprj%/entity/ObjectRelationType_entity/entityfields/type2enabled_proxy/valueProcess.js</valueProcess> </entityField> + <entityField> + <name>ICON</name> + <title>Icon</title> + <contentType>IMAGE</contentType> + <valueProcess>%aditoprj%/entity/ObjectRelationType_entity/entityfields/icon/valueProcess.js</valueProcess> + </entityField> </entityFields> <recordContainers> <jDitoRecordContainer> @@ -144,6 +152,7 @@ <element>DEST_OBJECTRELATIONTYPEID.value</element> <element>DEST_RELATION_TITLE.value</element> <element>Type2Enabled_proxy.value</element> + <element>ICON.value</element> </recordFields> </jDitoRecordContainer> </recordContainers> diff --git a/entity/ObjectRelationType_entity/entityfields/icon/valueProcess.js b/entity/ObjectRelationType_entity/entityfields/icon/valueProcess.js new file mode 100644 index 00000000000..baceaf10d4f --- /dev/null +++ b/entity/ObjectRelationType_entity/entityfields/icon/valueProcess.js @@ -0,0 +1,6 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$this.value")) + result.string("VAADIN:CUBE"); \ No newline at end of file diff --git a/entity/ObjectRelationType_entity/grantDeleteProcess.js b/entity/ObjectRelationType_entity/grantDeleteProcess.js new file mode 100644 index 00000000000..ab871194cac --- /dev/null +++ b/entity/ObjectRelationType_entity/grantDeleteProcess.js @@ -0,0 +1,8 @@ +import("Sql_lib"); +import("system.db"); +import("system.result"); + +result.object(db.cell(SqlCondition.begin() + .andPrepareVars("AB_OBJECTRELATION.AB_OBJECTRELATIONTYPE1", "$field.UID") + .andPrepareVars("AB_OBJECTRELATION.AB_OBJECTRELATIONTYPE2", "$field.DEST_OBJECTRELATIONTYPEID") + .buildSql("select count(*) from AB_OBJECTRELATION", "1=2")) <= 0); \ No newline at end of file diff --git a/entity/ObjectRelationType_entity/grantUpdateProcess.js b/entity/ObjectRelationType_entity/grantUpdateProcess.js new file mode 100644 index 00000000000..ab871194cac --- /dev/null +++ b/entity/ObjectRelationType_entity/grantUpdateProcess.js @@ -0,0 +1,8 @@ +import("Sql_lib"); +import("system.db"); +import("system.result"); + +result.object(db.cell(SqlCondition.begin() + .andPrepareVars("AB_OBJECTRELATION.AB_OBJECTRELATIONTYPE1", "$field.UID") + .andPrepareVars("AB_OBJECTRELATION.AB_OBJECTRELATIONTYPE2", "$field.DEST_OBJECTRELATIONTYPEID") + .buildSql("select count(*) from AB_OBJECTRELATION", "1=2")) <= 0); \ No newline at end of file diff --git a/entity/ObjectRelationType_entity/recordcontainers/jdito/onInsert.js b/entity/ObjectRelationType_entity/recordcontainers/jdito/onInsert.js index a1d965ad67f..51da0240f6e 100644 --- a/entity/ObjectRelationType_entity/recordcontainers/jdito/onInsert.js +++ b/entity/ObjectRelationType_entity/recordcontainers/jdito/onInsert.js @@ -12,14 +12,16 @@ db.insertData("AB_OBJECTRELATIONTYPE", [ "RELATION_TITLE", "RELATION_TYPE", "SIDE", - "HIERARCHY" + "HIERARCHY", + "ICON" ], null, [ util.getNewUUID(), vars.get("$field.SOURCE_OBJECT_TYPE"), vars.get("$field.SOURCE_RELATION_TITLE"), newRelationType, 1, - vars.get("$field.HIERARCHY") + vars.get("$field.HIERARCHY"), + vars.get("$field.ICON") // Icon is only savid in type1 ]); if (vars.getString("$field.Type2Enabled_proxy") == "1" diff --git a/entity/ObjectRelationType_entity/recordcontainers/jdito/onUpdate.js b/entity/ObjectRelationType_entity/recordcontainers/jdito/onUpdate.js index e31eccf005c..7525fe76f2d 100644 --- a/entity/ObjectRelationType_entity/recordcontainers/jdito/onUpdate.js +++ b/entity/ObjectRelationType_entity/recordcontainers/jdito/onUpdate.js @@ -28,6 +28,8 @@ if (usageCount <= 0) break; case "Type2Enabled": break; + case "ICON": + type1Fields[fieldName] = vars.get("$field." + fieldName); default: type1Fields[fieldName] = vars.get("$field." + fieldName); type2Fields[fieldName] = vars.get("$field." + fieldName); diff --git a/entity/ObjectTree_entity/ObjectTree_entity.aod b/entity/ObjectTree_entity/ObjectTree_entity.aod index acc265e37ce..86c2a7ccef3 100644 --- a/entity/ObjectTree_entity/ObjectTree_entity.aod +++ b/entity/ObjectTree_entity/ObjectTree_entity.aod @@ -202,6 +202,7 @@ <element>TARGET_CONTEXT.value</element> <element>INFO.value</element> <element>OBJECTRELATIONTYPEID.value</element> + <element>ICON.value</element> </recordFields> </jDitoRecordContainer> </recordContainers> diff --git a/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js b/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js index e0c3a1bd094..61c1821ac6f 100644 --- a/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js @@ -27,7 +27,7 @@ if (uidParam) if (isObjectRelationNode) { let relationTypeData = ObjectRelationUtils.getRelationType(uid[2]); - _insertEntry(tree, _getEntryData(uid[0], relationTypeData[3], relationTypeData[7], relationTypeData[8], undefined, false, uid[6]), "", 0, uid[3], relationTypeData[10], relationTypeData[4]); + _insertEntry(tree, _getEntryData(uid[0], relationTypeData[3], relationTypeData[7], relationTypeData[8], undefined, false, uid[6]), "", 0, uid[3], relationTypeData[10], relationTypeData[12], relationTypeData[4]); } } @@ -84,7 +84,7 @@ function _loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationTypeId, currentObjectId = _getRootID(currentObjectId, relationTypeData); } // true to enable the insert button always --v - let uids = _insertEntry(tree, [[currentObjectId, "", "", "", "", relationTypeData[7]]], pNodeId, pLayer, pObjectType, selectedRelationType, true) + let uids = _insertEntry(tree, [[currentObjectId, "", "", "", "", relationTypeData[7]]], pNodeId, pLayer, pObjectType, selectedRelationType, relationTypeData[12], true) for (let i = 0; i < uids.length; i++) { _loadObjectRelationTree(uids[i][0], uids[i][3], relationTypeData[0], uids[i], pLayer+1, relationTypeData); @@ -105,7 +105,7 @@ function _loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationTypeId, // TODO: Icons, BINDATA // var icon = getIcon... let uid = [currentObjectId, i, relationTypes[i]]; - tree.push([JSON.stringify(uid), translate.text(relationTypes[i][1]), JSON.stringify(pNodeId), true, null, null, "", relationTypes[i][0]]); + tree.push([JSON.stringify(uid), translate.text(relationTypes[i][1]), JSON.stringify(pNodeId), true, null, null, "", relationTypes[i][0], relationTypes[i][12]]); _loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationTypeId, uid, pLayer+1, relationTypes[i]); } @@ -124,6 +124,7 @@ function _loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationTypeId, var relationType1 = pRelationTypeData[7]; var relationType2 = pRelationTypeData[8]; var direction = pRelationTypeData[3]; + var icon = pRelationTypeData[12]; var relationTypeIdForNew = otherRelationTypeId; @@ -140,7 +141,7 @@ function _loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationTypeId, relationTypeIdForNew = thisRelationTypeId; - let uids = _insertEntry(tree, myData, pNodeId, pLayer, destObjectType, relationTypeIdForNew, hierarchy) + let uids = _insertEntry(tree, myData, pNodeId, pLayer, destObjectType, relationTypeIdForNew, icon, hierarchy) for (let i = 0; i < uids.length; i++) { _loadObjectRelationTree(uids[i][0], uids[i][3], pObjectRelationTypeId, uids[i], pLayer+1, pRelationTypeData); @@ -161,11 +162,11 @@ function _loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationTypeId, relationTypeIdForNew = thisRelationTypeId // add both sides. Only one will succeed, because the prevObjectId will be filtered - _insertEntry(tree, entryData, pNodeId, pLayer, destObjectType, thisRelationTypeId, hierarchy, 0); + _insertEntry(tree, entryData, pNodeId, pLayer, destObjectType, thisRelationTypeId, icon, hierarchy, 0); if (direction == "same") { var otherEntryData = _getEntryData(pNodeId[0], "normal", relationType1, relationType2, prevObjectId, true); - _insertEntry(tree, otherEntryData, pNodeId, pLayer, destObjectType, thisRelationTypeId, hierarchy, 1); + _insertEntry(tree, otherEntryData, pNodeId, pLayer, destObjectType, thisRelationTypeId, icon, hierarchy, 1); } } } @@ -255,7 +256,7 @@ function _getRelationTypes(pObjectType) * * @return {Array[][]} the uids of the inserted data. Consists of [ObjectId, pEntryData-Index, AB_OBJECTRELATIONTYPEID, pObjectType (from param), pNodeId, objecttype (from entryId), objectrelationid, hierarchy] */ -function _insertEntry(pTree, pEntryData, pNodeId, pLayer, pObjectType, pNewRelationTypeId, pHierarchy, pNum) +function _insertEntry(pTree, pEntryData, pNodeId, pLayer, pObjectType, pNewRelationTypeId, pIcon, pHierarchy, pNum) { var expanded = true; if (pLayer > 10) expanded = false; @@ -269,7 +270,7 @@ function _insertEntry(pTree, pEntryData, pNodeId, pLayer, pObjectType, pNewRelat if (pNum) uid.push(pNum); uids.push(uid); - pTree.push([JSON.stringify(uid), display, JSON.stringify(pNodeId), expanded, pEntryData[i][0], pObjectType, pEntryData[i][4], pNewRelationTypeId]); + pTree.push([JSON.stringify(uid), display, JSON.stringify(pNodeId), expanded, pEntryData[i][0], pObjectType, pEntryData[i][4], pNewRelationTypeId, pIcon]); } return uids; } diff --git a/neonView/ObjectRelationTypeEdit_view/ObjectRelationTypeEdit_view.aod b/neonView/ObjectRelationTypeEdit_view/ObjectRelationTypeEdit_view.aod index 587ab9e94be..a026bc8f3e1 100644 --- a/neonView/ObjectRelationTypeEdit_view/ObjectRelationTypeEdit_view.aod +++ b/neonView/ObjectRelationTypeEdit_view/ObjectRelationTypeEdit_view.aod @@ -1,44 +1,48 @@ -<?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>ObjectRelationTypeEdit_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <isSmall v="true" /> - <layout> - <boxLayout> - <name>layout</name> - </boxLayout> - </layout> - <children> - <genericViewTemplate> - <name>Info</name> - <editMode v="true" /> - <entityField>#ENTITY</entityField> - <fields> - <entityFieldLink> - <name>adb2c427-89fd-4f8d-abae-39c8273c9916</name> - <entityField>SOURCE_RELATION_TITLE</entityField> - </entityFieldLink> - <entityFieldLink> - <name>ffaf9de0-6866-4d0a-80af-42b57169d83e</name> - <entityField>SOURCE_OBJECT_TYPE</entityField> - </entityFieldLink> - <entityFieldLink> - <name>8c839d7f-31c2-4339-a74a-ff5fb83288df</name> - <entityField>Type2Enabled_proxy</entityField> - </entityFieldLink> - <entityFieldLink> - <name>0fd227e4-2896-4ce3-b699-8e5ce82a2862</name> - <entityField>DEST_RELATION_TITLE</entityField> - </entityFieldLink> - <entityFieldLink> - <name>e7578539-f60d-4136-af56-9fd587ed34ec</name> - <entityField>DEST_OBJECT_TYPE</entityField> - </entityFieldLink> - <entityFieldLink> - <name>945f613e-ce96-419d-8a71-f3196e41e444</name> - <entityField>HIERARCHY</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>ObjectRelationTypeEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <isSmall v="true" /> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>Info</name> + <editMode v="true" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>da58e9df-1b53-441b-adb0-8516527af50e</name> + <entityField>ICON</entityField> + </entityFieldLink> + <entityFieldLink> + <name>adb2c427-89fd-4f8d-abae-39c8273c9916</name> + <entityField>SOURCE_RELATION_TITLE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>ffaf9de0-6866-4d0a-80af-42b57169d83e</name> + <entityField>SOURCE_OBJECT_TYPE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>8c839d7f-31c2-4339-a74a-ff5fb83288df</name> + <entityField>Type2Enabled_proxy</entityField> + </entityFieldLink> + <entityFieldLink> + <name>0fd227e4-2896-4ce3-b699-8e5ce82a2862</name> + <entityField>DEST_RELATION_TITLE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>e7578539-f60d-4136-af56-9fd587ed34ec</name> + <entityField>DEST_OBJECT_TYPE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>945f613e-ce96-419d-8a71-f3196e41e444</name> + <entityField>HIERARCHY</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/neonView/ObjectRelationTypeFilter_view/ObjectRelationTypeFilter_view.aod b/neonView/ObjectRelationTypeFilter_view/ObjectRelationTypeFilter_view.aod index b1e0e1afb48..3ff0ad86c8d 100644 --- a/neonView/ObjectRelationTypeFilter_view/ObjectRelationTypeFilter_view.aod +++ b/neonView/ObjectRelationTypeFilter_view/ObjectRelationTypeFilter_view.aod @@ -1,38 +1,42 @@ -<?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>ObjectRelationTypeFilter_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <layout> - <boxLayout> - <name>layout</name> - </boxLayout> - </layout> - <children> - <tableViewTemplate> - <name>RelationTypes</name> - <entityField>#ENTITY</entityField> - <columns> - <neonTableColumn> - <name>e526e3fb-2776-42f9-b75e-67a5dc7bde9d</name> - <entityField>SOURCE_RELATION_TITLE</entityField> - </neonTableColumn> - <neonTableColumn> - <name>89ee84eb-b50b-47e4-863c-7537c8a2c1d0</name> - <entityField>SOURCE_OBJECT_TYPE</entityField> - </neonTableColumn> - <neonTableColumn> - <name>2230c73a-f5d9-44bb-bcfa-67d42a24881b</name> - <entityField>DEST_RELATION_TITLE</entityField> - </neonTableColumn> - <neonTableColumn> - <name>755d8ce7-3995-457c-b5f2-39f5aae361f6</name> - <entityField>DEST_OBJECT_TYPE</entityField> - </neonTableColumn> - <neonTableColumn> - <name>3e9e27c1-e971-4431-9f47-1d8fe436be76</name> - <entityField>HIERARCHY</entityField> - </neonTableColumn> - </columns> - </tableViewTemplate> - </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>ObjectRelationTypeFilter_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <tableViewTemplate> + <name>RelationTypes</name> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>ba68e56c-a1fc-4ebe-b064-912428047a9e</name> + <entityField>ICON</entityField> + </neonTableColumn> + <neonTableColumn> + <name>e526e3fb-2776-42f9-b75e-67a5dc7bde9d</name> + <entityField>SOURCE_RELATION_TITLE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>89ee84eb-b50b-47e4-863c-7537c8a2c1d0</name> + <entityField>SOURCE_OBJECT_TYPE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>2230c73a-f5d9-44bb-bcfa-67d42a24881b</name> + <entityField>DEST_RELATION_TITLE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>755d8ce7-3995-457c-b5f2-39f5aae361f6</name> + <entityField>DEST_OBJECT_TYPE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>3e9e27c1-e971-4431-9f47-1d8fe436be76</name> + <entityField>HIERARCHY</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView> diff --git a/process/ObjectRelation_lib/process.js b/process/ObjectRelation_lib/process.js index 336694ba5c9..d21bebfee07 100644 --- a/process/ObjectRelation_lib/process.js +++ b/process/ObjectRelation_lib/process.js @@ -14,7 +14,7 @@ function ObjectRelationUtils() {} * Normally it only returns the id and title. If you set pFullInfo to true, you will get additional information, too. * * @param {String} [pObjectType=undefined] the object type to load the relation types for.] - * @param {Boolean} [pFullInfo=false] return also RELATION_TYPE, direction (normal, reverse, same), hierarchy, OBJECT_TYPE dest, OBJECT_TYPE source, objectrelationtypeId1, objectrelationtypeId2, side, objectrelationtypeId, other title + * @param {Boolean} [pFullInfo=false] return also RELATION_TYPE, direction (normal, reverse, same), hierarchy, OBJECT_TYPE dest, OBJECT_TYPE source, objectrelationtypeId1, objectrelationtypeId2, side, objectrelationtypeId, other title, icon * @param {Boolean} [pOnlyFirstSide=false] load all types only for the first side. * @param {String} [pRelationTypeId=undefined] load only the specified relationType * @param {Boolean} [pDummyField=false] empty dummy-field needed for Type2Enabled_proxy-field in ObjectRelationType_entity to get changes of the Type2Enabled_proxy-field in the onUpdate Process @@ -81,7 +81,7 @@ ObjectRelationUtils.getPossibleRelationTypes = function(pObjectType, pFullInfo, else type2.AB_OBJECTRELATIONTYPEID end objectrelationtypeId2, \n\ main.SIDE,\n\ case when type2.AB_OBJECTRELATIONTYPEID is null then main.AB_OBJECTRELATIONTYPEID else type2.AB_OBJECTRELATIONTYPEID end,\n\ - type2.RELATION_TITLE" + (pDummyField ? ", ''" : "") + sql; + type2.RELATION_TITLE" + (pDummyField ? ", ''" : "") + ", main.ICON" + sql; // Icon is only savid in type1 } // full info: @@ -90,7 +90,7 @@ ObjectRelationUtils.getPossibleRelationTypes = function(pObjectType, pFullInfo, /** * Get relationType by a RelationTypeId. - * returns the objectrelationtypeId, title, RELATION_TYPE, direction (normal, reverse, same), hierarchy, OBJECT_TYPE dest, OBJECT_TYPE source, objectrelationtypeId1, objectrelationtypeId2, side,objectrelationtypeId, other title + * returns the objectrelationtypeId, title, RELATION_TYPE, direction (normal, reverse, same), hierarchy, OBJECT_TYPE dest, OBJECT_TYPE source, objectrelationtypeId1, objectrelationtypeId2, side,objectrelationtypeId, other title, icon * * @param {String} pRelationTypeId the RelationTypeId to load the full relation type for. * @param {Boolean} [pDummyField=false] empty dummy-field needed for Type2Enabled_proxy-field in ObjectRelationType_entity to get changes of the Type2Enabled_proxy-field in the onUpdate Process -- GitLab