diff --git a/.liquibase/Data_alias/basic/2020.2.0/Districts/alter_districtContact_1066036.xml b/.liquibase/Data_alias/basic/2020.2.0/Districts/alter_districtContact_1066036.xml new file mode 100644 index 0000000000000000000000000000000000000000..b389c64e723131b3531d7d5a503f2bd102662e10 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.0/Districts/alter_districtContact_1066036.xml @@ -0,0 +1,13 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="Pierre Suchacek" id="9aace074-1b61-4577-ad27-bee6a498134c"> + <addColumn tableName="DISTRICTCONTACT"> + <column name="USER_NEW" type="NVARCHAR(50)" /> + <column name="USER_EDIT" type="NVARCHAR(50)" /> + <column name="DATE_NEW" type="DATETIME" /> + <column name="DATE_EDIT" type="DATETIME" /> + </addColumn> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2020.2.0/Districts/changelog.xml b/.liquibase/Data_alias/basic/2020.2.0/Districts/changelog.xml index d8ccdd4c8a999c5f983ed3ae28a3803bfaf761e8..76bc7b7962c4e58f58146a1976b1000850a8767a 100644 --- a/.liquibase/Data_alias/basic/2020.2.0/Districts/changelog.xml +++ b/.liquibase/Data_alias/basic/2020.2.0/Districts/changelog.xml @@ -11,4 +11,5 @@ <include relativeToChangelogFile="true" file="insert_KeywordsAdviserRoles.xml"/> <include relativeToChangelogFile="true" file="update_ContactResponsible_consistent.xml"/> <include relativeToChangelogFile="true" file="alter_district_1066187.xml"/> + <include relativeToChangelogFile="true" file="alter_districtContact_1066036.xml"/> </databaseChangeLog> diff --git a/.liquibase/Data_alias/changelog.xml b/.liquibase/Data_alias/changelog.xml index c3a1d3c5759b118fd0d3d4e30e38f246a3f28166..7eea5966581a44cf29ffb6bdf99ab97e95eb3e10 100644 --- a/.liquibase/Data_alias/changelog.xml +++ b/.liquibase/Data_alias/changelog.xml @@ -19,4 +19,4 @@ <!--enable this only when you definetly want to overwrite the existing data with demo records:--> <!--<include relativeToChangelogFile="true" file="basic/_demoData/changelog.xml" context="example"/>--> -</databaseChangeLog> \ No newline at end of file +</databaseChangeLog> diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index de3b537eb9c335c04569c56e16867be3faa4b694..aa6f6d7503e128af347e2a003aacb8bbf9f1a904 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -15948,6 +15948,62 @@ <title></title> <description></description> </entityFieldDb> + <entityFieldDb> + <name>DATE_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="19" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="19" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> </entityFields> </entityDb> </entities> diff --git a/entity/DistrictContact_entity/DistrictContact_entity.aod b/entity/DistrictContact_entity/DistrictContact_entity.aod index 5f6ebbb436c9a1b4becaeb67e961d188bc401679..8286a522c2d89748e9ecf2d3b62a6af4abf37a10 100644 --- a/entity/DistrictContact_entity/DistrictContact_entity.aod +++ b/entity/DistrictContact_entity/DistrictContact_entity.aod @@ -11,14 +11,6 @@ <entityFields> <entityProvider> <name>#PROVIDER</name> - <dependencies> - <entityDependency> - <name>12f47cac-d968-4bac-9daa-c254e43bb7b4</name> - <entityName>Organisation_entity</entityName> - <fieldName>DistrictContacts</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> </entityProvider> <entityProvider> <name>#PROVIDER_AGGREGATES</name> @@ -26,18 +18,27 @@ </entityProvider> <entityField> <name>CONTACT_ID</name> - <title>Contact</title> + <title>Company</title> + <consumer>Organisations</consumer> <groupable v="true" /> + <linkedContext>Person</linkedContext> + <displayValueProcess>%aditoprj%/entity/DistrictContact_entity/entityfields/contact_id/displayValueProcess.js</displayValueProcess> </entityField> <entityField> <name>DISTRICT_ID</name> - <title>District</title> + <title>{$DISTRICT}</title> + <consumer>Districts</consumer> <groupable v="true" /> + <linkedContext>District</linkedContext> </entityField> <entityField> <name>ADVISER_CONTACT_ID</name> <title>Adviser contact</title> + <consumer>Advisers</consumer> <groupable v="true" /> + <linkedContext>Person</linkedContext> + <mandatory v="true" /> + <displayValueProcess>%aditoprj%/entity/DistrictContact_entity/entityfields/adviser_contact_id/displayValueProcess.js</displayValueProcess> </entityField> <entityField> <name>ADVISER_ROLE</name> @@ -52,7 +53,6 @@ <consumer>KeywordContactStates</consumer> <groupable v="true" /> <valueProcess>%aditoprj%/entity/DistrictContact_entity/entityfields/status/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/DistrictContact_entity/entityfields/status/displayValueProcess.js</displayValueProcess> </entityField> <entityField> <name>VALID_FROM</name> @@ -92,6 +92,10 @@ <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/DistrictContact_entity/entityfields/keywordcontactstates/children/containername_param/valueProcess.js</valueProcess> </entityParameter> + <entityParameter> + <name>ExcludedKeyIdsSubquery_param</name> + <valueProcess>%aditoprj%/entity/DistrictContact_entity/entityfields/keywordcontactstates/children/excludedkeyidssubquery_param/valueProcess.js</valueProcess> + </entityParameter> </children> </entityConsumer> <entityConsumer> @@ -122,39 +126,82 @@ </entityParameter> </children> </entityConsumer> + <entityConsumer> + <name>Organisations</name> + <dependency> + <name>dependency</name> + <entityName>Organisation_entity</entityName> + <fieldName>Organisations</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>Advisers</name> + <dependency> + <name>dependency</name> + <entityName>DistrictResponsible_entity</entityName> + <fieldName>DistrictResponsibleAdvisers</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>Districts</name> + <dependency> + <name>dependency</name> + <entityName>District_entity</entityName> + <fieldName>DistrictContacts</fieldName> + </dependency> + </entityConsumer> + <entityProvider> + <name>DistrictContacts</name> + <dependencies> + <entityDependency> + <name>6a15b92f-e0b6-459d-a106-615dcfac3dbd</name> + <entityName>District_entity</entityName> + <fieldName>DistrictContactUIDs</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>e33ae6f8-0a21-406c-950a-ab60f27026b3</name> + <entityName>Organisation_entity</entityName> + <fieldName>DistrictContacts</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityParameter> + <name>DistrictId_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>currentOrganisationId_param</name> + <expose v="true" /> + </entityParameter> </entityFields> <recordContainers> <dbRecordContainer> <name>db</name> <alias>Data_alias</alias> <fromClauseProcess>%aditoprj%/entity/DistrictContact_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess> + <conditionProcess>%aditoprj%/entity/DistrictContact_entity/recordcontainers/db/conditionProcess.js</conditionProcess> <linkInformation> <linkInformation> - <name>f753f5d5-67e2-43b0-99ce-58d65a11c69e</name> + <name>dc5cbebc-a947-4196-937a-f665ee80cc31</name> <tableName>DISTRICTCONTACT</tableName> <primaryKey>DISTRICTCONTACTID</primaryKey> <isUIDTable v="true" /> <readonly v="false" /> </linkInformation> <linkInformation> - <name>ca252b67-b32a-407a-9161-88714a4aaeb7</name> + <name>058abbb3-d92f-4fe1-b326-1320cfee90df</name> <tableName>CONTACT</tableName> <primaryKey>CONTACTID</primaryKey> <isUIDTable v="false" /> <readonly v="true" /> </linkInformation> - <linkInformation> - <name>2c39c72a-c6f1-4886-adb2-9d00f69ca74a</name> - <tableName>DISTRICT</tableName> - <primaryKey>DISTRICTID</primaryKey> - <isUIDTable v="false" /> - <readonly v="true" /> - </linkInformation> </linkInformation> <recordFieldMappings> <dbRecordFieldMapping> <name>ADVISER_CONTACT_ID.value</name> - <recordfield>DISTRICTCONTACT.CONTACT_ID</recordfield> + <recordfield>DISTRICTCONTACT.ADVISER_CONTACT_ID</recordfield> <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> @@ -200,6 +247,14 @@ <name>ORIGIN.displayValue</name> <expression>%aditoprj%/entity/DistrictContact_entity/recordcontainers/db/recordfieldmappings/origin.displayvalue/expression.js</expression> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DISTRICT_ID.displayValue</name> + <expression>%aditoprj%/entity/DistrictContact_entity/recordcontainers/db/recordfieldmappings/district_id.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>STATUS.displayValue</name> + <expression>%aditoprj%/entity/DistrictContact_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/DistrictContact_entity/entityfields/adviser_contact_id/displayValueProcess.js b/entity/DistrictContact_entity/entityfields/adviser_contact_id/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e5831fd4418b333578ec210e784b82b3615dd772 --- /dev/null +++ b/entity/DistrictContact_entity/entityfields/adviser_contact_id/displayValueProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Contact_lib"); + +result.string(ContactUtils.getFullTitleByContactId(vars.get("$field.ADVISER_CONTACT_ID"), false)); \ No newline at end of file diff --git a/entity/DistrictContact_entity/entityfields/contact_id/displayValueProcess.js b/entity/DistrictContact_entity/entityfields/contact_id/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..0398a93e921deff9c9cf94e2468bdf1702bffa59 --- /dev/null +++ b/entity/DistrictContact_entity/entityfields/contact_id/displayValueProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Contact_lib"); + +result.string(ContactUtils.getFullTitleByContactId(vars.getString("$field.CONTACT_ID"))); \ No newline at end of file diff --git a/entity/DistrictContact_entity/entityfields/keywordcontactstates/children/excludedkeyidssubquery_param/valueProcess.js b/entity/DistrictContact_entity/entityfields/keywordcontactstates/children/excludedkeyidssubquery_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..15b73f9705dc456af35c5d5e144cf88c436a79eb --- /dev/null +++ b/entity/DistrictContact_entity/entityfields/keywordcontactstates/children/excludedkeyidssubquery_param/valueProcess.js @@ -0,0 +1,10 @@ +import("system.result"); +import("KeywordRegistry_basic"); +import("Sql_lib"); + +var cond = newSelect("AB_KEYWORD_ENTRY.KEYID") +.from("AB_KEYWORD_ENTRY") +.where("AB_KEYWORD_ENTRY.CONTAINER", $KeywordRegistry.contactStatus()) +.and("AB_KEYWORD_ENTRY.KEYID", $KeywordRegistry.contactStatus$inReview(), SqlBuilder.LIKE()); + +result.string(cond.toString()); \ No newline at end of file diff --git a/entity/DistrictContact_entity/entityfields/status/displayValueProcess.js b/entity/DistrictContact_entity/entityfields/status/displayValueProcess.js deleted file mode 100644 index f2373da2bb3860422f15e71699dee051eb928b89..0000000000000000000000000000000000000000 --- a/entity/DistrictContact_entity/entityfields/status/displayValueProcess.js +++ /dev/null @@ -1,11 +0,0 @@ -import("system.result"); -import("system.vars"); -import("KeywordRegistry_basic"); -import("Keyword_lib"); - -var key = vars.get("$field.STATUS"); -if (key) -{ - var res = KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), key); - result.string(res); -} \ No newline at end of file diff --git a/entity/DistrictContact_entity/recordcontainers/db/conditionProcess.js b/entity/DistrictContact_entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..f9e0b80adf18420f7f8acf47539c268adeccda6b --- /dev/null +++ b/entity/DistrictContact_entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,14 @@ +import("system.entities"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + +var organisationID = vars.get("$param.currentOrganisationId_param"); +var cond = newWhere(); + +if (organisationID) +{ + cond.and("DISTRICTCONTACT.CONTACT_ID", organisationID); +} + +result.string(cond.toString()); \ No newline at end of file diff --git a/entity/DistrictContact_entity/recordcontainers/db/fromClauseProcess.js b/entity/DistrictContact_entity/recordcontainers/db/fromClauseProcess.js index 3f60d4c298a8f74dae448ce6d17a7f729dc6c848..19a916d7f0b23cd1c832567ee33ea1d3c592f01f 100644 --- a/entity/DistrictContact_entity/recordcontainers/db/fromClauseProcess.js +++ b/entity/DistrictContact_entity/recordcontainers/db/fromClauseProcess.js @@ -1,6 +1,5 @@ import("system.result"); var res = "DISTRICTCONTACT \n\ - left join CONTACT on (CONTACT.CONTACTID = DISTRICTCONTACT.CONTACT_ID)\n\ - left join DISTRICT on (DISTRICT.DISTRICTID = DISTRICTCONTACT.DISTRICT_ID)"; + left join CONTACT on (CONTACT.CONTACTID = DISTRICTCONTACT.CONTACT_ID)"; result.string(res); \ No newline at end of file diff --git a/entity/DistrictContact_entity/recordcontainers/db/recordfieldmappings/district_id.displayvalue/expression.js b/entity/DistrictContact_entity/recordcontainers/db/recordfieldmappings/district_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..2b6b2fc2b784294d32c6ea947086bf1e62d5d9c3 --- /dev/null +++ b/entity/DistrictContact_entity/recordcontainers/db/recordfieldmappings/district_id.displayvalue/expression.js @@ -0,0 +1,7 @@ +import("system.result"); +import("Sql_lib"); + +result.string(newSelect("DISTRICT.DISTRICT_NAME") + .from("DISTRICT") + .where("DISTRICT.DISTRICTID = DISTRICTCONTACT.DISTRICT_ID") + .toString()); \ No newline at end of file diff --git a/entity/DistrictContact_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js b/entity/DistrictContact_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..22b1e68d7238c6315da8b21edbb1fdae45744855 --- /dev/null +++ b/entity/DistrictContact_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js @@ -0,0 +1,6 @@ +import("KeywordRegistry_basic"); +import("system.result"); +import("Keyword_lib"); + +var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.contactStatus(), "DISTRICTCONTACT.STATUS"); +result.string(sql); \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/DistrictResponsible_entity.aod b/entity/DistrictResponsible_entity/DistrictResponsible_entity.aod index f4d433988ded22881b368034876ccaaa85e017ad..ad1bbffb6bf0fe57bf17b54b8776ce01a0828c88 100644 --- a/entity/DistrictResponsible_entity/DistrictResponsible_entity.aod +++ b/entity/DistrictResponsible_entity/DistrictResponsible_entity.aod @@ -237,6 +237,18 @@ </entityParameter> </children> </entityConsumer> + <entityProvider> + <name>DistrictResponsibleAdvisers</name> + <lookupIdfield>EMPLOYEE_CONTACT_ID</lookupIdfield> + <dependencies> + <entityDependency> + <name>ac067a2d-e313-44b7-b219-f834ef4a7629</name> + <entityName>DistrictContact_entity</entityName> + <fieldName>Advisers</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> </entityFields> <recordContainers> <dbRecordContainer> @@ -307,10 +319,6 @@ <name>PHONE.value</name> <expression>%aditoprj%/entity/DistrictResponsible_entity/recordcontainers/db/recordfieldmappings/phone.value/expression.js</expression> </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>DISTRICT_ID.displayValue</name> - <expression>%aditoprj%/entity/DistrictResponsible_entity/recordcontainers/db/recordfieldmappings/district_id.displayvalue/expression.js</expression> - </dbRecordFieldMapping> <dbRecordFieldMapping> <name>EMPLOYEE_CONTACT_ID.displayValue</name> <expression>%aditoprj%/entity/DistrictResponsible_entity/recordcontainers/db/recordfieldmappings/employee_contact_id.displayvalue/expression.js</expression> @@ -337,6 +345,10 @@ <recordfield>DISTRICTRESPONSIBLE.VALID_UNTIL</recordfield> <isFilterable v="true" /> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DISTRICT_ID.displayValue</name> + <expression>%aditoprj%/entity/DistrictResponsible_entity/recordcontainers/db/recordfieldmappings/district_id.displayvalue/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/DistrictResponsible_entity/recordcontainers/db/recordfieldmappings/district_id.displayvalue/expression.js b/entity/DistrictResponsible_entity/recordcontainers/db/recordfieldmappings/district_id.displayvalue/expression.js index 2bd6b5d01756719a2e951069a73268a5bb488d9f..fc4de922e1d7f53ae4aaa5f8f91ec1dbe5382781 100644 --- a/entity/DistrictResponsible_entity/recordcontainers/db/recordfieldmappings/district_id.displayvalue/expression.js +++ b/entity/DistrictResponsible_entity/recordcontainers/db/recordfieldmappings/district_id.displayvalue/expression.js @@ -4,4 +4,4 @@ import("Sql_lib"); result.string(newSelect("DISTRICT.DISTRICT_NAME") .from("DISTRICT") .where("DISTRICT.DISTRICTID = DISTRICTRESPONSIBLE.DISTRICT_ID") - .toString()); + .toString()); \ No newline at end of file diff --git a/entity/District_entity/District_entity.aod b/entity/District_entity/District_entity.aod index e45c83db3f6cdb87fac6c0dfec0a96d0df6685b2..9b8b64b8204918ea1fbb962c46e5c9d3efc92f8c 100644 --- a/entity/District_entity/District_entity.aod +++ b/entity/District_entity/District_entity.aod @@ -229,6 +229,7 @@ <children> <entityParameter> <name>DistrictsByContactId_param</name> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/validparentdistricts/children/districtsbycontactid_param/valueProcess.js</valueProcess> <expose v="false" /> </entityParameter> </children> @@ -274,6 +275,39 @@ </entityActionField> </children> </entityActionGroup> + <entityProvider> + <name>DistrictContacts</name> + <dependencies> + <entityDependency> + <name>d94c353f-c66d-489c-934b-72ca154ba37a</name> + <entityName>DistrictContact_entity</entityName> + <fieldName>Districts</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + <children> + <entityParameter> + <name>DistrictsByContactId_param</name> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/districtcontacts/children/districtsbycontactid_param/valueProcess.js</valueProcess> + <expose v="true" /> + <mandatory v="false" /> + </entityParameter> + </children> + </entityProvider> + <entityConsumer> + <name>DistrictContactUIDs</name> + <dependency> + <name>dependency</name> + <entityName>DistrictContact_entity</entityName> + <fieldName>DistrictContacts</fieldName> + </dependency> + <children> + <entityParameter> + <name>DistrictId_param</name> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/districtcontactuids/children/districtid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/District_entity/entityfields/districtcontacts/children/districtsbycontactid_param/valueProcess.js b/entity/District_entity/entityfields/districtcontacts/children/districtsbycontactid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..289f9107d46f3fabb9daf28ea42318b124ba98ea --- /dev/null +++ b/entity/District_entity/entityfields/districtcontacts/children/districtsbycontactid_param/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string("$$$###ignore_param###$$$");//dummy value, for special treatment in the conditionProcess \ No newline at end of file diff --git a/entity/District_entity/entityfields/districtcontactuids/children/districtid_param/valueProcess.js b/entity/District_entity/entityfields/districtcontactuids/children/districtid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..44ec9627c5e51edbe27130ba82db39ca269d2c07 --- /dev/null +++ b/entity/District_entity/entityfields/districtcontactuids/children/districtid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.vars"); + +result.string(vars.get("$field.DISTRICTID")); \ No newline at end of file diff --git a/entity/District_entity/entityfields/responsibledistricts/children/districtsbycontactid_param/valueProcess.js b/entity/District_entity/entityfields/responsibledistricts/children/districtsbycontactid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/District_entity/entityfields/validparentdistricts/children/districtsbycontactid_param/valueProcess.js b/entity/District_entity/entityfields/validparentdistricts/children/districtsbycontactid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..289f9107d46f3fabb9daf28ea42318b124ba98ea --- /dev/null +++ b/entity/District_entity/entityfields/validparentdistricts/children/districtsbycontactid_param/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string("$$$###ignore_param###$$$");//dummy value, for special treatment in the conditionProcess \ No newline at end of file diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index 18afded566ce57071923d5fba788acd839f3507d..7bcc4de17a6cb52acae9aa20beda4c3b3c0190ce 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -151,6 +151,12 @@ <fieldName>Organisations</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>b64b29e6-59c5-4250-9bc7-b08c85976e7e</name> + <entityName>DistrictContact_entity</entityName> + <fieldName>Organisations</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> @@ -1402,8 +1408,14 @@ <dependency> <name>dependency</name> <entityName>DistrictContact_entity</entityName> - <fieldName>#PROVIDER</fieldName> + <fieldName>DistrictContacts</fieldName> </dependency> + <children> + <entityParameter> + <name>currentOrganisationId_param</name> + <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/districtcontacts/children/currentorganisationid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> </entityConsumer> </entityFields> <recordContainers> diff --git a/entity/Organisation_entity/entityfields/districtcontacts/children/currentorganisationid_param/valueProcess.js b/entity/Organisation_entity/entityfields/districtcontacts/children/currentorganisationid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..70a1c0fcc1293fa4bf37109294829055704eeaea --- /dev/null +++ b/entity/Organisation_entity/entityfields/districtcontacts/children/currentorganisationid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.vars"); + +result.string(vars.get("$field.CONTACTID")); \ No newline at end of file diff --git a/neonContext/DistrictResponsible/DistrictResponsible.aod b/neonContext/DistrictResponsible/DistrictResponsible.aod index ac58a2451f7d4246be83b672e5ff3e909aa77351..1a7fdf7c9c460ca3d629a372a4ffba1cf1aa8cc3 100644 --- a/neonContext/DistrictResponsible/DistrictResponsible.aod +++ b/neonContext/DistrictResponsible/DistrictResponsible.aod @@ -7,6 +7,7 @@ <filterView>DistrictResponsibleFilter_view</filterView> <editView>DistrictResponsibleEdit_view</editView> <previewView>DistrictResponsiblePreviewList_view</previewView> + <lookupView>DistrictResponsibleLookup_view</lookupView> <devices> <element>MOBILE</element> <element>TABLET</element> @@ -34,5 +35,9 @@ <name>bf0655aa-60e7-47b8-a3e7-eb7ba8b37cac</name> <view>DistrictResponsibleEdit_view</view> </neonViewReference> + <neonViewReference> + <name>30960bbf-184a-4e4e-8058-983d4c150d89</name> + <view>DistrictResponsibleLookup_view</view> + </neonViewReference> </references> </neonContext> diff --git a/neonView/DistrictContactFilter_view/DistrictContactFilter_view.aod b/neonView/DistrictContactFilter_view/DistrictContactFilter_view.aod index 306822ac5ad37e3ced4b4690063816b5953a2f8a..fe94c7158652cc235602300a5f84385b0178dd09 100644 --- a/neonView/DistrictContactFilter_view/DistrictContactFilter_view.aod +++ b/neonView/DistrictContactFilter_view/DistrictContactFilter_view.aod @@ -12,6 +12,8 @@ <tableViewTemplate> <name>districtContacts</name> <entityField>#ENTITY</entityField> + <linkedColumns /> + <fixedFilterFields /> <columns> <neonTableColumn> <name>b9295685-3242-4e15-af62-72f4adb758a3</name> @@ -22,11 +24,7 @@ <entityField>CONTACT_ID</entityField> </neonTableColumn> <neonTableColumn> - <name>e8942dc0-3661-431e-9bac-2ab15a060438</name> - <entityField>DISTRICT_ID</entityField> - </neonTableColumn> - <neonTableColumn> - <name>b4c79a64-9eda-49a9-b5a2-b79689b5741e</name> + <name>a5b6ac69-712c-45e1-97ff-cf1101da4b95</name> <entityField>ADVISER_CONTACT_ID</entityField> </neonTableColumn> <neonTableColumn> @@ -37,6 +35,14 @@ <name>1870263d-a3be-41fc-989a-2fb8aebef12c</name> <entityField>STATUS</entityField> </neonTableColumn> + <neonTableColumn> + <name>26299d80-a74b-4c45-b599-6aec0ab6e82b</name> + <entityField>ORIGIN</entityField> + </neonTableColumn> + <neonTableColumn> + <name>e8942dc0-3661-431e-9bac-2ab15a060438</name> + <entityField>DISTRICT_ID</entityField> + </neonTableColumn> <neonTableColumn> <name>873010c6-bd65-40bf-a8f3-7bbb82d56e8a</name> <entityField>VALID_FROM</entityField> @@ -45,10 +51,6 @@ <name>cdd947b0-d546-4aeb-9ec6-7d913e1c45bc</name> <entityField>VALID_UNTIL</entityField> </neonTableColumn> - <neonTableColumn> - <name>26299d80-a74b-4c45-b599-6aec0ab6e82b</name> - <entityField>ORIGIN</entityField> - </neonTableColumn> </columns> </tableViewTemplate> </children> diff --git a/neonView/DistrictResponsibleEdit_view/DistrictResponsibleEdit_view.aod b/neonView/DistrictResponsibleEdit_view/DistrictResponsibleEdit_view.aod index 9b8447b0808da17e5b14c21487c23be065db0812..a6771e912541b618da76fb9fb31a4d86c7e86a34 100644 --- a/neonView/DistrictResponsibleEdit_view/DistrictResponsibleEdit_view.aod +++ b/neonView/DistrictResponsibleEdit_view/DistrictResponsibleEdit_view.aod @@ -2,6 +2,7 @@ <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>DistrictResponsibleEdit_view</name> <majorModelMode>DISTRIBUTED</majorModelMode> + <size>SMALL</size> <layout> <noneLayout> <name>layout</name> diff --git a/neonView/DistrictResponsibleLookup_view/DistrictResponsibleLookup_view.aod b/neonView/DistrictResponsibleLookup_view/DistrictResponsibleLookup_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..20ab3ef6c626ce76ec30e576581213ab04633c02 --- /dev/null +++ b/neonView/DistrictResponsibleLookup_view/DistrictResponsibleLookup_view.aod @@ -0,0 +1,30 @@ +<?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>DistrictResponsibleLookup_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <noneLayout> + <name>layout</name> + </noneLayout> + </layout> + <children> + <tableViewTemplate> + <name>ResponsibleLookup</name> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>b1180c08-6e1f-459f-868f-2842d034806f</name> + <entityField>#ICON</entityField> + </neonTableColumn> + <neonTableColumn> + <name>e5b2fbc0-174d-4d0e-88d1-a798e65cd773</name> + <entityField>EMPLOYEE_CONTACT_ID</entityField> + </neonTableColumn> + <neonTableColumn> + <name>db77b7a3-80bf-4dc7-9691-8d6aa7422756</name> + <entityField>ADVISER_ROLE</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView> diff --git a/neonView/DistrictResponsiblePreviewList_view/DistrictResponsiblePreviewList_view.aod b/neonView/DistrictResponsiblePreviewList_view/DistrictResponsiblePreviewList_view.aod index 81198dcb246c46b6326e8a50989382d4c4505d51..a8bc9d33bccd06cdcc10371ed4d7d6355e7e0ee4 100644 --- a/neonView/DistrictResponsiblePreviewList_view/DistrictResponsiblePreviewList_view.aod +++ b/neonView/DistrictResponsiblePreviewList_view/DistrictResponsiblePreviewList_view.aod @@ -3,22 +3,37 @@ <name>DistrictResponsiblePreviewList_view</name> <majorModelMode>DISTRIBUTED</majorModelMode> <layout> - <noneLayout> + <boxLayout> <name>layout</name> - </noneLayout> + </boxLayout> </layout> <children> - <titledListViewTemplate> - <name>titledListViewTemplate</name> + <genericViewTemplate> + <name>Responsibles</name> <entityField>#ENTITY</entityField> <title>Contactperson</title> - <columns> - <neonTitledListTableColumn> - <name>007d67c4-146b-4202-a677-4390059b4a0a</name> + <fields> + <entityFieldLink> + <name>e65ad43f-0ec6-4a22-b58d-e903acd2648c</name> <entityField>EMPLOYEE_CONTACT_ID</entityField> - <fullWidth v="true" /> - </neonTitledListTableColumn> - </columns> - </titledListViewTemplate> + </entityFieldLink> + <entityFieldLink> + <name>2606d85a-1176-4067-97db-27207dfcee4c</name> + <entityField>ADVISER_ROLE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>b882f9ff-f877-42e9-9a0c-84206bd78cea</name> + <entityField>ADVISER_STATUS</entityField> + </entityFieldLink> + <entityFieldLink> + <name>fde46c86-a464-4279-9fc8-71da3d6e73eb</name> + <entityField>VALID_FROM</entityField> + </entityFieldLink> + <entityFieldLink> + <name>70e68bd7-6431-4f13-92e0-9efd11a0de96</name> + <entityField>VALID_UNTIL</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> </children> </neonView> diff --git a/neonView/PrivatePersonPreview_view/PrivatePersonPreview_view.aod b/neonView/PrivatePersonPreview_view/PrivatePersonPreview_view.aod index 13f2b9fd014f79514b2417b247f8e079b5cee39a..a294c41097baa5d4e039bd7d34f75cceaf6ee6db 100644 --- a/neonView/PrivatePersonPreview_view/PrivatePersonPreview_view.aod +++ b/neonView/PrivatePersonPreview_view/PrivatePersonPreview_view.aod @@ -10,7 +10,7 @@ <children> <neonViewReference> <name>0a66aea5-bf81-47e4-941d-9158ff8f4f51</name> - <entityField>Persons</entityField> + <entityField>Organisations</entityField> <view>ContactTitledList_view</view> </neonViewReference> </children>