From db3cd089bf292cac146ce00be9e517c3d2086583 Mon Sep 17 00:00:00 2001 From: "j.goderbauer" <j.goderbauer@adito.de> Date: Tue, 6 Nov 2018 11:14:37 +0100 Subject: [PATCH] [Projekt: Entwicklung - Neon][TicketNr.: 1024138][Adressdarstellung bei Kontakten - es sollen auch die Firmenadressen gelistet werden] --- entity/Address_entity/Address_entity.aod | 32 +++++++++++++++++-- .../entityfields/addr_type/stateProcess.js | 3 ++ .../entityfields/address/stateProcess.js | 3 ++ .../addressaddition/stateProcess.js | 3 ++ .../addresslinefieldsstate_param/code.js | 8 +++++ .../addridentifier/stateProcess.js | 3 ++ .../allowmodifyingcoredata_param/code.js | 2 ++ .../entityfields/buildingno/stateProcess.js | 3 ++ .../entityfields/city/stateProcess.js | 3 ++ .../entityfields/country/stateProcess.js | 3 ++ .../entityfields/district/stateProcess.js | 3 ++ .../entityfields/region/stateProcess.js | 3 ++ .../entityfields/state/stateProcess.js | 3 ++ .../entityfields/zip/stateProcess.js | 3 ++ entity/Address_entity/grantCreateProcess.js | 5 +++ entity/Address_entity/grantDeleteProcess.js | 5 +++ entity/Pers_entity/Pers_entity.aod | 6 +++- .../allowmodifyingcoredata_param/code.js | 2 ++ neonView/PersEdit_view/PersEdit_view.aod | 5 +++ 19 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 entity/Address_entity/entityfields/addr_type/stateProcess.js create mode 100644 entity/Address_entity/entityfields/address/stateProcess.js create mode 100644 entity/Address_entity/entityfields/addressaddition/stateProcess.js create mode 100644 entity/Address_entity/entityfields/addresslinefieldsstate_param/code.js create mode 100644 entity/Address_entity/entityfields/addridentifier/stateProcess.js create mode 100644 entity/Address_entity/entityfields/allowmodifyingcoredata_param/code.js create mode 100644 entity/Address_entity/entityfields/buildingno/stateProcess.js create mode 100644 entity/Address_entity/entityfields/city/stateProcess.js create mode 100644 entity/Address_entity/entityfields/country/stateProcess.js create mode 100644 entity/Address_entity/entityfields/district/stateProcess.js create mode 100644 entity/Address_entity/entityfields/region/stateProcess.js create mode 100644 entity/Address_entity/entityfields/state/stateProcess.js create mode 100644 entity/Address_entity/entityfields/zip/stateProcess.js create mode 100644 entity/Address_entity/grantCreateProcess.js create mode 100644 entity/Address_entity/grantDeleteProcess.js create mode 100644 entity/Pers_entity/entityfields/orgaddress_dfo/children/allowmodifyingcoredata_param/code.js diff --git a/entity/Address_entity/Address_entity.aod b/entity/Address_entity/Address_entity.aod index 10f8654b0a..cbe25e11ee 100644 --- a/entity/Address_entity/Address_entity.aod +++ b/entity/Address_entity/Address_entity.aod @@ -1,10 +1,12 @@ <?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.0.4" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.0.4"> +<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.3" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.0.3"> <name>Address_entity</name> <title>Addresses</title> <majorModelMode>DISTRIBUTED</majorModelMode> <alias>Data_alias</alias> <conditionProcess>%aditoprj%/entity/Address_entity/conditionProcess.js</conditionProcess> + <grantCreateProcess>%aditoprj%/entity/Address_entity/grantCreateProcess.js</grantCreateProcess> + <grantDeleteProcess>%aditoprj%/entity/Address_entity/grantDeleteProcess.js</grantDeleteProcess> <recordContainerType>DB</recordContainerType> <caption>Addresses</caption> <entityFields> @@ -13,11 +15,13 @@ <tableName>ADDRESS</tableName> <columnName>ADDRESS</columnName> <caption>Address</caption> + <stateProcess>%aditoprj%/entity/Address_entity/entityfields/address/stateProcess.js</stateProcess> </entityField> <entityField> <name>ADDRESSADDITION</name> <tableName>ADDRESS</tableName> <columnName>ADDRESSADDITION</columnName> + <stateProcess>%aditoprj%/entity/Address_entity/entityfields/addressaddition/stateProcess.js</stateProcess> </entityField> <entityField> <name>ADDRESSID</name> @@ -28,6 +32,7 @@ <name>ADDRIDENTIFIER</name> <tableName>ADDRESS</tableName> <columnName>ADDRIDENTIFIER</columnName> + <stateProcess>%aditoprj%/entity/Address_entity/entityfields/addridentifier/stateProcess.js</stateProcess> </entityField> <entityField> <name>ADDR_TYPE</name> @@ -35,18 +40,21 @@ <columnName>ADDR_TYPE</columnName> <caption>Addresstype</caption> <possibleItemsProcess>%aditoprj%/entity/Address_entity/entityfields/addr_type/possibleItemsProcess.js</possibleItemsProcess> + <stateProcess>%aditoprj%/entity/Address_entity/entityfields/addr_type/stateProcess.js</stateProcess> </entityField> <entityField> <name>BUILDINGNO</name> <tableName>ADDRESS</tableName> <columnName>BUILDINGNO</columnName> <caption>House number</caption> + <stateProcess>%aditoprj%/entity/Address_entity/entityfields/buildingno/stateProcess.js</stateProcess> </entityField> <entityField> <name>CITY</name> <tableName>ADDRESS</tableName> <columnName>CITY</columnName> <caption>City</caption> + <stateProcess>%aditoprj%/entity/Address_entity/entityfields/city/stateProcess.js</stateProcess> </entityField> <entityField> <name>COUNTRY</name> @@ -54,6 +62,7 @@ <columnName>COUNTRY</columnName> <caption>Country</caption> <possibleItemsProcess>%aditoprj%/entity/Address_entity/entityfields/country/possibleItemsProcess.js</possibleItemsProcess> + <stateProcess>%aditoprj%/entity/Address_entity/entityfields/country/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Address_entity/entityfields/country/valueProcess.js</valueProcess> </entityField> <entityField> @@ -73,12 +82,14 @@ <tableName>ADDRESS</tableName> <columnName>DISTRICT</columnName> <caption>District</caption> + <stateProcess>%aditoprj%/entity/Address_entity/entityfields/district/stateProcess.js</stateProcess> </entityField> <entityField> <name>REGION</name> <tableName>ADDRESS</tableName> <columnName>REGION</columnName> <caption>Region</caption> + <stateProcess>%aditoprj%/entity/Address_entity/entityfields/region/stateProcess.js</stateProcess> </entityField> <entityField> <name>RELATION_ID</name> @@ -91,6 +102,7 @@ <tableName>ADDRESS</tableName> <columnName>STATE</columnName> <caption>State</caption> + <stateProcess>%aditoprj%/entity/Address_entity/entityfields/state/stateProcess.js</stateProcess> </entityField> <entityField> <name>USER_EDIT</name> @@ -109,6 +121,7 @@ <tableName>ADDRESS</tableName> <columnName>ZIP</columnName> <caption>postcode</caption> + <stateProcess>%aditoprj%/entity/Address_entity/entityfields/zip/stateProcess.js</stateProcess> </entityField> <entityIncomingField> <name>OrgAddress_dfi</name> @@ -148,7 +161,7 @@ <entityParameter> <name>StandardAddressId_param</name> <expose v="true" /> - <description>PARAMETER</description> + <description>TODO: add description</description> </entityParameter> <entityField> <name>IS_STANDARD</name> @@ -164,6 +177,21 @@ <entityIncomingField> <name>#INCOMING</name> </entityIncomingField> + <entityParameter> + <name>AddressLineFieldsState_param</name> + <code>%aditoprj%/entity/Address_entity/entityfields/addresslinefieldsstate_param/code.js</code> + <expose v="false" /> + <mandatory v="false" /> + <description>Specifies the FieldState of all AddressLine-Fields (e.g. ZIP, COUNTRY, etc.) +This is needed because you want to modify the record itself for setting the standard address but no other content.</description> + </entityParameter> + <entityParameter> + <name>AllowModifyingCoreData_param</name> + <code>%aditoprj%/entity/Address_entity/entityfields/allowmodifyingcoredata_param/code.js</code> + <expose v="true" /> + <description>Specified if it&apos;s allowed to modify the address core data. +If this is &quot;false&quot;, you cannot create od delete records or change the actual address-data, e.g. zip-code, address, buildingno, etc.</description> + </entityParameter> </entityFields> <linkInformation> <linkInformation> diff --git a/entity/Address_entity/entityfields/addr_type/stateProcess.js b/entity/Address_entity/entityfields/addr_type/stateProcess.js new file mode 100644 index 0000000000..dd11c6f8a1 --- /dev/null +++ b/entity/Address_entity/entityfields/addr_type/stateProcess.js @@ -0,0 +1,3 @@ +import("system.vars"); +import("system.result"); +result.string(vars.get("$param.AddressLineFieldsState_param")); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/address/stateProcess.js b/entity/Address_entity/entityfields/address/stateProcess.js new file mode 100644 index 0000000000..dd11c6f8a1 --- /dev/null +++ b/entity/Address_entity/entityfields/address/stateProcess.js @@ -0,0 +1,3 @@ +import("system.vars"); +import("system.result"); +result.string(vars.get("$param.AddressLineFieldsState_param")); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/addressaddition/stateProcess.js b/entity/Address_entity/entityfields/addressaddition/stateProcess.js new file mode 100644 index 0000000000..dd11c6f8a1 --- /dev/null +++ b/entity/Address_entity/entityfields/addressaddition/stateProcess.js @@ -0,0 +1,3 @@ +import("system.vars"); +import("system.result"); +result.string(vars.get("$param.AddressLineFieldsState_param")); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/addresslinefieldsstate_param/code.js b/entity/Address_entity/entityfields/addresslinefieldsstate_param/code.js new file mode 100644 index 0000000000..67ff37251a --- /dev/null +++ b/entity/Address_entity/entityfields/addresslinefieldsstate_param/code.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +var allowModify, state; + +if (vars.getString("$param.AllowModifyingCoreData_param") == "false") + state = neon.COMPONENTSTATE_READONLY; +result.string(state); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/addridentifier/stateProcess.js b/entity/Address_entity/entityfields/addridentifier/stateProcess.js new file mode 100644 index 0000000000..dd11c6f8a1 --- /dev/null +++ b/entity/Address_entity/entityfields/addridentifier/stateProcess.js @@ -0,0 +1,3 @@ +import("system.vars"); +import("system.result"); +result.string(vars.get("$param.AddressLineFieldsState_param")); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/allowmodifyingcoredata_param/code.js b/entity/Address_entity/entityfields/allowmodifyingcoredata_param/code.js new file mode 100644 index 0000000000..cda204045d --- /dev/null +++ b/entity/Address_entity/entityfields/allowmodifyingcoredata_param/code.js @@ -0,0 +1,2 @@ +import("system.result"); +result.string(true); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/buildingno/stateProcess.js b/entity/Address_entity/entityfields/buildingno/stateProcess.js new file mode 100644 index 0000000000..dd11c6f8a1 --- /dev/null +++ b/entity/Address_entity/entityfields/buildingno/stateProcess.js @@ -0,0 +1,3 @@ +import("system.vars"); +import("system.result"); +result.string(vars.get("$param.AddressLineFieldsState_param")); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/city/stateProcess.js b/entity/Address_entity/entityfields/city/stateProcess.js new file mode 100644 index 0000000000..dd11c6f8a1 --- /dev/null +++ b/entity/Address_entity/entityfields/city/stateProcess.js @@ -0,0 +1,3 @@ +import("system.vars"); +import("system.result"); +result.string(vars.get("$param.AddressLineFieldsState_param")); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/country/stateProcess.js b/entity/Address_entity/entityfields/country/stateProcess.js new file mode 100644 index 0000000000..dd11c6f8a1 --- /dev/null +++ b/entity/Address_entity/entityfields/country/stateProcess.js @@ -0,0 +1,3 @@ +import("system.vars"); +import("system.result"); +result.string(vars.get("$param.AddressLineFieldsState_param")); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/district/stateProcess.js b/entity/Address_entity/entityfields/district/stateProcess.js new file mode 100644 index 0000000000..dd11c6f8a1 --- /dev/null +++ b/entity/Address_entity/entityfields/district/stateProcess.js @@ -0,0 +1,3 @@ +import("system.vars"); +import("system.result"); +result.string(vars.get("$param.AddressLineFieldsState_param")); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/region/stateProcess.js b/entity/Address_entity/entityfields/region/stateProcess.js new file mode 100644 index 0000000000..dd11c6f8a1 --- /dev/null +++ b/entity/Address_entity/entityfields/region/stateProcess.js @@ -0,0 +1,3 @@ +import("system.vars"); +import("system.result"); +result.string(vars.get("$param.AddressLineFieldsState_param")); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/state/stateProcess.js b/entity/Address_entity/entityfields/state/stateProcess.js new file mode 100644 index 0000000000..dd11c6f8a1 --- /dev/null +++ b/entity/Address_entity/entityfields/state/stateProcess.js @@ -0,0 +1,3 @@ +import("system.vars"); +import("system.result"); +result.string(vars.get("$param.AddressLineFieldsState_param")); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/zip/stateProcess.js b/entity/Address_entity/entityfields/zip/stateProcess.js new file mode 100644 index 0000000000..dd11c6f8a1 --- /dev/null +++ b/entity/Address_entity/entityfields/zip/stateProcess.js @@ -0,0 +1,3 @@ +import("system.vars"); +import("system.result"); +result.string(vars.get("$param.AddressLineFieldsState_param")); \ No newline at end of file diff --git a/entity/Address_entity/grantCreateProcess.js b/entity/Address_entity/grantCreateProcess.js new file mode 100644 index 0000000000..71fb2b00b0 --- /dev/null +++ b/entity/Address_entity/grantCreateProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +result.string(vars.get("$param.AllowModifyingCoreData_param")); \ No newline at end of file diff --git a/entity/Address_entity/grantDeleteProcess.js b/entity/Address_entity/grantDeleteProcess.js new file mode 100644 index 0000000000..71fb2b00b0 --- /dev/null +++ b/entity/Address_entity/grantDeleteProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +result.string(vars.get("$param.AllowModifyingCoreData_param")); \ No newline at end of file diff --git a/entity/Pers_entity/Pers_entity.aod b/entity/Pers_entity/Pers_entity.aod index a564609fab..6e33f83a5c 100644 --- a/entity/Pers_entity/Pers_entity.aod +++ b/entity/Pers_entity/Pers_entity.aod @@ -1,5 +1,5 @@ <?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.0.4" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.0.4"> +<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.3" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.0.3"> <name>Pers_entity</name> <title>Contact</title> <majorModelMode>DISTRIBUTED</majorModelMode> @@ -271,6 +271,10 @@ <code>%aditoprj%/entity/Pers_entity/entityfields/orgaddress_dfo/children/relid_param/code.js</code> <triggerRecalculation v="true" /> </entityParameter> + <entityParameter> + <name>AllowModifyingCoreData_param</name> + <code>%aditoprj%/entity/Pers_entity/entityfields/orgaddress_dfo/children/allowmodifyingcoredata_param/code.js</code> + </entityParameter> </children> </entityOutgoingField> <entityOutgoingField> diff --git a/entity/Pers_entity/entityfields/orgaddress_dfo/children/allowmodifyingcoredata_param/code.js b/entity/Pers_entity/entityfields/orgaddress_dfo/children/allowmodifyingcoredata_param/code.js new file mode 100644 index 0000000000..850bb65bdd --- /dev/null +++ b/entity/Pers_entity/entityfields/orgaddress_dfo/children/allowmodifyingcoredata_param/code.js @@ -0,0 +1,2 @@ +import("system.result"); +result.string(false); \ No newline at end of file diff --git a/neonView/PersEdit_view/PersEdit_view.aod b/neonView/PersEdit_view/PersEdit_view.aod index 57bba3ca2f..20752a8b3b 100644 --- a/neonView/PersEdit_view/PersEdit_view.aod +++ b/neonView/PersEdit_view/PersEdit_view.aod @@ -59,6 +59,11 @@ <entityField>PersAddress_dfo</entityField> <view>AdressMultiEdit_view</view> </neonViewReference> + <neonViewReference> + <name>6dc468f4-661d-4d0a-83ff-70b90a3e2ddf</name> + <entityField>OrgAddress_dfo</entityField> + <view>AdressMultiEdit_view</view> + </neonViewReference> <neonViewReference> <name>fc64789f-b4c6-401e-86e3-f484451c7689</name> <entityField>PersComm_dfo</entityField> -- GitLab