diff --git a/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod b/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod index deb48c07a60ab8c1040e1b8a9a99c82bd7ab82bd..560c1dc549107b70962d2f0b96b398f4f23211a2 100644 --- a/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod +++ b/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod @@ -197,7 +197,7 @@ <dependency> <name>dependency</name> <entityName>CommRestriction_Entity</entityName> - <fieldName>PersonsCommRestriction</fieldName> + <fieldName>CommRestrictions</fieldName> </dependency> </entityConsumer> <entityConsumer> diff --git a/entity/CommRestriction_Entity/CommRestriction_Entity.aod b/entity/CommRestriction_Entity/CommRestriction_Entity.aod index 1206a0b74a99ac029248d129684624d97f00820a..eb0611da15dc1f079e8ed713304b1f164fc31e3d 100644 --- a/entity/CommRestriction_Entity/CommRestriction_Entity.aod +++ b/entity/CommRestriction_Entity/CommRestriction_Entity.aod @@ -69,7 +69,7 @@ </children> </entityConsumer> <entityProvider> - <name>PersonsCommRestriction</name> + <name>CommRestrictions</name> <dependencies> <entityDependency> <name>b50e33cd-e20f-4bdf-b0ee-2ecdab921ffd</name> @@ -77,6 +77,12 @@ <fieldName>CommRestrictions</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>1108f15c-75e3-49a8-b1cd-03259bfbb8a0</name> + <entityName>Organisation_entity</entityName> + <fieldName>CommRestrictions</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> </entityProvider> <entityParameter> diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index 49fe08a89b2c9df270e437a400d22dd61e76508d..045271f346c216e5096191d528780926216cb8e9 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -1070,6 +1070,20 @@ </entityParameter> </children> </entityConsumer> + <entityConsumer> + <name>CommRestrictions</name> + <dependency> + <name>dependency</name> + <entityName>CommRestriction_Entity</entityName> + <fieldName>CommRestrictions</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContactId_param</name> + <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/commrestrictions/children/contactid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Organisation_entity/entityfields/commrestrictions/children/contactid_param/valueProcess.js b/entity/Organisation_entity/entityfields/commrestrictions/children/contactid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..08da3b121c951607015025c5ed6ea3ea8de1a4cb --- /dev/null +++ b/entity/Organisation_entity/entityfields/commrestrictions/children/contactid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.vars"); + +result.string(vars.getString("$field.CONTACTID")); \ No newline at end of file diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index 9ccc4389ccb323a9c1a87cffdb1705c3d7d93dd5..80ba6e1aea038d3722f04dcfce8d18979f2de7f1 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -801,7 +801,7 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <dependency> <name>dependency</name> <entityName>CommRestriction_Entity</entityName> - <fieldName>PersonsCommRestriction</fieldName> + <fieldName>CommRestrictions</fieldName> </dependency> <children> <entityParameter> diff --git a/entity/Person_entity/recordcontainers/db/onDBInsert.js b/entity/Person_entity/recordcontainers/db/onDBInsert.js index ce609c6ee035ef5dea082e84402c305f31e68ffd..134d6e77fb05d74fd0c9b383bf4ce3023da7a739 100644 --- a/entity/Person_entity/recordcontainers/db/onDBInsert.js +++ b/entity/Person_entity/recordcontainers/db/onDBInsert.js @@ -1,12 +1,8 @@ -import("system.translate"); -import("Employee_lib"); import("system.util"); -import("system.logging"); -import("system.vars"); +import("Sql_lib"); +import("system.db"); import("DataPrivacy_lib"); -import("DuplicateScanner_lib"); -import("system.notification"); -import("system.project"); +import("system.vars"); //let targetEntity = "Person_entity"; let contactId = vars.get("$local.uid"); diff --git a/neonContext/Organisation/Organisation.aod b/neonContext/Organisation/Organisation.aod index bddc5f4e9dc436f799d3c90e933597a84c4d3a4c..59ce4ecbe8b6e1aa3e2e59b969ee09530c977c90 100644 --- a/neonContext/Organisation/Organisation.aod +++ b/neonContext/Organisation/Organisation.aod @@ -47,5 +47,9 @@ <name>51a18051-fcb8-4d90-9075-802fdce12f9c</name> <view>OrganisationTaskAppointment_view</view> </neonViewReference> + <neonViewReference> + <name>c72caf13-37cf-4af9-811d-832f43801369</name> + <view>OrganisationAttributeRestriction_view</view> + </neonViewReference> </references> </neonContext> diff --git a/neonView/OrganisationAttributeRestriction_view/OrganisationAttributeRestriction_view.aod b/neonView/OrganisationAttributeRestriction_view/OrganisationAttributeRestriction_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..d53d86c059ce89773f31a771cc4db3a4a6e21189 --- /dev/null +++ b/neonView/OrganisationAttributeRestriction_view/OrganisationAttributeRestriction_view.aod @@ -0,0 +1,23 @@ +<?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.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.2"> + <name>OrganisationAttributeRestriction_view</name> + <title>Attributes</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <neonViewReference> + <name>8226fe7b-877b-4093-9fc4-dbe7d7f8a8ea</name> + <entityField>AttributeTree</entityField> + <view>AttributeRelationTree_view</view> + </neonViewReference> + <neonViewReference> + <name>2c260627-f087-4240-8a6d-e7aa25bbe812</name> + <entityField>CommRestrictions</entityField> + <view>CommRestrictionDrawer_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/OrganisationMain_view/OrganisationMain_view.aod b/neonView/OrganisationMain_view/OrganisationMain_view.aod index b7faebeb1416f5b51f161b590ba7cf6814d84a67..ecf0ab98c9be2cb2b608bb6c969772074e35a916 100644 --- a/neonView/OrganisationMain_view/OrganisationMain_view.aod +++ b/neonView/OrganisationMain_view/OrganisationMain_view.aod @@ -46,9 +46,9 @@ <view>OrganisationTaskAppointment_view</view> </neonViewReference> <neonViewReference> - <name>ba50e069-06da-440e-b04a-5a686fcf5303</name> - <entityField>AttributeTree</entityField> - <view>AttributeRelationTree_view</view> + <name>486b4999-ac17-4560-9ce0-0f20a0028d02</name> + <entityField>#ENTITY</entityField> + <view>OrganisationAttributeRestriction_view</view> </neonViewReference> <neonViewReference> <name>eba90ed2-5e55-4cdb-9e0b-5a09feeb7536</name>