From 9d6b2a923f6da226ed829375f68c861180f8751d Mon Sep 17 00:00:00 2001 From: Benjamin Ulrich <b.ulrich@adito.de> Date: Mon, 5 Jul 2021 15:09:33 +0000 Subject: [PATCH] Sales 1081344 1078539 fix turn over district classification type filter fix --- .../documentation.adoc | 2 - .../filterTreeExcludedFieldsProcess.js | 7 -- entity/Member_entity/Member_entity.aod | 2 +- .../recordcontainers/jdito/contentProcess.js | 102 ------------------ .../_____LANGUAGE_de/_____LANGUAGE_de.aod | 2 + 5 files changed, 3 insertions(+), 112 deletions(-) diff --git a/entity/ClassificationAdmin_entity/documentation.adoc b/entity/ClassificationAdmin_entity/documentation.adoc index 4fa1c03050e..0618aaafcb6 100644 --- a/entity/ClassificationAdmin_entity/documentation.adoc +++ b/entity/ClassificationAdmin_entity/documentation.adoc @@ -67,8 +67,6 @@ Adding the classification to other modules: -add CLASSIFICATIONSTORAGE_ID to the Filterview and Preview. -optional: check "filterable" if you want it filterable (probably not that useful) Add the reference to the ClassificationView to the Mainview Context (see als organsiation and salesproject) - Add the classificationFilterExtensionSet: - -"ClassificationType_filter" for filtering of the achieved Classifications for each group Add the entityFields you want to use to $ClassificationIndicatorRegistry.getEntityNumberFields() and $ClassificationIndicatorRegistry.getEntityDropDownFields() And optionally add complex Fields in an registry like ClassificationIndicatorRegistry_basic -> if you do add a new registry: don't forget to add its functions in ClassificationUpdate_lib diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationtypefilter/filterTreeExcludedFieldsProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationtypefilter/filterTreeExcludedFieldsProcess.js index 448b8a68819..899a40ec000 100644 --- a/entity/ClassificationAdmin_entity/entityfields/classificationtypefilter/filterTreeExcludedFieldsProcess.js +++ b/entity/ClassificationAdmin_entity/entityfields/classificationtypefilter/filterTreeExcludedFieldsProcess.js @@ -11,11 +11,6 @@ import("system.result"); if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT && vars.get("$field.CLASSIFICATIONTYPEID") != $ClassificationPlaceholder.TOPSECRETPLACEHOLDER()) { - //We want to exclude all the classificationFilterFields. - //Excluding via this process works by returning a array with all the fieldNames you want to exclude. - //The ClassificationFilters are ClassificationFilterExtensionSets so the name of one of these fields looks like this: - // "#EXTENSION." + Set-Name + "." + Field-Name + "#" + Contenttype - // e.g: "#EXTENSION.ClassificationType_filter.d67397c5-5e05-433b-b61d-12807906aa5a#TEXT"" var classificationTypes = newSelect("CLASSIFICATIONTYPE.CLASSIFICATIONTYPEID, CLASSIFICATIONTYPE.CLASSIFICATIONGROUP_ID, CLASSIFICATIONTYPE.OBJECT_TYPE") .from("CLASSIFICATIONTYPE") @@ -30,8 +25,6 @@ if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT && vars.get("$fie var previousObjectType; for (let i = 0; i < classificationTypes.length; i++) { - //classificationTypeFilterFields are just the classificationTypeId with the correct prefix and contenttype - res.push("#EXTENSION.ClassificationType_filter."+classificationTypes[i][0]+"#TEXT") //classificationGroupFilterFields are are a little more complicated: //it's the classificationGroupId + the correct SqlCondition (as String) encoded via ClassificationGroupFilterNameCoder +correct prefix and contenttype diff --git a/entity/Member_entity/Member_entity.aod b/entity/Member_entity/Member_entity.aod index 726c0a44ed2..1ea06357674 100644 --- a/entity/Member_entity/Member_entity.aod +++ b/entity/Member_entity/Member_entity.aod @@ -13,7 +13,7 @@ <contentTitleProcess>%aditoprj%/entity/Member_entity/contentTitleProcess.js</contentTitleProcess> <iconId>VAADIN:FILE_SOUND</iconId> <titlePlural>${SALESPROJECT_MEMBER}</titlePlural> - <recordContainer>db</recordContainer> + <recordContainer>jdito</recordContainer> <entityFields> <entityProvider> <name>#PROVIDER</name> diff --git a/entity/Member_entity/recordcontainers/jdito/contentProcess.js b/entity/Member_entity/recordcontainers/jdito/contentProcess.js index 674f7b59539..db01c68c2f6 100644 --- a/entity/Member_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Member_entity/recordcontainers/jdito/contentProcess.js @@ -62,106 +62,4 @@ memberRows = memberRows.map(function(row) ]; }); -if (Utils.isNullOrEmpty(idValues) || memberRows.length === 0) -{ - if (vars.get("$param.ObjectType_param") == "Salesproject" && vars.get("$param.ObjectRowId_param") != null) - { - var orgContactId = newSelect("SALESPROJECT.CONTACT_ID") - .from("SALESPROJECT") - .where("SALESPROJECT.SALESPROJECTID", "$param.ObjectRowId_param") - .cell(); - - var districtLoadingConfig = entities.createConfigForLoadingRows() - .entity("DistrictResponsible_entity") - .provider("OrganisationResponsibles") - .addParameter("OrgUid_param", orgContactId) - .fields(["#UID","DISTRICTRESPONSIBLEID", "DISTRICT_ID", "EMPLOYEE_CONTACT_ID", - "EMPLOYEE_CONTACT_ID.displayValue", "USER_EDIT", "USER_NEW", - "departmentAttributeName", "DATE_EDIT", "DATE_NEW"]); - - var districtRows = entities.getRows(districtLoadingConfig); - - districtRows = districtRows.map(function(row) - { - return [ - row["#UID"], - row["DISTRICTRESPONSIBLEID"], - row["DISTRICT_ID"], - row["EMPLOYEE_CONTACT_ID"], - row["EMPLOYEE_CONTACT_ID.displayValue"], - row["USER_EDIT"], - row["USER_NEW"], - row["departmentAttributeName"], - row["DATE_EDIT"], - row["DATE_NEW"] - ]; - }); - } - - var responsibleUids = []; - - if(districtRows != undefined) - { - districtRows.forEach(function(row){ - responsibleUids.push(row[3]); - }); - - var loadingConfPers = entities.createConfigForLoadingRows() - .entity("Person_entity") - .uids(responsibleUids) - .fields(["ORGANISATION_ID", "ORGANISATION_NAME", "CONTACTROLE", "POSITION", - "FIRSTNAME", "LASTNAME", "SALUTATION", "TITLE", "PERSONID", "CONTACTID"]); - var persRowsMap = {}; - entities.getRows(loadingConfPers).forEach(function(item) { - persRowsMap[item["CONTACTID"]] = item; - }); - - var persRows = []; - responsibleUids.forEach(function(uid) { - persRows.push(persRowsMap[uid]); - }); - - persRows = persRows.map(function(row){ - return [row["SALUTATION"], row["TITLE"], row["FIRSTNAME"], row["LASTNAME"], - row["ORGANISATION_NAME"], row["ORGANISATION_ID"], row["CONTACTROLE"], - row["POSITION"], row["PERSONID"]]; - }); - - - districtRows.forEach(function(row, counter){ - - memberRows.push( - [row[0], - null, - row[3], - row[4], - persRows[counter][6], - row[7], - "VAADIN:GLOBE", - "TEXT:" + row[4].substring(row[4].indexOf(" ", 0)+1, row[4].length), - "70cbad1b-eac6-4369-ba50-4946e0fbcb3a", - translate.text("District Responsible"), - vars.get("$param.ObjectRowId_param"), - vars.get("$param.ObjectType_param"), - persRows[counter][5], - persRows[counter][4], - persRows[counter][2], - row[4], - persRows[counter][3], - persRows[counter][8], - persRows[counter][0], - persRows[counter][1], - persRows[counter][7], - null, - "DistrictResponsible", - "", - (new AttributeRelationQuery( - row[3], - $AttributeRegistry.loyalty() - ).includeDisplayValue().getSingleAttribute() || {displayValue: ""}).displayValue - ]); - }); - } -} - result.object(memberRows); \ No newline at end of file diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 4281a25dfa7..b4c58364698 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -11603,9 +11603,11 @@ Bitte Datumseingabe prüfen</value> </entry> <entry> <key>District: Name</key> + <value>Gebiet: Name</value> </entry> <entry> <key>District: Number</key> + <value>Gebiet: Nummer</value> </entry> <entry> <key>Bulkmail</key> -- GitLab