diff --git a/.liquibase/Data_alias/basic/2019.2/AditoBasic/init_CommunicationMedium.xml b/.liquibase/Data_alias/basic/2019.2/AditoBasic/init_CommunicationMedium.xml index a45c7c9d215d6a8fe3bda55c8d567d60e598f99f..9615bca2323a868dbf715128f3c80a216995b4f2 100644 --- a/.liquibase/Data_alias/basic/2019.2/AditoBasic/init_CommunicationMedium.xml +++ b/.liquibase/Data_alias/basic/2019.2/AditoBasic/init_CommunicationMedium.xml @@ -103,6 +103,28 @@ <column name="AB_KEYWORD_ATTRIBUTE_ID" value="3ea2ea72-e615-4e77-befb-e664fa5ec4e1"/> <column name="CHAR_VALUE" value="LINK"/> </insert> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="4bd27b5d-d41f-49d0-877a-3367d2016505"/> + + <column name="KEYID" value="197b1875-1810-41e4-9980-e332d9938a54"/> + <column name="TITLE" value="Letter"/> + <column name="CONTAINER" value="CommunicationMedium"/> + <column name="SORTING" valueNumeric="4"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="0"/> + </insert> + <insert tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="135eef4c-4c98-4f6a-8b9d-a5dee5b60d31"/> + <column name="AB_KEYWORD_ENTRY_ID" value="4bd27b5d-d41f-49d0-877a-3367d2016505"/> + <column name="AB_KEYWORD_ATTRIBUTE_ID" value="7250ff28-1d48-41cc-bb36-8c33ace341bb"/> + <column name="CHAR_VALUE" value="LETTER"/> + </insert> + <insert tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="42e5f9eb-a1f7-4aba-81b6-507a935de624"/> + <column name="AB_KEYWORD_ENTRY_ID" value="4bd27b5d-d41f-49d0-877a-3367d2016505"/> + <column name="AB_KEYWORD_ATTRIBUTE_ID" value="3ea2ea72-e615-4e77-befb-e664fa5ec4e1"/> + <column name="CHAR_VALUE" value="LETTER"/> + </insert> <rollback> <delete tableName="AB_KEYWORD_ATTRIBUTE"> <where>AB_KEYWORD_ATTRIBUTEID = ?</where> @@ -176,6 +198,18 @@ <param value="0b12da28-e132-4a91-a9ca-beceb811fa44" /> </whereParams> </delete> + <delete tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <where>AB_KEYWORD_ATTRIBUTERELATIONID = ?</where> + <whereParams> + <param value="135eef4c-4c98-4f6a-8b9d-a5dee5b60d31" /> + </whereParams> + </delete> + <delete tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <where>AB_KEYWORD_ATTRIBUTERELATIONID = ?</where> + <whereParams> + <param value="42e5f9eb-a1f7-4aba-81b6-507a935de624" /> + </whereParams> + </delete> </rollback> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/init/data/AditoBasic/ab_keyword_entry.xml b/.liquibase/Data_alias/basic/init/data/AditoBasic/ab_keyword_entry.xml index bf57d6e5328a16d694d400033173a33f773f3c99..ae358160a4fa304605649d39a6254a5db4b43f9b 100644 --- a/.liquibase/Data_alias/basic/init/data/AditoBasic/ab_keyword_entry.xml +++ b/.liquibase/Data_alias/basic/init/data/AditoBasic/ab_keyword_entry.xml @@ -25,4 +25,5 @@ <include relativeToChangelogFile="true" file="ab_keyword_entry/init_TaskType.xml"/> <include relativeToChangelogFile="true" file="ab_keyword_entry/init_AttributeType.xml"/> <include relativeToChangelogFile="true" file="ab_keyword_entry/init_SalesprojectProbability.xml"/> + <include relativeToChangelogFile="true" file="ab_keyword_entry/init_CommRestriction.xml"/> </databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/init/data/AditoBasic/ab_keyword_entry/init_CommRestriction.xml b/.liquibase/Data_alias/basic/init/data/AditoBasic/ab_keyword_entry/init_CommRestriction.xml new file mode 100644 index 0000000000000000000000000000000000000000..d75f7dddd43b584ddf078cbd23208c75b258d0ea --- /dev/null +++ b/.liquibase/Data_alias/basic/init/data/AditoBasic/ab_keyword_entry/init_CommRestriction.xml @@ -0,0 +1,76 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="s.leierseder" id="b5c2a43b-ad6c-4b28-b991-3f4c767ec561"> + + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="e4598fe0-2e01-4a82-9429-c8584cfe36fc"/> + + <column name="KEYID" value="c6c916c0-0656-4c4d-b238-3e745a515725"/> + <column name="TITLE" value="No calls"/> + <column name="CONTAINER" value="CommRestriction"/> + <column name="SORTING" valueNumeric="0"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="0"/> + </insert> + + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="8d79901e-b729-41db-8d6f-848231ac638f"/> + + <column name="KEYID" value="10332e37-e459-4044-9949-2a45dcfa4e87"/> + <column name="TITLE" value="No serial mails"/> + <column name="CONTAINER" value="CommRestriction"/> + <column name="SORTING" valueNumeric="1"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="0"/> + </insert> + + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="c8c6ca12-852b-4e71-b27f-ae7234fc2808"/> + + <column name="KEYID" value="5c45b90f-133d-40cd-805c-508ad84a63a0"/> + <column name="TITLE" value="No internet advertising"/> + <column name="CONTAINER" value="CommRestriction"/> + <column name="SORTING" valueNumeric="2"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="0"/> + </insert> + + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="40a320b3-d1c3-4427-aa2f-ea1615266493"/> + + <column name="KEYID" value="04732d01-fbf5-40cb-a176-a9ad5595fc9d"/> + <column name="TITLE" value="No serial letter"/> + <column name="CONTAINER" value="CommRestriction"/> + <column name="SORTING" valueNumeric="3"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="0"/> + </insert> + + <rollback> + <delete tableName="AB_KEYWORD_ENTRY"> + <where>AB_KEYWORD_ENTRYID = ?</where> + <whereParams> + <param value="e4598fe0-2e01-4a82-9429-c8584cfe36fc" /> + </whereParams> + </delete> + <delete tableName="AB_KEYWORD_ENTRY"> + <where>AB_KEYWORD_ENTRYID = ?</where> + <whereParams> + <param value="8d79901e-b729-41db-8d6f-848231ac638f" /> + </whereParams> + </delete> + <delete tableName="AB_KEYWORD_ENTRY"> + <where>AB_KEYWORD_ENTRYID = ?</where> + <whereParams> + <param value="c8c6ca12-852b-4e71-b27f-ae7234fc2808" /> + </whereParams> + </delete> + <delete tableName="AB_KEYWORD_ENTRY"> + <where>AB_KEYWORD_ENTRYID = ?</where> + <whereParams> + <param value="40a320b3-d1c3-4427-aa2f-ea1615266493" /> + </whereParams> + </delete> + </rollback> + </changeSet> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/init/init.xml b/.liquibase/Data_alias/basic/init/init.xml index c4653839c7b975a5f2951845804b0ef995888eeb..e876310e9ee3b12d48593794ad3b6a32af0856c1 100644 --- a/.liquibase/Data_alias/basic/init/init.xml +++ b/.liquibase/Data_alias/basic/init/init.xml @@ -36,6 +36,7 @@ <include relativeToChangelogFile="true" file="struct/create_salesorderitem.xml"/> <include relativeToChangelogFile="true" file="struct/create_timetracking.xml"/> <include relativeToChangelogFile="true" file="struct/create_task.xml"/> + <include relativeToChangelogFile="true" file="struct/create_commrestriction.xml"/> <!--reference files for keywords:--> <include relativeToChangelogFile="true" file="data/AditoBasic/ab_keyword_entry.xml"/> diff --git a/.liquibase/Data_alias/basic/init/struct/create_commrestriction.xml b/.liquibase/Data_alias/basic/init/struct/create_commrestriction.xml new file mode 100644 index 0000000000000000000000000000000000000000..11015875e8780c908331e88b49f243b2d8d84095 --- /dev/null +++ b/.liquibase/Data_alias/basic/init/struct/create_commrestriction.xml @@ -0,0 +1,15 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="s.leierseder" id="b4c37abb-8d02-4fcf-a585-64e61864ece6"> + <createTable tableName="COMMRESTRICTION"> + <column name="COMMRESTRICTIONID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_COMMRESTRICTION_COMMRESTRICTIONID"/> + </column> + <column name="MEDIUM" type="CHAR(36)"/> + <column name="REASON" type="NVARCHAR(250)"/> + <column name="CONTACT_ID" type="CHAR(36)"/> + <column name="STARTDATE" type="DATETIME"/> + <column name="EMPLOYEE_INVOLVED" type="NVARCHAR(250)"/> + </createTable> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index dbca5419dce6f23d0b8f99864a18371cc3d81c18..ef1d1a37ac3e3d7ad7387795da36026e816496c5 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -9604,6 +9604,110 @@ </entityFieldDb> </entityFields> </entityDb> + <entityDb> + <name>COMMRESTRICTION</name> + <dbName></dbName> + <idColumn>COMMRESTRICTIONID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <documentation></documentation> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>COMMRESTRICTIONID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>MEDIUM</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>REASON</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="250" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>STARTDATE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>EMPLOYEE_INVOLVED</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="250" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>CONTACT_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> </entities> </entityGroup> </aliasDefDb> diff --git a/entity/CommRestriction_Entity/CommRestriction_Entity.aod b/entity/CommRestriction_Entity/CommRestriction_Entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..cb12498ce61c65164d8fb668e356eca2388d712e --- /dev/null +++ b/entity/CommRestriction_Entity/CommRestriction_Entity.aod @@ -0,0 +1,136 @@ +<?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.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6"> + <name>CommRestriction_Entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>CONTACT_ID</name> + <title>Person</title> + <valueProcess>%aditoprj%/entity/CommRestriction_Entity/entityfields/contact_id/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>MEDIUM</name> + <title>Medium</title> + <consumer>CommRestrictionMedium</consumer> + <displayValueProcess>%aditoprj%/entity/CommRestriction_Entity/entityfields/medium/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>STARTDATE</name> + <title>Valid from</title> + <contentType>DATE</contentType> + <resolution>DAY</resolution> + </entityField> + <entityField> + <name>EMPLOYEE_INVOLVED</name> + <title>Employee responsible</title> + <consumer>EmployeeInvolved</consumer> + </entityField> + <entityField> + <name>REASON</name> + <title>Reason</title> + <contentType>LONG_TEXT</contentType> + </entityField> + <entityField> + <name>COMMRESTRICTIONID</name> + <valueProcess>%aditoprj%/entity/CommRestriction_Entity/entityfields/commrestrictionid/valueProcess.js</valueProcess> + </entityField> + <entityConsumer> + <name>EmployeeInvolved</name> + <dependency> + <name>dependency</name> + <entityName>Employee_entity</entityName> + <fieldName>Employees</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>CommRestrictionMedium</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/CommRestriction_Entity/entityfields/commrestrictionmedium/children/containername_param/valueProcess.js</valueProcess> + <expose v="false" /> + </entityParameter> + </children> + </entityConsumer> + <entityProvider> + <name>PersonsCommRestriction</name> + <dependencies> + <entityDependency> + <name>b50e33cd-e20f-4bdf-b0ee-2ecdab921ffd</name> + <entityName>Person_entity</entityName> + <fieldName>CommRestrictions</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + <children> + <entityParameter> + <name>PersonId_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="true" /> + </entityParameter> + </children> + </entityProvider> + <entityParameter> + <name>PersonId_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="true" /> + </entityParameter> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <conditionProcess>%aditoprj%/entity/CommRestriction_Entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <linkInformation> + <linkInformation> + <name>d02c4bb0-c0aa-46fa-bf1b-4bcc44aeb012</name> + <tableName>COMMRESTRICTION</tableName> + <primaryKey>COMMRESTRICTIONID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>COMMRESTRICTIONID.value</name> + <recordfield>COMMRESTRICTION.COMMRESTRICTIONID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CONTACT_ID.value</name> + <recordfield>COMMRESTRICTION.CONTACT_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>EMPLOYEE_INVOLVED.value</name> + <recordfield>COMMRESTRICTION.EMPLOYEE_INVOLVED</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>MEDIUM.value</name> + <recordfield>COMMRESTRICTION.MEDIUM</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>REASON.value</name> + <recordfield>COMMRESTRICTION.REASON</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>STARTDATE.value</name> + <recordfield>COMMRESTRICTION.STARTDATE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>EMPLOYEE_INVOLVED.displayValue</name> + <expression>%aditoprj%/entity/CommRestriction_Entity/recordcontainers/db/recordfieldmappings/employee_involved.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/CommRestriction_Entity/entityfields/commrestrictionid/valueProcess.js b/entity/CommRestriction_Entity/entityfields/commrestrictionid/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a2378ee42b3638db13001b2890b78669e5c65d9e --- /dev/null +++ b/entity/CommRestriction_Entity/entityfields/commrestrictionid/valueProcess.js @@ -0,0 +1,7 @@ +import("system.util"); +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) + result.string(util.getNewUUID()); \ No newline at end of file diff --git a/entity/CommRestriction_Entity/entityfields/commrestrictionmedium/children/containername_param/valueProcess.js b/entity/CommRestriction_Entity/entityfields/commrestrictionmedium/children/containername_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..17d4b5b33ba8ca7a4d976031b2173270ff68ed3d --- /dev/null +++ b/entity/CommRestriction_Entity/entityfields/commrestrictionmedium/children/containername_param/valueProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Keyword_lib"); +import("KeywordRegistry_basic"); + +result.string($KeywordRegistry.commRestriction()); \ No newline at end of file diff --git a/entity/CommRestriction_Entity/entityfields/contact_id/valueProcess.js b/entity/CommRestriction_Entity/entityfields/contact_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..f9c4af9c89f397d57058f69d5bd171c82b858d81 --- /dev/null +++ b/entity/CommRestriction_Entity/entityfields/contact_id/valueProcess.js @@ -0,0 +1,10 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + if(vars.exists("$param.PersonId_param") && vars.get("$param.PersonId_param") != null) { + result.string(vars.getString("$param.PersonId_param")); + } +} \ No newline at end of file diff --git a/entity/CommRestriction_Entity/entityfields/medium/displayValueProcess.js b/entity/CommRestriction_Entity/entityfields/medium/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..03e760651ba44e8730f5b93b83277360580173da --- /dev/null +++ b/entity/CommRestriction_Entity/entityfields/medium/displayValueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.vars"); +import("Keyword_lib"); +import("KeywordRegistry_basic"); + +result.string(KeywordUtils.getViewValue($KeywordRegistry.commRestriction(), vars.get("$field.MEDIUM"))); \ No newline at end of file diff --git a/entity/CommRestriction_Entity/recordcontainers/db/conditionProcess.js b/entity/CommRestriction_Entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..eeed9a9c6d4224310d91f4dbf7c1920a2a0c8c1a --- /dev/null +++ b/entity/CommRestriction_Entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,9 @@ +import("system.db"); +import("system.result"); +import("Sql_lib"); + +var cond = new SqlCondition(); +cond.andPrepareVars("COMMRESTRICTION.CONTACT_ID", "$param.PersonId_param"); + +//TODO: use a preparedCondition when available #1030812 #1034026 +result.string(db.translateCondition(cond.build("1 = 1"))); \ No newline at end of file diff --git a/entity/CommRestriction_Entity/recordcontainers/db/recordfieldmappings/employee_involved.displayvalue/expression.js b/entity/CommRestriction_Entity/recordcontainers/db/recordfieldmappings/employee_involved.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..06ef06d816c1f533fd458d3ff5786d2aec2dccca --- /dev/null +++ b/entity/CommRestriction_Entity/recordcontainers/db/recordfieldmappings/employee_involved.displayvalue/expression.js @@ -0,0 +1,6 @@ +import("system.result"); +import("Person_lib"); + +//TODO: try to find a better solution for this -> #TITLE-mechanic when available +var subSql = PersUtils.getResolvingDisplaySubSql("COMMRESTRICTION.EMPLOYEE_INVOLVED"); +result.string(subSql); \ No newline at end of file diff --git a/entity/Employee_entity/Employee_entity.aod b/entity/Employee_entity/Employee_entity.aod index bc69db9b8adad40442595fdb5f9ec2b5ee43a92d..825d28e44750a8740676e6a94bb4c74526eead5c 100644 --- a/entity/Employee_entity/Employee_entity.aod +++ b/entity/Employee_entity/Employee_entity.aod @@ -250,6 +250,12 @@ <fieldName>ContactRequestors</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>6a502317-8b81-4bea-803f-003f990513df</name> + <entityName>CommRestriction_Entity</entityName> + <fieldName>EmployeeInvolved</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> diff --git a/entity/KeywordEntry_entity/KeywordEntry_entity.aod b/entity/KeywordEntry_entity/KeywordEntry_entity.aod index aa26551f378a66f0f8627850828462d9b7c58885..b3ee81517bac74570d0a0bc375f28e971efdb0e6 100644 --- a/entity/KeywordEntry_entity/KeywordEntry_entity.aod +++ b/entity/KeywordEntry_entity/KeywordEntry_entity.aod @@ -4,6 +4,7 @@ <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/KeywordEntry_entity/documentation.adoc</documentation> <title>Keyword</title> + <siblings /> <contentTitleProcess>%aditoprj%/entity/KeywordEntry_entity/contentTitleProcess.js</contentTitleProcess> <onValidation>%aditoprj%/entity/KeywordEntry_entity/onValidation.js</onValidation> <iconId>VAADIN:KEY</iconId> @@ -20,10 +21,10 @@ <name>CONTAINER</name> <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/documentation.adoc</documentation> <title>Container</title> + <groupable v="true" /> <mandatory v="true" /> <dropDownProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/dropDownProcess.js</dropDownProcess> <textInputAllowed v="true" /> - <groupable v="true" /> <state>READONLY</state> <stateProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/stateProcess.js</stateProcess> </entityField> @@ -397,6 +398,12 @@ <fieldName>KeywordClassificationTypes</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>995646a8-ccec-4962-8c81-05a54903c433</name> + <entityName>CommRestriction_Entity</entityName> + <fieldName>CommRestrictionMedium</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index 9e4e5dea7acccd0c6d1649a504f13c63eea3a126..1fca9efd6aa91ffc0b7b119696b9decc34c69a69 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -857,6 +857,23 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <iconId>VAADIN:CALENDAR</iconId> <tooltip>New Appointment</tooltip> </entityActionField> + <entityConsumer> + <name>CommRestrictions</name> + <dependency> + <name>dependency</name> + <entityName>CommRestriction_Entity</entityName> + <fieldName>PersonsCommRestriction</fieldName> + </dependency> + <children> + <entityParameter> + <name>PersonId_param</name> + <valueProcess>%aditoprj%/entity/Person_entity/entityfields/commrestrictions/children/personid_param/valueProcess.js</valueProcess> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="true" /> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Person_entity/entityfields/commrestrictions/children/personid_param/valueProcess.js b/entity/Person_entity/entityfields/commrestrictions/children/personid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e3241c7d2dd258a8a9cf0863cf1c6790b6278ee5 --- /dev/null +++ b/entity/Person_entity/entityfields/commrestrictions/children/personid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.vars"); + +result.string(vars.getString("$field.PERSONID")); \ No newline at end of file diff --git a/entity/Task_entity/Task_entity.aod b/entity/Task_entity/Task_entity.aod index 9fc98a92cb538970b95f286f69fa5bb7c08d7e7b..40ca575e6d1de0d1592b8efd059685a52360fcf5 100644 --- a/entity/Task_entity/Task_entity.aod +++ b/entity/Task_entity/Task_entity.aod @@ -4,7 +4,7 @@ <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/Task_entity/documentation.adoc</documentation> <title>Task</title> - <contentTitleProcess>%aditoprj%/entity/Task_entity/contentTitleProcess.js</contentTitleProcess> + <contentTitleProcess>%aditoprj%/entity/Task_entity/contentTitleProcess.js</contentTitleProcess> <afterUiInit>%aditoprj%/entity/Task_entity/afterUiInit.js</afterUiInit> <onValidation>%aditoprj%/entity/Task_entity/onValidation.js</onValidation> <iconId>VAADIN:TASKS</iconId> @@ -91,7 +91,7 @@ <consumer>KeywordTypes</consumer> <groupable v="true" /> <searchable v="true" /> - <state>READONLY</state> + <state>READONLY</state> <valueProcess>%aditoprj%/entity/Task_entity/entityfields/type/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/Task_entity/entityfields/type/displayValueProcess.js</displayValueProcess> </entityField> @@ -121,6 +121,12 @@ <entityName>Employee_entity</entityName> <fieldName>Employees</fieldName> </dependency> + <children> + <entityParameter> + <name>OnlyActives_param</name> + <valueProcess>%aditoprj%/entity/Task_entity/entityfields/contacteditors/children/onlyactives_param/valueProcess.js</valueProcess> + </entityParameter> + </children> </entityConsumer> <entityConsumer> <name>ContactRequestors</name> diff --git a/entity/Task_entity/entityfields/contacteditors/children/onlyactives_param/valueProcess.js b/entity/Task_entity/entityfields/contacteditors/children/onlyactives_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index d067bf8c6d720cbbd8c699d37172e73dbb26fb3c..05262fcd5c0d5519d6ef4c0de8c1a15d5f73c539 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -18,6 +18,10 @@ <key>Project management</key> <value>Projektmanagement</value> </entry> + <entry> + <key>Restrictions</key> + <value>Einschränkungen</value> + </entry> <entry> <key>Notifications</key> <value>Benachrichtigungen</value> @@ -4397,6 +4401,10 @@ <entry> <key>Delete</key> </entry> + <entry> + <key>Employee responsible</key> + <value>Verantwortlicher Mitarbeiter</value> + </entry> <entry> <key>Street</key> </entry> diff --git a/neonContext/CommRestriction/CommRestriction.aod b/neonContext/CommRestriction/CommRestriction.aod new file mode 100644 index 0000000000000000000000000000000000000000..9567a9cae1f51132405fb4557e1a710a0bdae191 --- /dev/null +++ b/neonContext/CommRestriction/CommRestriction.aod @@ -0,0 +1,24 @@ +<?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.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0"> + <name>CommRestriction</name> + <title>Communication Restriction</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterview>CommRestrictionFilter_view</filterview> + <editview>CommRestrictionSmallEdit_view</editview> + <preview>CommRestrictionPreview_view</preview> + <entity>CommRestriction_Entity</entity> + <references> + <neonViewReference> + <name>7979571d-6800-4379-a469-52c12cf5eb24</name> + <view>CommRestrictionFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>395937e6-b085-4e54-855b-0ec31cf4cbb6</name> + <view>CommRestrictionSmallEdit_view</view> + </neonViewReference> + <neonViewReference> + <name>c0ffb2e0-0190-47ee-aa0a-e774fe5400fb</name> + <view>CommRestrictionPreview_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonView/CommRestrictionFilter_view/CommRestrictionFilter_view.aod b/neonView/CommRestrictionFilter_view/CommRestrictionFilter_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..ea726694e95ef2bfe034638df936721628ac8302 --- /dev/null +++ b/neonView/CommRestrictionFilter_view/CommRestrictionFilter_view.aod @@ -0,0 +1,36 @@ +<?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>CommRestrictionFilter_view</name> + <title>Restrictions</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <tableViewTemplate> + <name>CommRestrictions</name> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>f3d79ce8-2518-4515-9d9d-6642b763a045</name> + <entityField>MEDIUM</entityField> + </neonTableColumn> + <neonTableColumn> + <name>b34ef3a6-ae5d-4610-bc29-0f6e1b6fe9c8</name> + <entityField>STARTDATE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>ddcf9043-75aa-4685-965e-7b0a9ab818b3</name> + <entityField>EMPLOYEE_INVOLVED</entityField> + </neonTableColumn> + <neonTableColumn> + <name>307fb85b-8626-4754-b6d1-a2f713856361</name> + <entityField>REASON</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView> diff --git a/neonView/CommRestrictionPreview_view/CommRestrictionPreview_view.aod b/neonView/CommRestrictionPreview_view/CommRestrictionPreview_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..7a4201ecd65c04b41af16616a2d235f0ea5327c7 --- /dev/null +++ b/neonView/CommRestrictionPreview_view/CommRestrictionPreview_view.aod @@ -0,0 +1,35 @@ +<?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>CommRestrictionPreview_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <cardViewTemplate> + <name>Header</name> + <titleField>MEDIUM</titleField> + <subtitleField></subtitleField> + <descriptionField>EMPLOYEE_INVOLVED</descriptionField> + <entityField>#ENTITY</entityField> + </cardViewTemplate> + <genericViewTemplate> + <name>Info</name> + <showDrawer v="false" /> + <drawerCaption></drawerCaption> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>d55f5122-0987-4c47-a586-9fa2fe6eb0ee</name> + <entityField>STARTDATE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>bd1adc73-5e86-4fed-aa4a-2436405cba09</name> + <entityField>REASON</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/neonView/CommRestrictionSmallEdit_view/CommRestrictionSmallEdit_view.aod b/neonView/CommRestrictionSmallEdit_view/CommRestrictionSmallEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..ec3f3f60e2f71b6a728e92aaafb45523baf8c34e --- /dev/null +++ b/neonView/CommRestrictionSmallEdit_view/CommRestrictionSmallEdit_view.aod @@ -0,0 +1,36 @@ +<?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>CommRestrictionSmallEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <isSmall v="true" /> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>Generic</name> + <editMode v="true" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>fd6609a0-1437-4c2a-b3a5-69affe1c35c7</name> + <entityField>MEDIUM</entityField> + </entityFieldLink> + <entityFieldLink> + <name>c1fbcb41-30c9-4221-b187-7abbb7bb9a88</name> + <entityField>STARTDATE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>c0ad0471-85a8-40fa-82ce-61ea43678291</name> + <entityField>EMPLOYEE_INVOLVED</entityField> + </entityFieldLink> + <entityFieldLink> + <name>c537286d-1ed5-44cf-99cd-d513f154169d</name> + <entityField>REASON</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/neonView/PersonMain_view/PersonMain_view.aod b/neonView/PersonMain_view/PersonMain_view.aod index 04377a5d65098f9fc8b2cc7898adc34fc860b6eb..d7b85d058b7e60ea08089e418d8fedc3743ae0b5 100644 --- a/neonView/PersonMain_view/PersonMain_view.aod +++ b/neonView/PersonMain_view/PersonMain_view.aod @@ -49,6 +49,11 @@ <entityField>OtherContacts</entityField> <view>ContactList_view</view> </neonViewReference> + <neonViewReference> + <name>265efe97-d759-476c-9546-0f339d56474d</name> + <entityField>CommRestrictions</entityField> + <view>CommRestrictionFilter_view</view> + </neonViewReference> <neonViewReference> <name>5754fc3a-c81c-42ba-90ea-2859b10bb391</name> <entityField>LogHistoryConsumer</entityField> diff --git a/process/KeywordRegistry_basic/process.js b/process/KeywordRegistry_basic/process.js index f97b3dd58f8ae7b669e05217b93612467b14057f..ed76023b28a55919a8244d798664d17eda21ca7c 100644 --- a/process/KeywordRegistry_basic/process.js +++ b/process/KeywordRegistry_basic/process.js @@ -104,4 +104,6 @@ $KeywordRegistry.personGender$other = function(){return "o";}; $KeywordRegistry.permissionCondType = function(){return "PermissionCondType";}; $KeywordRegistry.permissionAccessType = function(){return "PermissionAccessType";}; -$KeywordRegistry.textPlaceholder = function(){return "textPlaceholder";}; \ No newline at end of file +$KeywordRegistry.textPlaceholder = function(){return "textPlaceholder";}; + +$KeywordRegistry.commRestriction = function(){return "CommRestriction";}; \ No newline at end of file