diff --git a/entity/Address_entity/Address_entity.aod b/entity/Address_entity/Address_entity.aod index 6d9d49d26b160768876a8c3c7d5057117728f694..76217f3083ad4b778071b258c87b84857d5140a7 100644 --- a/entity/Address_entity/Address_entity.aod +++ b/entity/Address_entity/Address_entity.aod @@ -21,6 +21,7 @@ </entityField> <entityField> <name>ADDRIDENTIFIER</name> + <title>{$ADDRESS_IDENTIFIER}</title> </entityField> <entityField> <name>ADDR_TYPE</name> @@ -104,6 +105,7 @@ </entityProvider> <entityParameter> <name>ContactId_param</name> + <valueProcess>%aditoprj%/entity/Address_entity/entityfields/contactid_param/valueProcess.js</valueProcess> <expose v="true" /> <mandatory v="true" /> <documentation>%aditoprj%/entity/Address_entity/entityfields/contactid_param/documentation.adoc</documentation> @@ -192,6 +194,7 @@ </entityField> <entityParameter> <name>DefaultAddressId_param</name> + <valueProcess>%aditoprj%/entity/Address_entity/entityfields/defaultaddressid_param/valueProcess.js</valueProcess> <expose v="true" /> <mandatory v="false" /> <documentation>%aditoprj%/entity/Address_entity/entityfields/defaultaddressid_param/documentation.adoc</documentation> @@ -235,6 +238,7 @@ <title></title> <valueProcess>%aditoprj%/entity/Address_entity/entityfields/organisationandcontactaddresses/children/organisationid_param/valueProcess.js</valueProcess> <expose v="true" /> + <documentation>%aditoprj%/entity/Address_entity/entityfields/organisationandcontactaddresses/children/organisationid_param/documentation.adoc</documentation> </entityParameter> <entityParameter> <name>ContactId_param</name> @@ -278,12 +282,20 @@ <name>DATE_EDIT</name> <valueProcess>%aditoprj%/entity/Address_entity/entityfields/date_edit/valueProcess.js</valueProcess> </entityField> + <entityField> + <name>IS_STANDARD_ICON</name> + <title>Standard</title> + <contentType>IMAGE</contentType> + <contentTypeProcess>%aditoprj%/entity/Address_entity/entityfields/is_standard_icon/contentTypeProcess.js</contentTypeProcess> + <valueProcess>%aditoprj%/entity/Address_entity/entityfields/is_standard_icon/valueProcess.js</valueProcess> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> <name>db</name> <alias>Data_alias</alias> <conditionProcess>%aditoprj%/entity/Address_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <orderClauseProcess>%aditoprj%/entity/Address_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> <onDBInsert>%aditoprj%/entity/Address_entity/recordcontainers/db/onDBInsert.js</onDBInsert> <linkInformation> <linkInformation> diff --git a/entity/Address_entity/entityfields/contactid_param/valueProcess.js b/entity/Address_entity/entityfields/contactid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/Address_entity/entityfields/defaultaddressid_param/valueProcess.js b/entity/Address_entity/entityfields/defaultaddressid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9c5d394a1a55a336b53ea24c4bbe5cc5afa53be7 --- /dev/null +++ b/entity/Address_entity/entityfields/defaultaddressid_param/valueProcess.js @@ -0,0 +1,20 @@ +import("Sql_lib"); +import("system.db"); +import("system.result"); +import("system.vars"); + +//this organisationId param is optional which means: +//if it's not given for the "OrganisationAndContactAddresses"-provider we've to find the orgId by the passed CONTACTID +//the reason behind this is: whenever the consuming entity can provide the organisationid it should provide the id to improve performance +//(since we[Address_entity] have not to find out the value our own) +//but if the consuming entity does not have the value we[Address_entity] will do it for the sake of simpler usage + +var contactId = vars.get("$param.ContactId_param"); +if (contactId) +{ + var sql = SqlCondition.begin() + .andPrepare("CONTACT.CONTACTID", contactId) + .buildSql("select CONTACT.ADDRESS_ID from CONTACT"); + var organisationId = db.cell(sql); + result.string(organisationId); +} \ No newline at end of file diff --git a/entity/Address_entity/entityfields/is_standard/documentation.adoc b/entity/Address_entity/entityfields/is_standard/documentation.adoc index fb7d4bac8de251235814acac61084c0f44919064..6a7186b4676561a755c46356e525477ed0c6ea28 100644 --- a/entity/Address_entity/entityfields/is_standard/documentation.adoc +++ b/entity/Address_entity/entityfields/is_standard/documentation.adoc @@ -1,3 +1,3 @@ The `IS_STANDARD` field specifies if an ADDRESS is the standard address (see Address_entity documentation) - -However that information is not stored directly in the `ADDRESS` database table. Every `CONTACT`-record has an own standard address. \ No newline at end of file +However that information is not stored directly in the `ADDRESS` database table. Every `CONTACT`-record has an own standard address. +This fields works only correct if `DefaultAddressId_param` is passed. \ No newline at end of file diff --git a/entity/Address_entity/entityfields/is_standard_icon/contentTypeProcess.js b/entity/Address_entity/entityfields/is_standard_icon/contentTypeProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..2c348afa93c82ff8f11312242f9eb36fcd174111 --- /dev/null +++ b/entity/Address_entity/entityfields/is_standard_icon/contentTypeProcess.js @@ -0,0 +1,10 @@ +import("system.vars"); +import("system.result"); + +var isStandard = vars.getString("$field.IS_STANDARD") == "true"; +var res; +if (isStandard) + res = "IMAGE"; +else + res = "TEXT"; +result.string(res); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/is_standard_icon/valueProcess.js b/entity/Address_entity/entityfields/is_standard_icon/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7420487f08a230ce60f272cdd253abf4331667c2 --- /dev/null +++ b/entity/Address_entity/entityfields/is_standard_icon/valueProcess.js @@ -0,0 +1,10 @@ +import("system.result"); +import("system.vars"); + +var isStandard = vars.getString("$field.IS_STANDARD") == "true"; +var res; +if (isStandard) + res = "VAADIN:MAP_MARKER"; +else + res = ""; +result.string(res); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/organisationandcontactaddresses/children/organisationid_param/documentation.adoc b/entity/Address_entity/entityfields/organisationandcontactaddresses/children/organisationid_param/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..74649993db04d3b1a82da68fb7f50ba86b972235 --- /dev/null +++ b/entity/Address_entity/entityfields/organisationandcontactaddresses/children/organisationid_param/documentation.adoc @@ -0,0 +1,2 @@ +This param will be calculated automatically with the given "ContactId_param" if you do not pass it. +When you've got the ORGANISTAIONID-value already you should pass it for better performance. \ No newline at end of file diff --git a/entity/Address_entity/entityfields/organisationandcontactaddresses/children/organisationid_param/valueProcess.js b/entity/Address_entity/entityfields/organisationandcontactaddresses/children/organisationid_param/valueProcess.js index d1f6855f94f017b4830624265de0e0f58eec53cb..c4bf0500f2c4d1835300f8dbcb921f28b8917f7c 100644 --- a/entity/Address_entity/entityfields/organisationandcontactaddresses/children/organisationid_param/valueProcess.js +++ b/entity/Address_entity/entityfields/organisationandcontactaddresses/children/organisationid_param/valueProcess.js @@ -1,7 +1,20 @@ +import("Sql_lib"); import("system.db"); import("system.result"); -import("Sql_lib"); +import("system.vars"); + +//this organisationId param is optional which means: +//if it's not given for the "OrganisationAndContactAddresses"-provider we've to find the orgId by the passed CONTACTID +//the reason behind this is: whenever the consuming entity can provide the organisationid it should provide the id to improve performance +//(since we[Address_entity] have not to find out the value our own) +//but if the consuming entity does not have the value we[Address_entity] will do it for the sake of simpler usage -result.string(db.cell(SqlCondition.begin() - .andPrepareVars("CONTACT.CONTACTID", "$param.ContactId_param") - .buildSql("select ORGANISATION_ID from CONTACT", "1=2"))); +var contactId = vars.get("$param.ContactId_param"); +if (contactId) +{ + var sql = SqlCondition.begin() + .andPrepare("CONTACT.CONTACTID", contactId) + .buildSql("select CONTACT.ORGANISATION_ID from CONTACT"); + var organisationId = db.cell(sql); + result.string(organisationId); +} \ No newline at end of file diff --git a/entity/Address_entity/recordcontainers/db/orderClauseProcess.js b/entity/Address_entity/recordcontainers/db/orderClauseProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7cafef1a54066dc53101218e6709f0d4f18b400e --- /dev/null +++ b/entity/Address_entity/recordcontainers/db/orderClauseProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.db"); + +result.object({"ADDRESS.COUNTRY": db.ASCENDING, + "ADDRESS.ADDRESS": db.ASCENDING}); \ No newline at end of file diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index 73af0d0247c8e3de0895628b50ec6efe7d86984d..7f1bc7254aa657561ec6407f869201491d8fa22a 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -2718,6 +2718,18 @@ <entry> <key>Note</key> </entry> + <entry> + <key>Email must be unique!</key> + </entry> + <entry> + <key>Project Management</key> + </entry> + <entry> + <key>Support</key> + </entry> + <entry> + <key>{$ADDRESS_IDENTIFIER}</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> <sqlModels> diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 3ab2420888cc7a03a69aaa9395ea3a83e108cacc..4a8fb2f9726764031ce846240eb71589540ab586 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -3503,6 +3503,16 @@ <entry> <key>Note</key> </entry> + <entry> + <key>Project Management</key> + </entry> + <entry> + <key>Support</key> + </entry> + <entry> + <key>{$ADDRESS_IDENTIFIER}</key> + <value>Bezeichnung</value> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index a7440fd6ab588bb059a7f54073e5c70464c4b4b8..7226f426ca415090b274d3b3bff1eef16c5dd092 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -2748,6 +2748,19 @@ <entry> <key>Human Resources</key> </entry> + <entry> + <key>Email must be unique!</key> + </entry> + <entry> + <key>Project Management</key> + </entry> + <entry> + <key>Support</key> + </entry> + <entry> + <key>{$ADDRESS_IDENTIFIER}</key> + <value>Identifier</value> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/neonContext/Address/Address.aod b/neonContext/Address/Address.aod index 62cf97f24928e402431a2ac83f30645c2f3ee9aa..85f79bd80dbee05ca88af7a2ef9a2daf9118fdca 100644 --- a/neonContext/Address/Address.aod +++ b/neonContext/Address/Address.aod @@ -6,6 +6,7 @@ <filterview>AddressFilter_view</filterview> <editview>AddressEdit_view</editview> <preview>AddressEdit_view</preview> + <lookupview>AddressLookup_view</lookupview> <entity>Address_entity</entity> <references> <neonViewReference> @@ -24,5 +25,9 @@ <name>f4c516c0-b9de-47df-91e4-43bdb3297fe7</name> <view>AdressMultiEdit_view</view> </neonViewReference> + <neonViewReference> + <name>77b182a7-2361-41a7-ae78-dc5285b41b97</name> + <view>AddressLookup_view</view> + </neonViewReference> </references> </neonContext> diff --git a/neonView/AddressLookup_view/AddressLookup_view.aod b/neonView/AddressLookup_view/AddressLookup_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..84a197811b5c31e788561505537c4b9c354cfeae --- /dev/null +++ b/neonView/AddressLookup_view/AddressLookup_view.aod @@ -0,0 +1,58 @@ +<?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>AddressLookup_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <tableViewTemplate> + <name>DataTable</name> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>297a27f0-51a0-40d7-a2eb-28fc2b9e5730</name> + <entityField>IS_STANDARD_ICON</entityField> + </neonTableColumn> + <neonTableColumn> + <name>07e3bcf0-30aa-4745-8dd6-ed79dd2d0fa0</name> + <entityField>ADDR_TYPE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>e6d9ced9-eea3-4cdf-9751-74c8f206282f</name> + <entityField>COUNTRY</entityField> + </neonTableColumn> + <neonTableColumn> + <name>570039fc-c27a-4b06-a93e-16cc712a3d0c</name> + <entityField>ADDRESS</entityField> + </neonTableColumn> + <neonTableColumn> + <name>26ca52ce-91e7-4e76-a37e-6db28b967beb</name> + <entityField>BUILDINGNO</entityField> + </neonTableColumn> + <neonTableColumn> + <name>a54d6306-e9be-41db-9d1c-abeebe5ce77b</name> + <entityField>ZIP</entityField> + </neonTableColumn> + <neonTableColumn> + <name>6a07479c-b4d3-4946-993e-e6ce7dd825ba</name> + <entityField>CITY</entityField> + </neonTableColumn> + <neonTableColumn> + <name>820b6ffc-7e56-4982-8f39-4443b0ada876</name> + <entityField>STATE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>24f73ac8-ac90-4beb-83fe-bdaa2d0806b6</name> + <entityField>ADDRIDENTIFIER</entityField> + </neonTableColumn> + <neonTableColumn> + <name>9651a718-ab01-4c97-8da0-6e7133f26466</name> + <entityField>#PROVIDER</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView>