diff --git a/.gitignore b/.gitignore index 7f791a6b5a7e531c6493bccd3ef47ee387bdb3e3..3e6393c7c265ce2b7da30dcc0815f1879bb01e76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /.aditoprj/cache /.aditoprj/UUIDNameMap.txt +/.idea /data /others/db_changes/liqui_update.bat /others/db_changes/liqui_reset.ps1 -/others/jsdocOut \ No newline at end of file +/others/jsdocOut diff --git a/entity/AroundLocation_entity/AroundLocation_entity.aod b/entity/AroundLocation_entity/AroundLocation_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..c91531dc4c43f5cb38c9324e78b6c69f15d6251f --- /dev/null +++ b/entity/AroundLocation_entity/AroundLocation_entity.aod @@ -0,0 +1,86 @@ +<?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.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> + <name>AroundLocation_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <documentation>%aditoprj%/entity/AroundLocation_entity/documentation.adoc</documentation> + <onValidation>%aditoprj%/entity/AroundLocation_entity/onValidation.js</onValidation> + <recordContainer>dataless</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>SearchRadius</name> + <title>Radius in km</title> + <contentType>NUMBER</contentType> + <outputFormat>#</outputFormat> + <inputFormat>#</inputFormat> + <state>EDITABLE</state> + <onValidation>%aditoprj%/entity/AroundLocation_entity/entityfields/searchradius/onValidation.js</onValidation> + </entityField> + <entityConsumer> + <name>Organisations</name> + <state>READONLY</state> + <dependency> + <name>dependency</name> + <entityName>Organisation_entity</entityName> + <fieldName>OrganisationsViaIndex</fieldName> + </dependency> + <children> + <entityParameter> + <name>OnlyShowContactIds_param</name> + <valueProcess>%aditoprj%/entity/AroundLocation_entity/entityfields/organisations/children/onlyshowcontactids_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityActionField> + <name>Open</name> + <title>${ACTION_DO_OPEN}</title> + <onActionProcess>%aditoprj%/entity/AroundLocation_entity/entityfields/open/onActionProcess.js</onActionProcess> + <iconId>VAADIN:FOLDER_OPEN</iconId> + <state>DISABLED</state> + <stateProcess>%aditoprj%/entity/AroundLocation_entity/entityfields/open/stateProcess.js</stateProcess> + </entityActionField> + <entityField> + <name>ContactIds</name> + <valueProcess>%aditoprj%/entity/AroundLocation_entity/entityfields/contactids/valueProcess.js</valueProcess> + </entityField> + <entityParameter> + <name>LocationLat_param</name> + <expose v="true" /> + <mandatory v="true" /> + </entityParameter> + <entityParameter> + <name>LocationLon_param</name> + <expose v="true" /> + <mandatory v="true" /> + </entityParameter> + <entityField> + <name>RecordCountInformation</name> + <color>readonly-color</color> + <valueProcess>%aditoprj%/entity/AroundLocation_entity/entityfields/recordcountinformation/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>HitCount</name> + </entityField> + <entityField> + <name>TotalHitCount</name> + </entityField> + <entityParameter> + <name>OriginUid_param</name> + <expose v="true" /> + <mandatory v="true" /> + <documentation>%aditoprj%/entity/AroundLocation_entity/entityfields/originuid_param/documentation.adoc</documentation> + </entityParameter> + <entityProvider> + <name>#PROVIDER_AGGREGATES</name> + <useAggregates v="true" /> + </entityProvider> + </entityFields> + <recordContainers> + <datalessRecordContainer> + <name>dataless</name> + <alias>Data_alias</alias> + </datalessRecordContainer> + </recordContainers> +</entity> diff --git a/entity/AroundLocation_entity/documentation.adoc b/entity/AroundLocation_entity/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..a84e68c8974026bf4ef27cdbd091b59a26142b9c --- /dev/null +++ b/entity/AroundLocation_entity/documentation.adoc @@ -0,0 +1,19 @@ += AroundLocation_entity + +Entity with a _dataless_ recordContainer that enables the user to enter a distance for a radius search and determinig the result records. +This is done as following: + +. After a distance is entered, a indexsearch is run that determines the affected records that are within the given distance +. the UIDs of the records are collected +. the collected UIDs are passed to other entities via a param, and the other entites can filter for these uids + +IMPORTANT: It's necessary to determine only the IDs and pass them to next entity because there is currently no way to filter the results by distance +in the next entity. This is due to a restriction of how solr handels such radius search requests. + +== Related Entities + +* `Organisation_entity`: This entity lists organisation that were found around a specific location. + +== FAQ + +_No questions have been added yet. You can help expanding this section by adding the first questions._ \ No newline at end of file diff --git a/entity/AroundLocation_entity/entityfields/contactids/valueProcess.js b/entity/AroundLocation_entity/entityfields/contactids/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8c557caa9b6b62169cea92902fa269f0c678bbc9 --- /dev/null +++ b/entity/AroundLocation_entity/entityfields/contactids/valueProcess.js @@ -0,0 +1,57 @@ +import("system.result"); +import("system.util"); +import("system.vars"); +import("system.indexsearch"); +import("system.neon"); + +var contactIds = []; + +var radius = vars.get("$field.SearchRadius"); +var lat = vars.get("$param.LocationLat_param"); +var lon = vars.get("$param.LocationLon_param"); + +if (radius && lat && lon) +{ + //filter our origin uid because otherwise we would have the origin organisation in our resultset + var excludedUid = vars.get("$param.OriginUid_param"); + var pattern; + if (excludedUid) + { + var patternConfig = indexsearch.createPatternConfig(); + var searchTerm = indexsearch.createTerm(excludedUid); + patternConfig.not(searchTerm); + pattern = indexsearch.buildPattern(patternConfig); + } + //spatial filter + var spatialSearchExtension = indexsearch.createSpatialSearchExtension() + .setDistance(radius) + .setCenterPoint(lat, lon); + /* + We need to limit the resulting records since we only collect ids and pass them as parameter via a consumer. + It would be bad for performance reasons to set no limit an e.g. pass 400k IDs there. + + However increasing the RECORD_LIMIT does not necessarily increase the amount of loaded data by the indexsearch. There is another internal handled + limit of the indexsarch. The RECORD_LIMIT will not overwrite that internal limit. + For example: If the RECORD_LIMIT is 500, and the interal limit 250 only 250 records are returned by the indexsearch. + However, if the RECORD_LIMIT is 100, and the interal limit 250 only 100 records are returned by the indexsearch. + */ + var RECORD_LIMIT = 250; + var indexQuery = indexsearch.createIndexQuery() + .addExtension(spatialSearchExtension) + .setRows(RECORD_LIMIT) + .addIndexGroups("Organisation") + .addResultIndexFields([indexsearch.FIELD_ID]); + + if (pattern) + indexQuery.setPattern(pattern); + + var indexResult = indexsearch.searchIndex(indexQuery); + if (indexResult.TOTALHITS > 0) + contactIds = indexResult.HITS.map(function (e){ + return e[indexsearch.FIELD_ID]; + }); + neon.setFieldValue("$field.HitCount", contactIds.length); + neon.setFieldValue("$field.TotalHitCount", indexResult.TOTALHITS); +} + +result.string(JSON.stringify(contactIds)); \ No newline at end of file diff --git a/entity/AroundLocation_entity/entityfields/open/onActionProcess.js b/entity/AroundLocation_entity/entityfields/open/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..064f8348f4474ef01e4dfb061e6abdfff8ba6427 --- /dev/null +++ b/entity/AroundLocation_entity/entityfields/open/onActionProcess.js @@ -0,0 +1,10 @@ +import("system.vars"); +import("system.neon"); + +var contactIds = vars.get("$field.ContactIds"); + +if (contactIds) + contactIds = JSON.parse(contactIds); + +neon.openContext("Organisation", "OrganisationFilter_view", contactIds, neon.OPERATINGSTATE_SEARCH, null, null); +//neon.openContext("Organisation", null, contactIds, null, null, null); \ No newline at end of file diff --git a/entity/AroundLocation_entity/entityfields/open/stateProcess.js b/entity/AroundLocation_entity/entityfields/open/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d2425e027506ebdec35dc892611b4917fee71b8c --- /dev/null +++ b/entity/AroundLocation_entity/entityfields/open/stateProcess.js @@ -0,0 +1,12 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +var res; +var hitCount = vars.get("$field.HitCount"); +if (vars.get("$sys.validationerrors") || hitCount == null || hitCount == "" || parseInt(hitCount) == 0) + res = neon.COMPONENTSTATE_DISABLED; +else + res = neon.COMPONENTSTATE_EDITABLE; + +result.string(res); \ No newline at end of file diff --git a/entity/AroundLocation_entity/entityfields/organisations/children/onlyshowcontactids_param/valueProcess.js b/entity/AroundLocation_entity/entityfields/organisations/children/onlyshowcontactids_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..c81f940ed40e3b79f9ff0d16fc020b2368b7da04 --- /dev/null +++ b/entity/AroundLocation_entity/entityfields/organisations/children/onlyshowcontactids_param/valueProcess.js @@ -0,0 +1,15 @@ +import("system.vars"); +import("system.util"); +import("system.result"); + +var contactIds = vars.get("$field.ContactIds"); + +if (contactIds) + contactIds = JSON.parse(contactIds); +else + contactIds = []; + +if (contactIds.length == 0) + contactIds = ["###dummy###" + util.getNewUUID() + "###dummy###"]; + +result.string(JSON.stringify(contactIds)); \ No newline at end of file diff --git a/entity/AroundLocation_entity/entityfields/originuid_param/documentation.adoc b/entity/AroundLocation_entity/entityfields/originuid_param/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..45e00239aa673ad42984fb8db513ee36c46805d3 --- /dev/null +++ b/entity/AroundLocation_entity/entityfields/originuid_param/documentation.adoc @@ -0,0 +1 @@ +This parameter is used to exclude ourself from the search results. \ No newline at end of file diff --git a/entity/AroundLocation_entity/entityfields/recordcountinformation/valueProcess.js b/entity/AroundLocation_entity/entityfields/recordcountinformation/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ead2ce1444fae0574f407200d08a8efbb8f2ee45 --- /dev/null +++ b/entity/AroundLocation_entity/entityfields/recordcountinformation/valueProcess.js @@ -0,0 +1,32 @@ +import("system.translate"); +import("system.vars"); +import("system.result"); +import("system.logging"); + +var displayedHitCount = vars.get("$field.HitCount"); +var totalHitCount = vars.get("$field.TotalHitCount"); + +var res; +if (displayedHitCount && totalHitCount) +{ + if (parseInt(displayedHitCount) == 0) + { + res = ""; + } + else if (parseInt(displayedHitCount) == 1) + { + res = translate.withArguments("${DISPLAY_AND_OPEN_ONE_HIT}", [displayedHitCount]); + } + else if (displayedHitCount == totalHitCount) + { + res = translate.withArguments("${DISPLAY_AND_OPEN_%0_HITS}", [displayedHitCount]); + } + else + { + res = translate.withArguments("${DISPLAY_AND_OPEN_%0_OF_%1_HITS}", [displayedHitCount, totalHitCount]); + } +} +else + res = ""; + +result.string(res); \ No newline at end of file diff --git a/entity/AroundLocation_entity/entityfields/searchradius/onValidation.js b/entity/AroundLocation_entity/entityfields/searchradius/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..d616454144bedf5bfa669c4c37b63bf37b486462 --- /dev/null +++ b/entity/AroundLocation_entity/entityfields/searchradius/onValidation.js @@ -0,0 +1,17 @@ +import("system.vars"); +import("system.result"); +import("system.translate"); + +var value = vars.get("$local.value"); +var res; +if (value) +{ + value = parseInt(value); + if (value < 1) + res = translate.withArguments("The radius has to be at least %0.", ["1"]); + else if (value > 100) + res = translate.withArguments("The radius has to be %0 or lesser.", ["100"]); +} + +if (res) + result.string(res); \ No newline at end of file diff --git a/entity/AroundLocation_entity/onValidation.js b/entity/AroundLocation_entity/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..fb43d2d307d7656739b69f7d88e46821853f95fe --- /dev/null +++ b/entity/AroundLocation_entity/onValidation.js @@ -0,0 +1,15 @@ +import("system.translate"); +import("system.vars"); +import("system.result"); + +var res; +var lat = vars.get("$param.LocationLat_param"); +var lon = vars.get("$param.LocationLon_param"); + +if (lat == null || lon == null) +{ + res = translate.text("The given starting location is empty. An area search can not be performed."); +} + +if (res) + result.string(res); \ No newline at end of file diff --git a/entity/Order_entity/Order_entity.aod b/entity/Order_entity/Order_entity.aod index b7a688ff4ff4e3efd29cc8946685ff79945e1726..20e41538fab6237937526a26061986416cb024ea 100644 --- a/entity/Order_entity/Order_entity.aod +++ b/entity/Order_entity/Order_entity.aod @@ -1107,9 +1107,6 @@ <name>ORDERTYPE.displayValue</name> <expression>%aditoprj%/entity/Order_entity/recordcontainers/db/recordfieldmappings/ordertype.displayvalue/expression.js</expression> </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>COUNT.value</name> - </dbRecordFieldMapping> <aggregateFieldDbMapping> <name>COUNT_aggregate.value</name> <recordfield>SALESORDER.SALESORDERID</recordfield> diff --git a/entity/Order_entity/entityfields/testaction/onActionProcess.js b/entity/Order_entity/entityfields/testaction/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..232cd1d9827ef64604fac11bbb1e06fa85b2da27 --- /dev/null +++ b/entity/Order_entity/entityfields/testaction/onActionProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.question"); + +var r = vars.get("$field.#CONTENTTITLE"); +question.showMessage(r); \ No newline at end of file diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index 64bcd117dcc6daf812c670da9e1e5babb46e5cb9..d2cd92e613d0a6417c037f2347a8dc9ddff0d48a 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -1171,12 +1171,75 @@ <title>Count</title> </entityAggregateField> <entityProvider> - <name>indexP</name> + <name>OrganisationsViaIndex</name> + <documentation>%aditoprj%/entity/Organisation_entity/entityfields/organisationsviaindex/documentation.adoc</documentation> <recordContainer>index</recordContainer> + <dependencies> + <entityDependency> + <name>e60b8983-166d-4280-a1a5-f990ad77eeb9</name> + <entityName>AroundLocation_entity</entityName> + <fieldName>Organisations</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + <children> + <entityParameter> + <name>ExcludeOrganisationsByPersonId</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>AttributeId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>AttributeKeyId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>DuplicateActionsControl_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>DuplicateCurrentContactId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ExcludedContactIds_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OnlyOwnSupervised_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OnlyShowContactIds_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>OrganisationType_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>WithPrivate_param</name> + <expose v="true" /> + </entityParameter> + </children> </entityProvider> + <entityActionField> + <name>openAroundLocation</name> + <documentation>%aditoprj%/entity/Organisation_entity/entityfields/openaroundlocation/documentation.adoc</documentation> + <title>Radius Search</title> + <onActionProcess>%aditoprj%/entity/Organisation_entity/entityfields/openaroundlocation/onActionProcess.js</onActionProcess> + <isSelectionAction v="true" /> + <iconId>VAADIN:LOCATION_ARROW_CIRCLE_O</iconId> + <state>DISABLED</state> + <stateProcess>%aditoprj%/entity/Organisation_entity/entityfields/openaroundlocation/stateProcess.js</stateProcess> + </entityActionField> <entityField> - <name>ORGANISATION_OBJECTTYPE</name> - <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/organisation_objecttype/valueProcess.js</valueProcess> + <name>STANDARD_LAT</name> + </entityField> + <entityField> + <name>STANDARD_LON</name> </entityField> <entityProvider> <name>#PROVIDER_AGGREGATES</name> @@ -1393,6 +1456,14 @@ <recordfield>ORGANISATION.ORGANISATIONID</recordfield> <aggregateType>COUNT</aggregateType> </aggregateFieldDbMapping> + <dbRecordFieldMapping> + <name>STANDARD_LAT.value</name> + <recordfield>ADDRESS.LAT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>STANDARD_LON.value</name> + <recordfield>ADDRESS.LON</recordfield> + </dbRecordFieldMapping> </recordFieldMappings> <filterExtensions> <filterExtensionSet> @@ -1407,6 +1478,7 @@ <indexRecordContainer> <name>index</name> <configMode>INDEXGROUP_DEFINITION</configMode> + <patternExtensionProcess>%aditoprj%/entity/Organisation_entity/recordcontainers/index/patternExtensionProcess.js</patternExtensionProcess> <indexRecordAlias>Data_alias</indexRecordAlias> <query>%aditoprj%/entity/Organisation_entity/recordcontainers/index/query.js</query> <affectedTables> @@ -1497,6 +1569,11 @@ </additionalFieldNameAliases> <isMultiValued v="true" /> </indexRecordFieldMapping> + <indexRecordFieldMapping> + <name>ADDRESS_ID.displayValue</name> + <indexFieldType>ADDRESS</indexFieldType> + <isGlobalSearchField v="false" /> + </indexRecordFieldMapping> </indexFieldMappings> </indexRecordContainer> </recordContainers> diff --git a/entity/Organisation_entity/entityfields/openaroundlocation/documentation.adoc b/entity/Organisation_entity/entityfields/openaroundlocation/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..71a6bebdaa6896721a55e63b1489e51a555660d2 --- /dev/null +++ b/entity/Organisation_entity/entityfields/openaroundlocation/documentation.adoc @@ -0,0 +1 @@ +Only available if location-data is present. \ No newline at end of file diff --git a/entity/Organisation_entity/entityfields/openaroundlocation/onActionProcess.js b/entity/Organisation_entity/entityfields/openaroundlocation/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..df10e3d43cfd649a3a95833381cf4e01c998eaa4 --- /dev/null +++ b/entity/Organisation_entity/entityfields/openaroundlocation/onActionProcess.js @@ -0,0 +1,22 @@ +import("system.entities"); +import("system.vars"); +import("system.neon"); + +var rowConfig = entities.createConfigForLoadingRows() + .fields(["STANDARD_LAT", "STANDARD_LON"]) + .entity("Organisation_entity") +// .entity(vars.get("$sys.currententityname")) + .uid(vars.get("$sys.uid")); +var row = entities.getRow(rowConfig); + +//todo: use read entity and comment why (data is not loaded) +var lat = row["STANDARD_LAT"]; +var lon = row["STANDARD_LON"]; + +var params = { + OriginUid_param: vars.get("$sys.uid"), + LocationLat_param: lat, + LocationLon_param: lon +} + +neon.openContext("AroundLocation", "AroundOrganisationLocation_view", null, null, params, null); \ No newline at end of file diff --git a/entity/Organisation_entity/entityfields/openaroundlocation/stateProcess.js b/entity/Organisation_entity/entityfields/openaroundlocation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a2899dea4da93e2bb956bb7a10c91fadb365f9a9 --- /dev/null +++ b/entity/Organisation_entity/entityfields/openaroundlocation/stateProcess.js @@ -0,0 +1,27 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); +import("system.entities"); + +//todo: only visible if location tracking is enabled + + +//todo: use read entity and comment why (data is not loaded) + +var rowConfig = entities.createConfigForLoadingRows() + .fields(["STANDARD_LAT", "STANDARD_LON"]) + .entity(vars.get("$sys.currententityname")) + .uid(vars.get("$sys.uid")); +var row = entities.getRow(rowConfig); + +var lat = row["STANDARD_LAT"]; +var lon = row["STANDARD_LON"]; + +var res; +if (lat && lon) + res = neon.COMPONENTSTATE_AUTO; +else + res = neon.COMPONENTSTATE_DISABLED; + +result.string(res); + \ No newline at end of file diff --git a/entity/Organisation_entity/entityfields/organisationsviaindex/documentation.adoc b/entity/Organisation_entity/entityfields/organisationsviaindex/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..3230ced75ea5dbac74798ad11d5f8474ffc3094b --- /dev/null +++ b/entity/Organisation_entity/entityfields/organisationsviaindex/documentation.adoc @@ -0,0 +1,5 @@ +Provides organisations via the index recordContainer and not the default (database) recorcContainer. + +WARNING: Not all Parameters are supported in the index recordContainer. +Especially the parameters that are used for filtering. +If these parameters are necessary they need to be implemented in the `patternExtensionProcess` of the IndexRecordContainer. \ No newline at end of file diff --git a/entity/Organisation_entity/recordcontainers/index/patternExtensionProcess.js b/entity/Organisation_entity/recordcontainers/index/patternExtensionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a8964d11609060d4990dc463b161fc0f799451e3 --- /dev/null +++ b/entity/Organisation_entity/recordcontainers/index/patternExtensionProcess.js @@ -0,0 +1,27 @@ +import("Entity_lib"); +import("system.result"); +import("system.vars"); +import("system.indexsearch"); +import("system.logging"); + +var patternConfig = indexsearch.createPatternConfig(); + +// filter privat company if it is not needed +if (vars.exists("$param.WithPrivate_param") && vars.getString("$param.WithPrivate_param") != "true") +{ + patternConfig.not(indexsearch.createTerm("0").setIndexField("organisationid_value")); +} + +ParameterUtils.handleNotEmptyEntityParam("$param.OnlyShowContactIds_param", function(pContactIds){ + var contactIdsToFilter = JSON.parse(pContactIds); + var filterGroup = indexsearch.createGroupTerm(); + + contactIdsToFilter.forEach(function (contactId){ + filterGroup.or(indexsearch.createTerm(contactId).setIndexField(indexsearch.FIELD_ID)); + }); + patternConfig.and(filterGroup); +}); + +var pattern = indexsearch.buildPattern(patternConfig); +logging.log("Pattern:" + pattern); +result.string(pattern); diff --git a/entity/Organisation_entity/recordcontainers/index/query.js b/entity/Organisation_entity/recordcontainers/index/query.js index 668b6b227f95a21c730eef997cb908438a3833f7..baa055d29c0dc52198cbfd020f216cb46ce169c8 100644 --- a/entity/Organisation_entity/recordcontainers/index/query.js +++ b/entity/Organisation_entity/recordcontainers/index/query.js @@ -28,7 +28,7 @@ var querySelect = newSelect([ sqlHelper.concat([sqlHelper.cast("defaultAddress.LAT", SQLTYPES.VARCHAR, 16), sqlHelper.cast("defaultAddress.LON", SQLTYPES.VARCHAR, 16)], ","), //additional indexed fields "ORGANISATION.NAME", - "ORGANISATION.ORGANISATIONID", + sqlHelper.trim("ORGANISATION.ORGANISATIONID"),//trim to enable filter patterns like: >> -organisationid_value:0<< "CONTACT.CONTACTID", "ORGANISATION.CUSTOMERCODE", "ADDRESS.ADDRESS", @@ -36,7 +36,10 @@ var querySelect = newSelect([ "ADDRESS.ZIP", "ADDRESS.CITY", "COMMUNICATION.ADDR", - "PHONE.ADDR" + "PHONE.ADDR", + sqlHelper.concat([sqlHelper.concat(["defaultAddress.ADDRESS", "defaultAddress.BUILDINGNO"]) + ,sqlHelper.concat(["defaultAddress.COUNTRY", "defaultAddress.ZIP", "defaultAddress.CITY"]) + ], " - ") ]) .from("ORGANISATION") .join("CONTACT", "CONTACT.ORGANISATION_ID = ORGANISATION.ORGANISATIONID and CONTACT.PERSON_ID is null") diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index d09abcb5d74b41428439ed4ee86f677f9cfc327f..bab1be7ecc3bf1d9c690234a75fcf63bfed6a981 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -7149,6 +7149,21 @@ <entry> <key>export using the selected template</key> </entry> + <entry> + <key>${DISPLAY_AND_OPEN_ONE_HIT}</key> + </entry> + <entry> + <key>${DISPLAY_AND_OPEN_%0_OF_%1_HITS}</key> + </entry> + <entry> + <key>${ACTION_DO_OPEN}</key> + </entry> + <entry> + <key>${DISPLAY_AND_OPEN_%0_HITS}</key> + </entry> + <entry> + <key>Radius Search</key> + </entry> <entry> <key>Input value</key> </entry> @@ -7171,7 +7186,7 @@ <key>Mappings</key> </entry> <entry> - <key>Sort up</key> + <key>Radius in km</key> </entry> <entry> <key>Titel</key> @@ -7179,9 +7194,6 @@ <entry> <key>Set missing address locations</key> </entry> - <entry> - <key>Sort down</key> - </entry> <entry> <key>FavoriteFilter_view</key> </entry> @@ -7194,6 +7206,21 @@ <entry> <key>Gruppenname</key> </entry> + <entry> + <key>The radius has to be %0 or lesser.</key> + </entry> + <entry> + <key>The given starting location is empty. An area search can not be performed.</key> + </entry> + <entry> + <key>The radius has to be at least %0.</key> + </entry> + <entry> + <key>Sort up</key> + </entry> + <entry> + <key>Sort down</key> + </entry> <entry> <key>Enter current password to verify</key> </entry> diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 2cbfd86cf79de53ae8194f14b228e31dbfca8e72..3df93124eda0ae2d702bb8e96a2fe41e35472ca3 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -10,6 +10,10 @@ <key>Probability AI</key> <value>Wahrscheinlichkeit KI</value> </entry> + <entry> + <key>The given starting location is empty. An area search can not be performed.</key> + <value>Der übergebene Startpunkt ist leer. Die Umkreissuche kann nicht ausgeführt werden.</value> + </entry> <entry> <key>Settings</key> <value>Einstellungen</value> @@ -41,6 +45,10 @@ <key>Show my organisations</key> <value>Meine Firmen anzeigen</value> </entry> + <entry> + <key>Radius Search</key> + <value>Umkreissuche</value> + </entry> <entry> <key>${FILTER_DYNAMIC_VALUE_ME}</key> <value>Ich</value> @@ -8224,6 +8232,14 @@ Bitte Datumseingabe prüfen</value> <key>Invalid year!</key> <value>Ungültiges jahr!</value> </entry> + <entry> + <key>The radius has to be %0 or lesser.</key> + <value>Der Radius muss %0 km oder weniger betragen.</value> + </entry> + <entry> + <key>The radius has to be at least %0.</key> + <value>Der Radius muss mindestens %0 km betragen.</value> + </entry> <entry> <key>high</key> <value>hoch</value> @@ -8874,7 +8890,6 @@ Bitte Datumseingabe prüfen</value> </entry> <entry> <key>Download letter and create Activity</key> - <value>Brief herunterladen und Aktivität erstellen</value> </entry> <entry> <key>Extend</key> @@ -8945,17 +8960,10 @@ Bitte Datumseingabe prüfen</value> <entry> <key>Create model</key> </entry> - <entry> - <key>Edit workflow</key> - </entry> <entry> <key>Recipients after adding</key> <value>Empfänger nach dem hinzufügen</value> </entry> - <entry> - <key>%0 new recipients will be added to the bulk mail.</key> - <value>Der Serienmail werden %0 neue Empfänger hinzugefügt.</value> - </entry> <entry> <key>%0 new participants will be added to the campaign.</key> <value>Der Kampagne werden %0 neue Empfänger hinzugefügt.</value> @@ -8995,6 +9003,10 @@ Bitte Datumseingabe prüfen</value> <entry> <key>Receive new Department Permission</key> </entry> + <entry> + <key>Selection placeholder</key> + <value>Suche Platzhalter</value> + </entry> <entry> <key>Grant new Department Permission</key> <value>Neue Abteilungs-Berechtigung vergeben</value> @@ -9003,6 +9015,10 @@ Bitte Datumseingabe prüfen</value> <key>Current password</key> <value>Aktuelles Passwort</value> </entry> + <entry> + <key>Calendar maintime start</key> + <value>Kalender Kernzeit Beginn</value> + </entry> <entry> <key>New password</key> <value>Neues Passwort</value> @@ -9016,13 +9032,17 @@ Bitte Datumseingabe prüfen</value> <value>Aktuelles Passwort zur Verifizierung eingeben</value> </entry> <entry> - <key>Selection placeholder</key> - <value>Suche Platzhalter</value> + <key>Password must contain special characters</key> + <value>Passwort muss Sonderzeichen enhalten</value> </entry> <entry> <key>SELECTION_POSTFIX</key> <value>Hinten</value> </entry> + <entry> + <key>Password must be at least %0 characters</key> + <value>Passwort muss aus mindestens %0 Zeichen bestehen</value> + </entry> <entry> <key>SELECTION_PREFIX</key> <value>Vorne</value> @@ -9041,23 +9061,23 @@ Bitte Datumseingabe prüfen</value> </entry> <entry> <key>Selection ignore case</key> - <value>Groß-/Kleinschreibung ignorieren</value> + <value>Suche Groß-/Kleinschreibung ignorieren</value> </entry> <entry> <key>Calendar hour divider</key> - <value>Stundenunterteilung</value> - </entry> - <entry> - <key>Calendar maintime start</key> - <value>Kernzeit Beginn</value> + <value>Kalender Stundenunterteilung</value> </entry> <entry> <key>Calendar maintime end</key> - <value>Kernzeit Ende</value> + <value>Kalender Kernzeit Ende</value> </entry> <entry> <key>{SENT_MAIL}</key> </entry> + <entry> + <key>Password must contain numbers</key> + <value>Passwort muss Zahlen enhalten</value> + </entry> <entry> <key>favorties</key> </entry> @@ -9092,10 +9112,10 @@ Bitte Datumseingabe prüfen</value> </entry> <entry> <key>Add Recipients</key> - <value>Teilnehmer hinzufügen</value> </entry> <entry> <key>Grant new User Permission</key> + <value>Neue Benutzer-Berechtigung vergeben</value> </entry> <entry> <key>{SEND_MAIL}</key> @@ -9104,71 +9124,83 @@ Bitte Datumseingabe prüfen</value> <key>Latitude</key> </entry> <entry> - <key>Longitude</key> + <key>Password must contain spaces</key> + <value>Passwort muss Leerzeichen enhalten</value> </entry> <entry> - <key>Permission Procurer User</key> - <value>Rechteempfänger Benutzer</value> + <key>Enddatum</key> </entry> <entry> - <key>Grant new User Permission</key> - <value>Neue Benutzer-Berechtigung vergeben</value> + <key>Startdatum</key> </entry> <entry> - <key>Permission Procurer Department</key> - <value>Rechteempfänger Abteilung</value> + <key>favorites</key> </entry> <entry> - <key>Grant new Department Permission</key> - <value>Neue Abteilungs-Berechtigung vergeben</value> + <key>Input value</key> </entry> <entry> - <key>favorites</key> + <key>Output value</key> </entry> <entry> - <key>Input value</key> + <key>Mapping</key> </entry> <entry> - <key>Output value</key> + <key>The use of any of your previous %0 passwords is prohibited</key> + <value>Die Verwendung eines Ihrer vorherigen %0 Passwörter ist untersagt</value> </entry> <entry> - <key>Enddatum</key> + <key>Mappings</key> </entry> <entry> - <key>Startdatum</key> + <key>Sort up</key> </entry> <entry> - <key>Mapping</key> + <key>Password must contain letters</key> + <value>Passwort muss Buchstaben enhalten</value> </entry> <entry> - <key>Typ</key> + <key>${DISPLAY_AND_OPEN_ONE_HIT}</key> + <value>Ein Ergebnis wurde gefunden und kann geöffnet werden.</value> </entry> <entry> - <key>Mappings</key> + <key>${DISPLAY_AND_OPEN_%0_OF_%1_HITS}</key> + <value>%0 von insgesamt %1 Ergebnissen werden derzeit angezeigt und können geöffnet werden.</value> </entry> <entry> - <key>Sort up</key> + <key>${ACTION_DO_OPEN}</key> + <value>Öffnen</value> </entry> <entry> - <key>Titel</key> + <key>${DISPLAY_AND_OPEN_%0_HITS}</key> + <value>Alle %0 Ergebnisse werden derzeit angezeigt und können geöffnet werden.</value> + </entry> + <entry> + <key>Radius in km</key> </entry> <entry> <key>Set missing address locations</key> </entry> <entry> - <key>Sort down</key> + <key>Set all address locations</key> + </entry> + <entry> + <key>Titel</key> + </entry> + <entry> + <key>Gruppenname</key> </entry> <entry> <key>FavoriteFilter_view</key> </entry> <entry> - <key>Set all address locations</key> + <key>Typ</key> </entry> <entry> <key>Members</key> </entry> <entry> - <key>Gruppenname</key> + <key>Sort down</key> </entry> <entry> <key>Total in euros</key> @@ -9177,7 +9209,7 @@ Bitte Datumseingabe prüfen</value> <key>Add Participants</key> </entry> <entry> - <key>Add Recipients</key> + <key>Longitude</key> </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index a92be903f87b98ae290f59f1805e686d7408b039..1b29727a4107fbf050cfa87323b4d179c4d9a89d 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -10,15 +10,27 @@ <key>${ORDER_CANCELLED}</key> <value>cancelled</value> </entry> + <entry> + <key>${DISPLAY_AND_OPEN_%0_HITS}</key> + <value>%0 results are displayed and will be opened.</value> + </entry> <entry> <key>Company</key> </entry> <entry> <key>New step</key> </entry> + <entry> + <key>${DISPLAY_AND_OPEN_%0_OF_%1_HITS}</key> + <value>%0 of %1 results are displayed and will be opened.</value> + </entry> <entry> <key>E-Mail</key> </entry> + <entry> + <key>${DISPLAY_AND_OPEN_ONE_HIT}</key> + <value>One result is displayed and will be opened.</value> + </entry> <entry> <key>Male</key> </entry> @@ -113,6 +125,10 @@ <entry> <key>Salutation</key> </entry> + <entry> + <key>${ACTION_DO_OPEN}</key> + <value>Open</value> + </entry> <entry> <key>Middlename</key> </entry> @@ -7216,6 +7232,9 @@ <entry> <key>export using the selected template</key> </entry> + <entry> + <key>Radius Search</key> + </entry> <entry> <key>Input value</key> </entry> @@ -7238,7 +7257,7 @@ <key>Mappings</key> </entry> <entry> - <key>Sort up</key> + <key>Radius in km</key> </entry> <entry> <key>Titel</key> @@ -7246,9 +7265,6 @@ <entry> <key>Set missing address locations</key> </entry> - <entry> - <key>Sort down</key> - </entry> <entry> <key>FavoriteFilter_view</key> </entry> @@ -7261,6 +7277,21 @@ <entry> <key>Gruppenname</key> </entry> + <entry> + <key>The radius has to be %0 or lesser.</key> + </entry> + <entry> + <key>The given starting location is empty. An area search can not be performed.</key> + </entry> + <entry> + <key>The radius has to be at least %0.</key> + </entry> + <entry> + <key>Sort up</key> + </entry> + <entry> + <key>Sort down</key> + </entry> <entry> <key>Enter current password to verify</key> </entry> diff --git a/neonContext/AroundLocation/AroundLocation.aod b/neonContext/AroundLocation/AroundLocation.aod new file mode 100644 index 0000000000000000000000000000000000000000..0df97bbbfd3e491a9ccb6ec79732d658c5bbaab1 --- /dev/null +++ b/neonContext/AroundLocation/AroundLocation.aod @@ -0,0 +1,20 @@ +<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.1"> + <name>AroundLocation</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <entity>AroundLocation_entity</entity> + <references> + <neonViewReference> + <name>b0b5f41e-d5c6-4532-8d1a-be7efb23bd33</name> + <view>AroundOrganisationLocation_view</view> + </neonViewReference> + <neonViewReference> + <name>606fdae5-244e-4258-8f04-770ca6ca04a3</name> + <view>AroundLocationHeader_view</view> + </neonViewReference> + <neonViewReference> + <name>6bf1facb-814a-41ef-b8c8-5dee49b54e56</name> + <view>AroundOrganisationFooter_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonContext/Organisation/Organisation.aod b/neonContext/Organisation/Organisation.aod index 90a9c418dfa1f9da71c1ebc784f6e124847ae0f5..90ec3706d78864bdde6041bfe47ecddb3aff2477 100644 --- a/neonContext/Organisation/Organisation.aod +++ b/neonContext/Organisation/Organisation.aod @@ -53,7 +53,7 @@ </neonViewReference> <neonViewReference> <name>a97ac17d-171b-4c9a-83fa-bb5a466c7b20</name> - <view>OrganisationDuplicateEditview_view</view> + <view>OrganisationNoNoiseTable_view</view> </neonViewReference> <neonViewReference> <name>ade0ed85-260d-4da5-bf4c-f838cfdcc693</name> @@ -67,5 +67,9 @@ <name>1efa420b-42f4-4d4d-8c23-aba7e6824f4b</name> <view>OrganisationClassificationDrawer_view</view> </neonViewReference> + <neonViewReference> + <name>0b052872-d6b4-41ac-ad0b-580575893e1b</name> + <view>OrganisationLesserNoiseTable_view</view> + </neonViewReference> </references> </neonContext> diff --git a/neonView/AroundLocationHeader_view/AroundLocationHeader_view.aod b/neonView/AroundLocationHeader_view/AroundLocationHeader_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..ce86ba2afd585215bb100fec728104b427bdfd4c --- /dev/null +++ b/neonView/AroundLocationHeader_view/AroundLocationHeader_view.aod @@ -0,0 +1,26 @@ +<?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.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>AroundLocationHeader_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + <autoHeight v="true" /> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>GenericEditable</name> + <editMode v="true" /> + <hideEmptyFields v="false" /> + <entityField>#ENTITY</entityField> + <isEditable v="true" /> + <fields> + <entityFieldLink> + <name>2b61a88c-d3ca-42df-98ab-0db350346fef</name> + <entityField>SearchRadius</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/neonView/AroundOrganisationFooter_view/AroundOrganisationFooter_view.aod b/neonView/AroundOrganisationFooter_view/AroundOrganisationFooter_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..74bac1d84439489938b5751fe465909d5128e69d --- /dev/null +++ b/neonView/AroundOrganisationFooter_view/AroundOrganisationFooter_view.aod @@ -0,0 +1,33 @@ +<?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.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>AroundOrganisationFooter_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + <autoHeight v="true" /> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>readonlyGeneric</name> + <hideLabels v="true" /> + <hideEmptyFields v="false" /> + <entityField>#ENTITY</entityField> + <isEditable v="false" /> + <fields> + <entityFieldLink> + <name>60b0acd1-288c-4b45-87fb-c135282b9a70</name> + <entityField>RecordCountInformation</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + <actionsViewTemplate> + <name>actions</name> + <actions> + <element>Open</element> + </actions> + <entityField>#ENTITY</entityField> + </actionsViewTemplate> + </children> +</neonView> diff --git a/neonView/AroundOrganisationLocation_view/AroundOrganisationLocation_view.aod b/neonView/AroundOrganisationLocation_view/AroundOrganisationLocation_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..6ee6f9459fd4bc34294cfec67617be540463888a --- /dev/null +++ b/neonView/AroundOrganisationLocation_view/AroundOrganisationLocation_view.aod @@ -0,0 +1,33 @@ +<?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.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>AroundOrganisationLocation_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="false" /> + <size>NORMAL</size> + <isOverlay v="true" /> + <overlayOrientation>LANDSCAPE</overlayOrientation> + <layout> + <headerFooterLayout> + <name>layout</name> + <header>b156824b-7611-4f94-a42e-d49e3878d93c</header> + <footer>1d0bb6f6-e645-438a-9601-683798899187</footer> + </headerFooterLayout> + </layout> + <children> + <neonViewReference> + <name>b156824b-7611-4f94-a42e-d49e3878d93c</name> + <entityField>#ENTITY</entityField> + <view>AroundLocationHeader_view</view> + </neonViewReference> + <neonViewReference> + <name>66974669-21d3-47bd-b776-f8cc6a5106a4</name> + <entityField>Organisations</entityField> + <view>OrganisationLesserNoiseTable_view</view> + </neonViewReference> + <neonViewReference> + <name>1d0bb6f6-e645-438a-9601-683798899187</name> + <entityField>#ENTITY</entityField> + <view>AroundOrganisationFooter_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/OrganisationEdit_view/OrganisationEdit_view.aod b/neonView/OrganisationEdit_view/OrganisationEdit_view.aod index 81ab662529757a2607ec8dc7421c97a730400b11..5a59c451c77ae1572ed36fc92ae2d97c156fa020 100644 --- a/neonView/OrganisationEdit_view/OrganisationEdit_view.aod +++ b/neonView/OrganisationEdit_view/OrganisationEdit_view.aod @@ -14,7 +14,7 @@ <neonViewReference> <name>f2fa0351-15af-4d1c-b7dd-0e42d9c7889f</name> <entityField>SelfDuplicatesUncached</entityField> - <view>OrganisationDuplicateEditview_view</view> + <view>OrganisationNoNoiseTable_view</view> </neonViewReference> <genericViewTemplate> <name>Edit</name> diff --git a/neonView/OrganisationLesserNoiseTable_view/OrganisationLesserNoiseTable_view.aod b/neonView/OrganisationLesserNoiseTable_view/OrganisationLesserNoiseTable_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..6cdd2403b231c98ca046452948c2a4cb246e7e87 --- /dev/null +++ b/neonView/OrganisationLesserNoiseTable_view/OrganisationLesserNoiseTable_view.aod @@ -0,0 +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.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>OrganisationLesserNoiseTable_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <noneLayout> + <name>layout</name> + </noneLayout> + </layout> + <children> + <tableViewTemplate> + <name>table</name> + <hideActions v="true" /> + <hideContentSearch v="true" /> + <iconField></iconField> + <entityField>#ENTITY</entityField> + <hideHeader v="false" /> + <columns> + <neonTableColumn> + <name>8b764a88-ea38-4810-9647-036de8e2bdb5</name> + <entityField>#IMAGE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>d45ea163-ac10-4a4c-8a6a-1f0680df3c2e</name> + <entityField>NAME</entityField> + </neonTableColumn> + <neonTableColumn> + <name>0fc13178-f186-4c1a-82f4-5a9f89ed6779</name> + <entityField>STANDARD_PHONE_COMMUNICATION</entityField> + </neonTableColumn> + <neonTableColumn> + <name>d052d240-7001-4a65-bd04-7f90cac2b88e</name> + <entityField>STANDARD_EMAIL_COMMUNICATION</entityField> + </neonTableColumn> + <neonTableColumn> + <name>8d815ffd-7b16-45bc-9ee9-557277147818</name> + <entityField>ADDRESS_ID</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView> diff --git a/neonView/OrganisationDuplicateEditview_view/OrganisationDuplicateEditview_view.aod b/neonView/OrganisationNoNoiseTable_view/OrganisationNoNoiseTable_view.aod similarity index 94% rename from neonView/OrganisationDuplicateEditview_view/OrganisationDuplicateEditview_view.aod rename to neonView/OrganisationNoNoiseTable_view/OrganisationNoNoiseTable_view.aod index 3020a87d6f018fe786e4bd829fb891914ab9d0e7..22d274421a23d815278b17e4c67669b001611d04 100644 --- a/neonView/OrganisationDuplicateEditview_view/OrganisationDuplicateEditview_view.aod +++ b/neonView/OrganisationNoNoiseTable_view/OrganisationNoNoiseTable_view.aod @@ -1,6 +1,6 @@ <?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.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> - <name>OrganisationDuplicateEditview_view</name> + <name>OrganisationNoNoiseTable_view</name> <majorModelMode>DISTRIBUTED</majorModelMode> <layout> <noneLayout> @@ -9,7 +9,7 @@ </layout> <children> <tableViewTemplate> - <name>DuplicateEditview_Table</name> + <name>table</name> <hideActions v="true" /> <hideContentSearch v="true" /> <iconField></iconField> diff --git a/process/Entity_lib/process.js b/process/Entity_lib/process.js index 126ef4f9e156b768e0db9985373b11e5016c9c17..cd17d5d9e24b261da1f869d40ebda76be6f3628e 100644 --- a/process/Entity_lib/process.js +++ b/process/Entity_lib/process.js @@ -30,6 +30,67 @@ EntityUtils.parseUidColumn = function(pFullUidName) }; }; + +/** +* provides static methods for handling of entity parameters +* do not create an instance of this +* +* @class +*/ +function ParameterUtils(){} + +/** + * will check if a parameter exists and if it is not empty (null, undefined, emtpy string) a callback function is called </br> + * this is usefull for simple checks of a single parameter + * + * @param {String} pParameterName <p>Full name of the paramter that is handled + * @param {function} pCallbackFn <p>a callback function that is called when the parameter is staded okay</br> + * The following parameters are passed to the function: + * <ul> + * <li>String:parameter value</li> + * <li>String:parameter name</li> + * </ul> + * The this-reference is null + * + * @return {Object} returns null if the parameter was empty or does not exist, otherwise the return-value of the callback-function is returned + */ +ParameterUtils.handleNotEmptyEntityParam = function(pParameterName, pCallbackFn) +{ + if (vars.exists(pParameterName)) + { + var paramValue = vars.get(pParameterName); + if (paramValue != null && paramValue != "") + return pCallbackFn.call(null, paramValue, pParameterName); + } + return null; +}; + + +/** + * will check if a parameter exists and calls a given callback function </br> + * this is usefull for simple checks of a single parameter + * + * @param {String} pParameterName <p>Full name of the paramter that is handled + * @param {function} pCallbackFn <p>a callback function that is called when the parameter is staded okay</br> + * The following parameters are passed to the function: + * <ul> + * <li>String:parameter value</li> + * <li>String:parameter name</li> + * </ul> + * The this-reference is null + * + * @return {Object} returns null if the parameter does not exist, otherwise the return-value of the callback-function is returned + */ +ParameterUtils.handleAnyEntityParam = function(pParameterName, pCallbackFn) +{ + if (vars.exists(pParameterName)) + { + var paramValue = vars.get(pParameterName); + return pCallbackFn.call(null, paramValue, pParameterName); + } + return null; +}; + /** * provides static methods for special handling of entities in JDito-Processes * do not create an instance of this