diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 4a1ab973694e123dc08a82bf659081bd49e2404e..0000000000000000000000000000000000000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,6 +0,0 @@ -<component name="InspectionProjectProfileManager"> - <profile version="1.0"> - <option name="myName" value="Project Default" /> - <inspection_tool class="LossyEncoding" enabled="false" level="WARNING" enabled_by_default="false" /> - </profile> -</component> \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 9661ac713428efbad557d3ba3a62216b5bb7d226..0000000000000000000000000000000000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="VcsDirectoryMappings"> - <mapping directory="$PROJECT_DIR$" vcs="Git" /> - </component> -</project> \ 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 new file mode 100644 index 0000000000000000000000000000000000000000..a423a1456fddea0c708fd28d612260447158f5d7 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.0/Districts/changelog.xml @@ -0,0 +1,7 @@ +<?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"> + <include relativeToChangelogFile="true" file="create_district.xml"/> + <include relativeToChangelogFile="true" file="create_districtresponsible.xml"/> + <include relativeToChangelogFile="true" file="create_districtResponsibleKeyword.xml"/> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.0/Districts/create_district.xml b/.liquibase/Data_alias/basic/2020.2.0/Districts/create_district.xml new file mode 100644 index 0000000000000000000000000000000000000000..6ea091c954808cffc73235d0378ab1d3d5bbc7aa --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.0/Districts/create_district.xml @@ -0,0 +1,21 @@ +<?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="d.tran" id="4bfb41ea-ef43-403a-9a93-48d92294b1cb"> + <createTable tableName="DISTRICT"> + <column name="DISTRICTID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_DISTRICT_DISTRICTID"/> + </column> + <column name="DISTRICT_NAME" type="VARCHAR(50)"/> + <column name="DISTRICT_NUMBER" type="INTEGER"/> + <column name="DISTRICT_INFO" type="VARCHAR(50)"/> + <column name="ISO3" type="VARCHAR(5)"/> + <column name="PARENTDISTRICT_DISTRICTID" type="CHAR(36)"/> + <column name="DISTRICT_FILTER" type="NCLOB"/> + <column name="DISTRICT_STATUS" type="INTEGER"/> + <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"/> + </createTable> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2020.2.0/Districts/create_districtResponsibleKeyword.xml b/.liquibase/Data_alias/basic/2020.2.0/Districts/create_districtResponsibleKeyword.xml new file mode 100644 index 0000000000000000000000000000000000000000..4e8f1db18ed58eed2c358d90a2346f3a4a77f4fe --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.0/Districts/create_districtResponsibleKeyword.xml @@ -0,0 +1,14 @@ +<?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="d.tran" id="04265522-bc51-4a4e-b637-335942dff147"> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="997b4954-3108-41e0-a339-c1045ea2e01c"/> + <column name="KEYID" value="MEMBERROLEDISTRICTRESPONSIBLE"/> + <column name="TITLE" value="District Responsible"/> + <column name="CONTAINER" value="MemberRole"/> + <column name="SORTING" valueNumeric="0"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="0"/> + </insert> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2020.2.0/Districts/create_districtResponsibleMemberRole.xml b/.liquibase/Data_alias/basic/2020.2.0/Districts/create_districtResponsibleMemberRole.xml new file mode 100644 index 0000000000000000000000000000000000000000..5747db8f3688988d77e8645b3a5787e9c35cc6d6 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.0/Districts/create_districtResponsibleMemberRole.xml @@ -0,0 +1,14 @@ +<?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="d.tran" id="d95ebf6c-1e34-4ba3-9f0b-386c5059444e"> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="66d1563a-a76c-47ca-af6b-38586a2f3ce3"/> + <column name="KEYID" value="MEMROLEDISTRICTRESPONSIBLE"/> + <column name="TITLE" value="District Responsible"/> + <column name="CONTAINER" value="MemberRole"/> + <column name="SORTING" valueNumeric="0"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="0"/> + </insert> + </changeSet> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.0/Districts/create_districtresponsible.xml b/.liquibase/Data_alias/basic/2020.2.0/Districts/create_districtresponsible.xml new file mode 100644 index 0000000000000000000000000000000000000000..71ac9397e0d2378e4db0a8643cf3f5db376d3b65 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.0/Districts/create_districtresponsible.xml @@ -0,0 +1,17 @@ +<?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="d.tran" id="0e5cc99d-3500-484c-abc4-441e3a5c4b7f"> + <createTable tableName="DISTRICTRESPONSIBLE"> + <column name="DISTRICTRESPONSIBLEID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_DISTRICTRESPONSIBLE_DISTRICTRESPONSIBLEID"/> + </column> + <column name="DISTRICT_ID" type="CHAR(36)"/> + <column name="EMPLOYEE_CONTACT_ID" type="CHAR(36)"/> + <column name="DEPARTMENT_ATTRIBUTE_ID" type="CHAR(36)"/> + <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"/> + </createTable> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2020.2.0/changelog.xml b/.liquibase/Data_alias/basic/2020.2.0/changelog.xml index 6007ef250f386a2a42165275f7a3eb6f7e1852ef..21311ae8dbdfb3ec388f1d2ef1b2c10ed79c1c13 100644 --- a/.liquibase/Data_alias/basic/2020.2.0/changelog.xml +++ b/.liquibase/Data_alias/basic/2020.2.0/changelog.xml @@ -1,6 +1,7 @@ <?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"> + <include relativeToChangelogFile="true" file="Districts/changelog.xml"/> <include relativeToChangelogFile="true" file="Classification/changelog.xml"/> <include relativeToChangelogFile="true" file="ImportFields/changelog.xml"/> <include relativeToChangelogFile="true" file="LeadimportMappingAssistant/changelog.xml"/> diff --git a/.liquibase/Data_alias/changelog.xml b/.liquibase/Data_alias/changelog.xml index ae8736c63f7bcc4b7075dc345ec1aadcea052724..c3a1d3c5759b118fd0d3d4e30e38f246a3f28166 100644 --- a/.liquibase/Data_alias/changelog.xml +++ b/.liquibase/Data_alias/changelog.xml @@ -16,7 +16,7 @@ <include relativeToChangelogFile="true" file="basic/2020.1.2/changelog.xml"/> <include relativeToChangelogFile="true" file="basic/2020.1.3/changelog.xml"/> <include relativeToChangelogFile="true" file="basic/2020.2.0/changelog.xml"/> - - <!--enable this only when you definetly want to overwrite the existing data with demo records:--> + + <!--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 diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index 4bb598459a46fe027558f6c3c5da8c4e3d392366..402c8e920ff47f22b923eb38bf4fece4768cfbef 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -14990,7 +14990,7 @@ <name>GRADING</name> <dbName></dbName> <primaryKey v="false" /> - <columnType v="1" /> + <columnType v="12" /> <size v="1" /> <scale v="0" /> <notNull v="false" /> @@ -15052,7 +15052,7 @@ <name>OBJECT_ROWID</name> <dbName></dbName> <primaryKey v="false" /> - <columnType v="12" /> + <columnType v="1" /> <size v="36" /> <scale v="0" /> <notNull v="false" /> @@ -15095,7 +15095,7 @@ <dbName></dbName> <primaryKey v="false" /> <columnType v="12" /> - <size v="36" /> + <size v="63" /> <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> @@ -15314,6 +15314,326 @@ </entityFieldDb> </entityFields> </entityDb> + <entityDb> + <name>DISTRICT</name> + <dbName></dbName> + <idColumn>DISTRICTID</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>DISTRICT_NAME</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>DISTRICT_INFO</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_EDIT</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>DISTRICT_STATUS</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="4" /> + <size v="10" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>PARENTDISTRICT_DISTRICTID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="36" /> + <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="29" /> + <scale v="9" /> + <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="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DISTRICT_NUMBER</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="4" /> + <size v="10" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>ISO3</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="5" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DISTRICTID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DISTRICT_FILTER</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="2005" /> + <size v="2147483647" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> + <entityDb> + <name>DISTRICTRESPONSIBLE</name> + <dbName></dbName> + <idColumn>DISTRICTRESPONSIBLEID</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>DISTRICTRESPONSIBLEID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_EDIT</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>DEPARTMENT_ATTRIBUTE_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DISTRICT_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>EMPLOYEE_CONTACT_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="36" /> + <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="29" /> + <scale v="9" /> + <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="36" /> + <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="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/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/contact/entityfields/organisation_id/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/contact/entityfields/organisation_id/customproperties/translate4log/property.js index 633ea8076f023b45b5944ebcb37cdab18455ab1d..013c797ac6b08eb3d113c1bb045c0e12cbc51558 100644 --- a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/contact/entityfields/organisation_id/customproperties/translate4log/property.js +++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/contact/entityfields/organisation_id/customproperties/translate4log/property.js @@ -1,8 +1,8 @@ -import("Contact_lib"); -import("system.db"); -import("system.result"); -import("Loghistory_lib"); - -var params = Translate4LogParams.load(); -var res = OrganisationUtils.getNameByContactId(params.value); -result.string(res); +import("Contact_lib"); +import("system.db"); +import("system.result"); +import("Loghistory_lib"); + +var params = Translate4LogParams.load(); +var res = OrganisationUtils.getNameByContactId(params.value); +result.string(res); diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/contact_id/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/contact_id/customproperties/translate4log/property.js index 26c85ce005d6c71d8ddb60561653f4d1330bd24c..f35d37ab09f059046b3b6f3d672cf01c66fe58c4 100644 --- a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/contact_id/customproperties/translate4log/property.js +++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/contact_id/customproperties/translate4log/property.js @@ -1,7 +1,7 @@ -import("Contact_lib"); -import("system.result"); -import("Loghistory_lib"); - -var params = Translate4LogParams.load(); -var res = ContactUtils.getFullTitleByContactId(params.value); +import("Contact_lib"); +import("system.result"); +import("Loghistory_lib"); + +var params = Translate4LogParams.load(); +var res = ContactUtils.getFullTitleByContactId(params.value); result.string(res); \ No newline at end of file diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/net/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/net/customproperties/translate4log/property.js index d5c240bd0adf3af2b3e0c1dd3c61e6a753e95577..4bd7c6c1a52c9aad21e9de60dde26fb5ba4de177 100644 --- a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/net/customproperties/translate4log/property.js +++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/net/customproperties/translate4log/property.js @@ -1,8 +1,8 @@ -import("system.translate"); -import("system.vars"); -import("system.result"); -import("system.text"); -import("Loghistory_lib"); - -var params = Translate4LogParams.load(); +import("system.translate"); +import("system.vars"); +import("system.result"); +import("system.text"); +import("Loghistory_lib"); + +var params = Translate4LogParams.load(); result.string(text.formatDouble(params.value, "#,##0.00", true)); \ No newline at end of file diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/vat/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/vat/customproperties/translate4log/property.js index d5c240bd0adf3af2b3e0c1dd3c61e6a753e95577..4bd7c6c1a52c9aad21e9de60dde26fb5ba4de177 100644 --- a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/vat/customproperties/translate4log/property.js +++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/vat/customproperties/translate4log/property.js @@ -1,8 +1,8 @@ -import("system.translate"); -import("system.vars"); -import("system.result"); -import("system.text"); -import("Loghistory_lib"); - -var params = Translate4LogParams.load(); +import("system.translate"); +import("system.vars"); +import("system.result"); +import("system.text"); +import("Loghistory_lib"); + +var params = Translate4LogParams.load(); result.string(text.formatDouble(params.value, "#,##0.00", true)); \ No newline at end of file diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/product/entityfields/contact_id/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/product/entityfields/contact_id/customproperties/translate4log/property.js index 0046811b3b14af08f749b46cdc3151f2109c0220..9f7c5917a2317799200776b01469d749759bd6bb 100644 --- a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/product/entityfields/contact_id/customproperties/translate4log/property.js +++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/product/entityfields/contact_id/customproperties/translate4log/property.js @@ -1,8 +1,8 @@ -import("Contact_lib"); -import("system.db"); -import("system.result"); -import("Loghistory_lib"); - -var params = Translate4LogParams.load(); -var res = OrganisationUtils.getNameByContactId(params.value); +import("Contact_lib"); +import("system.db"); +import("system.result"); +import("Loghistory_lib"); + +var params = Translate4LogParams.load(); +var res = OrganisationUtils.getNameByContactId(params.value); result.string(res); \ No newline at end of file diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesorder/entityfields/contact_id/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesorder/entityfields/contact_id/customproperties/translate4log/property.js index 26c85ce005d6c71d8ddb60561653f4d1330bd24c..f35d37ab09f059046b3b6f3d672cf01c66fe58c4 100644 --- a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesorder/entityfields/contact_id/customproperties/translate4log/property.js +++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesorder/entityfields/contact_id/customproperties/translate4log/property.js @@ -1,7 +1,7 @@ -import("Contact_lib"); -import("system.result"); -import("Loghistory_lib"); - -var params = Translate4LogParams.load(); -var res = ContactUtils.getFullTitleByContactId(params.value); +import("Contact_lib"); +import("system.result"); +import("Loghistory_lib"); + +var params = Translate4LogParams.load(); +var res = ContactUtils.getFullTitleByContactId(params.value); result.string(res); \ No newline at end of file diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject/entityfields/contact_id/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject/entityfields/contact_id/customproperties/translate4log/property.js index 633ea8076f023b45b5944ebcb37cdab18455ab1d..013c797ac6b08eb3d113c1bb045c0e12cbc51558 100644 --- a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject/entityfields/contact_id/customproperties/translate4log/property.js +++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject/entityfields/contact_id/customproperties/translate4log/property.js @@ -1,8 +1,8 @@ -import("Contact_lib"); -import("system.db"); -import("system.result"); -import("Loghistory_lib"); - -var params = Translate4LogParams.load(); -var res = OrganisationUtils.getNameByContactId(params.value); -result.string(res); +import("Contact_lib"); +import("system.db"); +import("system.result"); +import("Loghistory_lib"); + +var params = Translate4LogParams.load(); +var res = OrganisationUtils.getNameByContactId(params.value); +result.string(res); diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/task/entityfields/editor_contact_id/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/task/entityfields/editor_contact_id/customproperties/translate4log/property.js index 26c85ce005d6c71d8ddb60561653f4d1330bd24c..f35d37ab09f059046b3b6f3d672cf01c66fe58c4 100644 --- a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/task/entityfields/editor_contact_id/customproperties/translate4log/property.js +++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/task/entityfields/editor_contact_id/customproperties/translate4log/property.js @@ -1,7 +1,7 @@ -import("Contact_lib"); -import("system.result"); -import("Loghistory_lib"); - -var params = Translate4LogParams.load(); -var res = ContactUtils.getFullTitleByContactId(params.value); +import("Contact_lib"); +import("system.result"); +import("Loghistory_lib"); + +var params = Translate4LogParams.load(); +var res = ContactUtils.getFullTitleByContactId(params.value); result.string(res); \ No newline at end of file diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/task/entityfields/requestor_contact_id/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/task/entityfields/requestor_contact_id/customproperties/translate4log/property.js index 26c85ce005d6c71d8ddb60561653f4d1330bd24c..f35d37ab09f059046b3b6f3d672cf01c66fe58c4 100644 --- a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/task/entityfields/requestor_contact_id/customproperties/translate4log/property.js +++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/task/entityfields/requestor_contact_id/customproperties/translate4log/property.js @@ -1,7 +1,7 @@ -import("Contact_lib"); -import("system.result"); -import("Loghistory_lib"); - -var params = Translate4LogParams.load(); -var res = ContactUtils.getFullTitleByContactId(params.value); +import("Contact_lib"); +import("system.result"); +import("Loghistory_lib"); + +var params = Translate4LogParams.load(); +var res = ContactUtils.getFullTitleByContactId(params.value); result.string(res); \ No newline at end of file diff --git a/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod b/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod index 256d8c050040618b929461f7232a0bf1ff123d9f..6113055f4ea0e82e8866b0fd0a2076e478584453 100644 --- a/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod +++ b/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod @@ -306,6 +306,10 @@ <name>Userhelp</name> <kind v="10077" /> </entityNode> + <entityNode> + <name>District</name> + <kind v="10077" /> + </entityNode> </childNodes> </entityNode> </childNodes> @@ -321,15 +325,14 @@ <kind v="123" /> <title></title> <childNodes> - <entityNode> - <name>PROJECT_HumanResources</name> - <kind v="159" /> - <title></title> - </entityNode> <entityNode> <name>Employee</name> <kind v="10077" /> </entityNode> + <entityNode> + <name>INTERNAL_ADMINISTRATOR</name> + <kind v="159" /> + </entityNode> </childNodes> </entityNode> <entityNode> @@ -345,7 +348,6 @@ <entityNode> <name>INTERNAL_ADMINISTRATOR</name> <kind v="159" /> - <title></title> </entityNode> <entityNode> <name>PermissionMetaData</name> diff --git a/entity/Attribute_entity/Attribute_entity.aod b/entity/Attribute_entity/Attribute_entity.aod index 34e9a227c42527fdb1474598687e4f5c7a754d4c..6f00c57a63fb54566d003715a274b58dcc3ffbc0 100644 --- a/entity/Attribute_entity/Attribute_entity.aod +++ b/entity/Attribute_entity/Attribute_entity.aod @@ -156,6 +156,12 @@ <fieldName>Departments</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>71cfeddd-a315-4692-8299-08813ca1dc19</name> + <entityName>DistrictResponsible_entity</entityName> + <fieldName>Departments</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> @@ -179,6 +185,10 @@ <name>ChildType_param</name> <expose v="false" /> </entityParameter> + <entityParameter> + <name>ParentId_param</name> + <description>parent id, this is used for filtering by the parent in the content process</description> + </entityParameter> </children> </entityProvider> <entityField> diff --git a/entity/DistrictResponsible_entity/DistrictResponsible_entity.aod b/entity/DistrictResponsible_entity/DistrictResponsible_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..32f46b01cfff0fea9e19adf80c2f35c76e738e42 --- /dev/null +++ b/entity/DistrictResponsible_entity/DistrictResponsible_entity.aod @@ -0,0 +1,264 @@ +<?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.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> + <name>DistrictResponsible_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:GLOBE</icon> + <title>Verantwortlicher</title> + <contentTitleProcess>%aditoprj%/entity/DistrictResponsible_entity/contentTitleProcess.js</contentTitleProcess> + <image>VAADIN:GLOBE</image> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>DEPARTMENT_ATTRIBUTE_ID</name> + <title>Department</title> + <consumer>Departments</consumer> + <state>AUTO</state> + <valueProcess>%aditoprj%/entity/DistrictResponsible_entity/entityfields/department_attribute_id/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>EMPLOYEE_CONTACT_ID</name> + <title>{$DISTRICT_RESPONSIBLE}</title> + <consumer>Employees</consumer> + <linkedContext>Person</linkedContext> + <selectionMode>SINGLE</selectionMode> + </entityField> + <entityField> + <name>DISTRICT_ID</name> + <consumer>Districts</consumer> + <valueProcess>%aditoprj%/entity/DistrictResponsible_entity/entityfields/district_id/valueProcess.js</valueProcess> + </entityField> + <entityConsumer> + <name>Departments</name> + <dependency> + <name>dependency</name> + <entityName>Attribute_entity</entityName> + <fieldName>SpecificAttribute</fieldName> + </dependency> + <children> + <entityParameter> + <name>ParentId_param</name> + <valueProcess>%aditoprj%/entity/DistrictResponsible_entity/entityfields/departments/children/parentid_param/valueProcess.js</valueProcess> + <description>parent id, this is used for filtering by the parent in the content process</description> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>Employees</name> + <dependency> + <name>dependency</name> + <entityName>Employee_entity</entityName> + <fieldName>Employees</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>Districts</name> + <dependency> + <name>dependency</name> + <entityName>District_entity</entityName> + <fieldName>Districts</fieldName> + </dependency> + </entityConsumer> + <entityField> + <name>DISTRICTRESPONSIBLEID</name> + </entityField> + <entityField> + <name>USER_NEW</name> + <valueProcess>%aditoprj%/entity/DistrictResponsible_entity/entityfields/user_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_EDIT</name> + <valueProcess>%aditoprj%/entity/DistrictResponsible_entity/entityfields/user_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_NEW</name> + <valueProcess>%aditoprj%/entity/DistrictResponsible_entity/entityfields/date_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_EDIT</name> + <valueProcess>%aditoprj%/entity/DistrictResponsible_entity/entityfields/date_edit/valueProcess.js</valueProcess> + </entityField> + <entityProvider> + <name>DistrictResponsibles</name> + <lookupIdfield>DISTRICTRESPONSIBLEID</lookupIdfield> + <dependencies> + <entityDependency> + <name>ef26fdb6-5fcf-416e-bcc8-380b5751b523</name> + <entityName>District_entity</entityName> + <fieldName>DistrictResponsibles</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + <children> + <entityParameter> + <name>DistrictId_param</name> + <mandatory v="true" /> + </entityParameter> + <entityParameter> + <name>OrgUid_param</name> + <expose v="false" /> + </entityParameter> + </children> + </entityProvider> + <entityParameter> + <name>DistrictId_param</name> + <expose v="true" /> + <mandatory v="false" /> + </entityParameter> + <entityConsumer> + <name>LogHistories</name> + <dependency> + <name>dependency</name> + <entityName>LogHistory_entity</entityName> + <fieldName>LogHistoryProvider</fieldName> + </dependency> + <children> + <entityParameter> + <name>tablenames_param</name> + <valueProcess>%aditoprj%/entity/DistrictResponsible_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>Documents</name> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>Documents</fieldName> + </dependency> + <children> + <entityParameter> + <name>AssignmentRowId_param</name> + <valueProcess>%aditoprj%/entity/DistrictResponsible_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>AssignmentTable_param</name> + <valueProcess>%aditoprj%/entity/DistrictResponsible_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityParameter> + <name>OnlyResponsibles_param</name> + <expose v="true" /> + </entityParameter> + <entityField> + <name>departmentAttributeName</name> + <title>Department</title> + <state>READONLY</state> + <valueProcess>%aditoprj%/entity/DistrictResponsible_entity/entityfields/departmentattributename/valueProcess.js</valueProcess> + </entityField> + <entityProvider> + <name>OrganisationResponsibles</name> + <dependencies> + <entityDependency> + <name>9c2fe0da-9456-44ef-ac6c-28ac234b35f7</name> + <entityName>Organisation_entity</entityName> + <fieldName>DistrictResponsibles</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>7e71479b-8f39-4cd8-a31e-fac43df426d6</name> + <entityName>Salesproject_entity</entityName> + <fieldName>DistrictResponsibles</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>97a448e1-05fb-4e42-ba83-11b419034f08</name> + <entityName>Member_entity</entityName> + <fieldName>DistrictResponsibles</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + <children> + <entityParameter> + <name>DistrictId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OnlyResponsibles_param</name> + <expose v="false" /> + </entityParameter> + </children> + </entityProvider> + <entityParameter> + <name>OrgUid_param</name> + <expose v="true" /> + </entityParameter> + <entityProvider> + <name>#PROVIDER_AGGREGATES</name> + <useAggregates v="true" /> + </entityProvider> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <isPageable v="false" /> + <conditionProcess>%aditoprj%/entity/DistrictResponsible_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <cacheType>GLOBAL</cacheType> + <cacheKeyProcess>%aditoprj%/entity/DistrictResponsible_entity/recordcontainers/db/cacheKeyProcess.js</cacheKeyProcess> + <linkInformation> + <linkInformation> + <name>d659c49e-363d-4a1a-93a5-1abcfcf9e51c</name> + <tableName>DISTRICTRESPONSIBLE</tableName> + <primaryKey>DISTRICTRESPONSIBLEID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>DEPARTMENT_ATTRIBUTE_ID.value</name> + <recordfield>DISTRICTRESPONSIBLE.DEPARTMENT_ATTRIBUTE_ID</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DISTRICT_ID.value</name> + <recordfield>DISTRICTRESPONSIBLE.DISTRICT_ID</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>EMPLOYEE_CONTACT_ID.value</name> + <recordfield>DISTRICTRESPONSIBLE.EMPLOYEE_CONTACT_ID</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DISTRICTRESPONSIBLEID.value</name> + <recordfield>DISTRICTRESPONSIBLE.DISTRICTRESPONSIBLEID</recordfield> + <isFilterable v="false" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_EDIT.value</name> + <recordfield>DISTRICTRESPONSIBLE.USER_EDIT</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_NEW.value</name> + <recordfield>DISTRICTRESPONSIBLE.USER_NEW</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_EDIT.value</name> + <recordfield>DISTRICTRESPONSIBLE.DATE_EDIT</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>DISTRICTRESPONSIBLE.DATE_NEW</recordfield> + <isFilterable v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>EMPLOYEE_CONTACT_ID.displayValue</name> + <expression>%aditoprj%/entity/DistrictResponsible_entity/recordcontainers/db/recordfieldmappings/employee_contact_id.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DEPARTMENT_ATTRIBUTE_ID.displayValue</name> + <recordfield>DISTRICTRESPONSIBLE.DEPARTMENT_ATTRIBUTE_ID</recordfield> + <expression>%aditoprj%/entity/DistrictResponsible_entity/recordcontainers/db/recordfieldmappings/department_attribute_id.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/DistrictResponsible_entity/contentTitleProcess.js b/entity/DistrictResponsible_entity/contentTitleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..67d21cf41ffa951498384284c6ebdd2490f0a84e --- /dev/null +++ b/entity/DistrictResponsible_entity/contentTitleProcess.js @@ -0,0 +1,12 @@ +import("system.logging"); +import("system.vars"); +import("system.result"); +import("Employee_lib"); + +var contactId = vars.get("$field.EMPLOYEE_CONTACT_ID"); +var res = ""; + +if(contactId) + res = EmployeeUtils.getUsersDepartment(contactId, true); + +result.string(res) \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/entityfields/collecteddistrictids_param/valueProcess.js b/entity/DistrictResponsible_entity/entityfields/collecteddistrictids_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..552eea46c92f4961345312281fc17d80b6310724 --- /dev/null +++ b/entity/DistrictResponsible_entity/entityfields/collecteddistrictids_param/valueProcess.js @@ -0,0 +1,52 @@ +import("system.entities"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + +var orgUid = vars.get("$param.OrgUid_param"); + +if(orgUid) +{ + var orgDistrictIds = getDistrictIdsByOrgUid(orgUid); + orgDistrictIds = JSON.stringify(orgDistrictIds); +} else { + orgDistrictIds = JSON.stringify([]); +} + +result.string(orgDistrictIds); + +function _getDistrictIdsByOrgUid(pOrgUid) { + + var districtIds = []; + var nonMatchedId = []; + var loadingRowsConfig = entities.createConfigForLoadingRows() + .entity("District_entity") + .fields(["#UID", "appliedFilter", "DISTRICT_NAME", "PARENTDISTRICT_ID"]); + var districtRows = entities.getRows(loadingRowsConfig); + + for (i = 0; i < districtRows.length; i++) { + + if (districtRows[i]["PARENTDISTRICT_ID"] in nonMatchedId) + { + nonMatchedId.push(districtRows[i]["#UID"]); + continue; + } else { + var filter = JSON.stringify(JSON.parse(districtRows[i]["appliedFilter"]).filter); + var rowCountConfig = entities.createConfigForLoadingRows() + .entity("Organisation_entity") + .uid(pOrgUid) + //.provider() + .filter(filter); + + var rowCount = entities.getRowCount(rowCountConfig); + + if (rowCount > 0) + { + districtIds.push(districtRows[i]["#UID"]); + } else { + nonMatchedId.push(districtRows[i]["#UID"]); + } + } + } + return districtIds; +} \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/entityfields/date_edit/valueProcess.js b/entity/DistrictResponsible_entity/entityfields/date_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..054ad94ce22cb654da8b7caf533ffefc5219d21f --- /dev/null +++ b/entity/DistrictResponsible_entity/entityfields/date_edit/valueProcess.js @@ -0,0 +1,13 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); + + +var currentDate = null; + +if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT) +{ + currentDate = vars.get("$sys.date"); +} + +result.string(currentDate); \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/entityfields/date_new/valueProcess.js b/entity/DistrictResponsible_entity/entityfields/date_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..032607ee56724f30881fec7bad289679ce944e4f --- /dev/null +++ b/entity/DistrictResponsible_entity/entityfields/date_new/valueProcess.js @@ -0,0 +1,13 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); + + +var currentDate = null; + +if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) +{ + currentDate = vars.get("$sys.date"); +} + +result.string(currentDate); \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/entityfields/department_attribute_id/valueProcess.js b/entity/DistrictResponsible_entity/entityfields/department_attribute_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3474c5398a8b48f35e4cd6f82297fecafb9e8928 --- /dev/null +++ b/entity/DistrictResponsible_entity/entityfields/department_attribute_id/valueProcess.js @@ -0,0 +1,12 @@ +import("system.vars"); +import("system.result"); +import("system.tools"); + +var employeesContactId = vars.get("$field.EMPLOYEE_CONTACT_ID"); +var departmentsAttrId = "" +if (employeesContactId) +{ + departmentsAttrId = tools.getUsersByAttribute(tools.CONTACTID, [employeesContactId])[0][tools.PARAMS].department; +} + +result.string(departmentsAttrId); \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/entityfields/departmentattributename/valueProcess.js b/entity/DistrictResponsible_entity/entityfields/departmentattributename/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7fac5c4e3942f0e9442d679d78370ba7136b96d6 --- /dev/null +++ b/entity/DistrictResponsible_entity/entityfields/departmentattributename/valueProcess.js @@ -0,0 +1,15 @@ +import("system.logging"); +import("system.vars"); +import("system.result"); +import("Attribute_lib"); + + +var departmentAttrId = vars.get("$field.DEPARTMENT_ATTRIBUTE_ID"); +var departmentDisplayName = ""; + +if (departmentAttrId) +{ + departmentDisplayName = AttributeUtil.getSimpleAttributeName(departmentAttrId, true); +} + +result.string(departmentDisplayName); \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/entityfields/departments/children/parentid_param/valueProcess.js b/entity/DistrictResponsible_entity/entityfields/departments/children/parentid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..246beece1e0537e3649fa0eeda40218eaa852864 --- /dev/null +++ b/entity/DistrictResponsible_entity/entityfields/departments/children/parentid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("AttributeRegistry_basic"); +import("system.result"); + +result.string($AttributeRegistry.departments()); \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/entityfields/district_id/valueProcess.js b/entity/DistrictResponsible_entity/entityfields/district_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..2cc037e5096fd131d431504c70793f49767f701d --- /dev/null +++ b/entity/DistrictResponsible_entity/entityfields/district_id/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.vars"); + +result.string(vars.get("$param.DistrictId_param")); \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js b/entity/DistrictResponsible_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..51e13bb7a66c51fe725941ddaad7f9b7e5ce884f --- /dev/null +++ b/entity/DistrictResponsible_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.vars"); + +result.string(vars.get("$field.DISTRICTRESPONSIBLEID")); \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js b/entity/DistrictResponsible_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b5a701f96e3402a647a7a6b8a1bd6e97c4a93769 --- /dev/null +++ b/entity/DistrictResponsible_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string("DISTRICTRESPONSIBLE"); \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js b/entity/DistrictResponsible_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7e27434b585fb39f99361fb42945e1c97a68d173 --- /dev/null +++ b/entity/DistrictResponsible_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js @@ -0,0 +1,9 @@ +import("system.vars"); +import("system.result"); +import("Context_lib"); + +var res = [{id: vars.get("$field.DISTRICTRESPONSIBLEID"), tableNames: ["DISTRICTRESPONSIBLE"]}]; + +res = JSON.stringify(res);//currently only strings can be passed as param + +result.object(res); \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/entityfields/user_edit/valueProcess.js b/entity/DistrictResponsible_entity/entityfields/user_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a55cb327464d6def9b94735913c25ffb5e4328ef --- /dev/null +++ b/entity/DistrictResponsible_entity/entityfields/user_edit/valueProcess.js @@ -0,0 +1,13 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); + + +var currentUser = null; + +if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT) +{ + currentUser = vars.get("$sys.user"); +} + +result.string(currentUser); \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/entityfields/user_new/valueProcess.js b/entity/DistrictResponsible_entity/entityfields/user_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..1411b9ac93e217a76a876371a2609ff9464f4997 --- /dev/null +++ b/entity/DistrictResponsible_entity/entityfields/user_new/valueProcess.js @@ -0,0 +1,13 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); + + +var currentUser = null; + +if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) +{ + currentUser = vars.get("$sys.user"); +} + +result.string(currentUser); \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/recordcontainers/db/cacheKeyProcess.js b/entity/DistrictResponsible_entity/recordcontainers/db/cacheKeyProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..37bf4d68be0ead0d1b35f9f14e70f7b867a2a5db --- /dev/null +++ b/entity/DistrictResponsible_entity/recordcontainers/db/cacheKeyProcess.js @@ -0,0 +1,7 @@ +import("CachedRecordContainer_lib"); +import("system.result"); + + +var cacheKey = CachedRecordContainerUtils.getCommonKey("$param.DistrictId_param", "$param.CollectedDistrictIds_param"); + +result.string(cacheKey); \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/recordcontainers/db/conditionProcess.js b/entity/DistrictResponsible_entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7fc53ff212fd1e02a81cb2657710820699eaf2ac --- /dev/null +++ b/entity/DistrictResponsible_entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,57 @@ +import("system.entities"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + +var districtId = vars.get("$param.DistrictId_param"); +//var onlyResponsibles = vars.get("$param.OnlyResponsibles_param"); +var orgUid = vars.get("$param.OrgUid_param"); +var cond; + +if (districtId) +{ + cond = newWhere("DISTRICTRESPONSIBLE.DISTRICT_ID", districtId); +} +else if(orgUid) +{ + var orgDistrictIds = getDistrictIdsByOrgUid(orgUid); + cond = newWhere("DISTRICTRESPONSIBLE.DISTRICT_ID", orgDistrictIds, SqlBuilder.IN()); +} + +result.string(cond.toString()); + +function getDistrictIdsByOrgUid(pOrgUid) { + + var districtIds = []; + var nonMatchedId = []; + var loadingRowsConfig = entities.createConfigForLoadingRows() + .entity("District_entity") + .fields(["#UID", "appliedFilter", "DISTRICT_NAME", "PARENTDISTRICT_ID"]); + var districtRows = entities.getRows(loadingRowsConfig); + + for (i = 0; i < districtRows.length; i++) { + + if (districtRows[i]["PARENTDISTRICT_ID"] in nonMatchedId) + { + nonMatchedId.push(districtRows[i]["#UID"]); + continue; + } else { + var filter = JSON.stringify(JSON.parse(districtRows[i]["appliedFilter"]).filter); + var rowCountConfig = entities.createConfigForLoadingRows() + .entity("Organisation_entity") + .uid(pOrgUid) + //.provider() + .filter(filter); + + var rowCount = entities.getRowCount(rowCountConfig); + + if (rowCount > 0) + { + districtIds.push(districtRows[i]["#UID"]); + } else { + nonMatchedId.push(districtRows[i]["#UID"]); + } + } + } + return districtIds; +} \ No newline at end of file diff --git a/entity/DistrictResponsible_entity/recordcontainers/db/recordfieldmappings/employee_contact_id.displayvalue/expression.js b/entity/DistrictResponsible_entity/recordcontainers/db/recordfieldmappings/employee_contact_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..2dd8e6a8686055b27892337fab5ddaf48e405703 --- /dev/null +++ b/entity/DistrictResponsible_entity/recordcontainers/db/recordfieldmappings/employee_contact_id.displayvalue/expression.js @@ -0,0 +1,16 @@ +import("system.logging"); +import("system.result"); +import("Contact_lib"); +import("Sql_lib"); + + +var contact = Contact.createWithColumnPreset(); +var renderer = new ContactTitleRenderer(contact, ContactTitleRenderer.OPTIONS.NoOption); +var selectExpression = renderer.asSql(); + +result.string(newSelect(selectExpression) + .from("CONTACT") + .leftJoin("PERSON", "PERSON.PERSONID = CONTACT.PERSON_ID") + .leftJoin("ORGANISATION", "ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID") + .where("CONTACT.CONTACTID = DISTRICTRESPONSIBLE.EMPLOYEE_CONTACT_ID") + .toString()); diff --git a/entity/District_entity/District_entity.aod b/entity/District_entity/District_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..5748ce859c9d86633a71e260c3c162d2841bed4d --- /dev/null +++ b/entity/District_entity/District_entity.aod @@ -0,0 +1,341 @@ +<?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.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> + <name>District_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:GLOBE</icon> + <title>District definition</title> + <contentTitleProcess>%aditoprj%/entity/District_entity/contentTitleProcess.js</contentTitleProcess> + <afterUiInit>%aditoprj%/entity/District_entity/afterUiInit.js</afterUiInit> + <titlePlural></titlePlural> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>DISTRICT_NAME</name> + <title>Name</title> + <groupable v="true" /> + <mandatory v="true" /> + </entityField> + <entityField> + <name>DISTRICT_NUMBER</name> + <title>{$DISTRICT_NUMBER}</title> + <contentType>TEXT</contentType> + <groupable v="true" /> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/district_number/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/District_entity/entityfields/district_number/displayValueProcess.js</displayValueProcess> + <onValidation>%aditoprj%/entity/District_entity/entityfields/district_number/onValidation.js</onValidation> + </entityField> + <entityField> + <name>DISTRICT_INFO</name> + <title>Information</title> + <contentType>LONG_TEXT</contentType> + </entityField> + <entityField> + <name>DISTRICTID</name> + </entityField> + <entityField> + <name>DISTRICT_STATUS</name> + <title>Status</title> + <groupable v="true" /> + <mandatory v="true" /> + <dropDownProcess>%aditoprj%/entity/District_entity/entityfields/district_status/dropDownProcess.js</dropDownProcess> + <selectionMode>SINGLE</selectionMode> + </entityField> + <entityField> + <name>PARENTDISTRICT_DISTRICTID</name> + <title>{$DISTRICT_PARENT_DISTRICT}</title> + <consumer>ParentDistricts</consumer> + <dropDownProcess>%aditoprj%/entity/District_entity/entityfields/parentdistrict_districtid/dropDownProcess.js</dropDownProcess> + <stateProcess>%aditoprj%/entity/District_entity/entityfields/parentdistrict_districtid/stateProcess.js</stateProcess> + <displayValueProcess>%aditoprj%/entity/District_entity/entityfields/parentdistrict_districtid/displayValueProcess.js</displayValueProcess> + <onValueChange>%aditoprj%/entity/District_entity/entityfields/parentdistrict_districtid/onValueChange.js</onValueChange> + <onValueChangeTypes> + <element>MASK</element> + <element>PROCESS</element> + <element>PROCESS_SETVALUE</element> + </onValueChangeTypes> + </entityField> + <entityField> + <name>DISTRICT_FILTER</name> + <title>District Filter</title> + <contentType>FILTER_TREE</contentType> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/district_filter/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>customerCounting</name> + <title>Customer counting</title> + <groupable v="true" /> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/customercounting/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>totalTurnover</name> + <title>{$DISTRICT_TOTAL_TURNOVER}</title> + <groupable v="true" /> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/totalturnover/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>ISO3</name> + <title>Language</title> + <consumer>Languages</consumer> + <groupable v="true" /> + <displayValueProcess>%aditoprj%/entity/District_entity/entityfields/iso3/displayValueProcess.js</displayValueProcess> + </entityField> + <entityProvider> + <name>Districts</name> + <lookupIdfield>DISTRICTID</lookupIdfield> + <recordContainer>db</recordContainer> + <dependencies> + <entityDependency> + <name>291c0ca4-5a68-45f5-80a7-745c7df56d7c</name> + <entityName>DistrictResponsible_entity</entityName> + <fieldName>Districts</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>d2c383ee-7b5d-4242-b598-8343c1133fdd</name> + <entityName>District_entity</entityName> + <fieldName>ParentDistricts</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityConsumer> + <name>Languages</name> + <dependency> + <name>dependency</name> + <entityName>Language_entity</entityName> + <fieldName>ISO3Name</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>DistrictResponsibles</name> + <dependency> + <name>dependency</name> + <entityName>DistrictResponsible_entity</entityName> + <fieldName>DistrictResponsibles</fieldName> + </dependency> + <children> + <entityParameter> + <name>DistrictId_param</name> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/districtresponsibles/children/districtid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>USER_NEW</name> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/user_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_EDIT</name> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/user_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_NEW</name> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/date_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_EDIT</name> + <groupable v="false" /> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/date_edit/valueProcess.js</valueProcess> + </entityField> + <entityConsumer> + <name>Organisations</name> + <refreshParent v="true" /> + <dependency> + <name>dependency</name> + <entityName>Organisation_entity</entityName> + <fieldName>Organisations</fieldName> + </dependency> + <children> + <entityParameter> + <name>FilterPreSet_param</name> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/organisations/children/filterpreset_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityFieldGroup> + <name>DISTRICT_NUMBER_fieldGroup</name> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/district_number_fieldgroup/valueProcess.js</valueProcess> + <title>{$DISTRICT_NO}</title> + <fields> + <element>DISTRICT_NUMBER</element> + </fields> + </entityFieldGroup> + <entityConsumer> + <name>ParentDistricts</name> + <dependency> + <name>dependency</name> + <entityName>#ENTITY</entityName> + <fieldName>Districts</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>Documents</name> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>Documents</fieldName> + </dependency> + <children> + <entityParameter> + <name>AssignmentRowId_param</name> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>AssignmentTable_param</name> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>LogHistories</name> + <dependency> + <name>dependency</name> + <entityName>LogHistory_entity</entityName> + <fieldName>LogHistoryProvider</fieldName> + </dependency> + <children> + <entityParameter> + <name>tablenames_param</name> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/logs/children/tablenames_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>parentFilter</name> + <title>Parent Filter</title> + <contentType>FILTER_TREE</contentType> + <state>READONLY</state> + <stateProcess>%aditoprj%/entity/District_entity/entityfields/parentfilter/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/parentfilter/valueProcess.js</valueProcess> + <onValueChange>%aditoprj%/entity/District_entity/entityfields/parentfilter/onValueChange.js</onValueChange> + </entityField> + <entityParameter> + <name>OnlyResponsibleDistricts</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>DistrictIdByOrgId_param</name> + <expose v="true" /> + </entityParameter> + <entityField> + <name>appliedFilter</name> + <valueProcess>%aditoprj%/entity/District_entity/entityfields/appliedfilter/valueProcess.js</valueProcess> + <onValueChange>%aditoprj%/entity/District_entity/entityfields/appliedfilter/onValueChange.js</onValueChange> + <onValueChangeTypes> + <element>MASK</element> + <element>PROCESS</element> + <element>PROCESS_SETVALUE</element> + <element>RECORD</element> + </onValueChangeTypes> + </entityField> + <entityProvider> + <name>#PROVIDER_AGGREGATES</name> + <useAggregates v="true" /> + </entityProvider> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <isPageable v="false" /> + <conditionProcess>%aditoprj%/entity/District_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <orderClauseProcess>%aditoprj%/entity/District_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> + <cacheType>GLOBAL</cacheType> + <cacheKeyProcess>%aditoprj%/entity/District_entity/recordcontainers/db/cacheKeyProcess.js</cacheKeyProcess> + <linkInformation> + <linkInformation> + <name>b8398641-f97b-43e4-8f2c-beda8690ab2f</name> + <tableName>DISTRICT</tableName> + <primaryKey>DISTRICTID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>DATE_EDIT.value</name> + <recordfield>DISTRICT.DATE_EDIT</recordfield> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>DISTRICT.DATE_NEW</recordfield> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DISTRICT_FILTER.value</name> + <recordfield>DISTRICT.DISTRICT_FILTER</recordfield> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DISTRICT_INFO.value</name> + <recordfield>DISTRICT.DISTRICT_INFO</recordfield> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DISTRICT_NAME.value</name> + <recordfield>DISTRICT.DISTRICT_NAME</recordfield> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DISTRICT_NUMBER.value</name> + <recordfield>DISTRICT.DISTRICT_NUMBER</recordfield> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DISTRICT_STATUS.value</name> + <recordfield>DISTRICT.DISTRICT_STATUS</recordfield> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DISTRICTID.value</name> + <recordfield>DISTRICT.DISTRICTID</recordfield> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ISO3.value</name> + <recordfield>DISTRICT.ISO3</recordfield> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PARENTDISTRICT_DISTRICTID.value</name> + <recordfield>DISTRICT.PARENTDISTRICT_DISTRICTID</recordfield> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_EDIT.value</name> + <recordfield>DISTRICT.USER_EDIT</recordfield> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_NEW.value</name> + <recordfield>DISTRICT.USER_NEW</recordfield> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PARENTDISTRICT_DISTRICTID.displayValue</name> + <expression>%aditoprj%/entity/District_entity/recordcontainers/db/recordfieldmappings/parent_district.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>appliedFilter.value</name> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>customerCounting.value</name> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>parentFilter.value</name> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>totalTurnover.value</name> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/District_entity/afterUiInit.js b/entity/District_entity/afterUiInit.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/District_entity/contentTitleProcess.js b/entity/District_entity/contentTitleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..638819b3523dc19485ac772e4f6e5a539b4daf0c --- /dev/null +++ b/entity/District_entity/contentTitleProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.DISTRICT_NAME")); \ No newline at end of file diff --git a/entity/District_entity/entityfields/appliedfilter/onValueChange.js b/entity/District_entity/entityfields/appliedfilter/onValueChange.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/District_entity/entityfields/appliedfilter/valueProcess.js b/entity/District_entity/entityfields/appliedfilter/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..253bd0712af0b47b35aaa72b8d027fc9d053526d --- /dev/null +++ b/entity/District_entity/entityfields/appliedfilter/valueProcess.js @@ -0,0 +1,37 @@ +import("system.result"); +import("system.vars"); + +var parentFilter = vars.get("$field.parentFilter"); +var districtFilter = vars.get("$field.DISTRICT_FILTER"); + +var appliedFilter = { + entity: "Organisation_entity", + filter: { + type: "group", + operator: "AND", + childs: [] +}}; + +if (parentFilter) +{ + appliedFilter.filter.childs.push(JSON.parse(parentFilter).filter); +} +if (districtFilter) +{ + //appliedFilter = _getApplicableFilter(appliedFilter, districtFilter); + appliedFilter.filter.childs.push(JSON.parse(districtFilter).filter); +} + +result.string(JSON.stringify(appliedFilter)); + +filterArray = []; + +function _getApplicableFilter(pFilter, pAppendFilter){ + + var applicableFilter = ""; + var childFilter = JSON.parse(pFilter).filter; + + + + return applicableFilter; +} \ No newline at end of file diff --git a/entity/District_entity/entityfields/customercounting/valueProcess.js b/entity/District_entity/entityfields/customercounting/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ccecd79603fe711a4705cd3fe0a6081a800986cc --- /dev/null +++ b/entity/District_entity/entityfields/customercounting/valueProcess.js @@ -0,0 +1,24 @@ +import("system.logging"); +import("system.vars"); +import("system.result"); +import("system.entities"); +import("system.neon"); + +var appliedFilter = vars.get("$field.appliedFilter"); +var conf, rowCount = 0; + +if (appliedFilter) +{ + appliedFilter = JSON.parse(appliedFilter).filter; + appliedFilter = JSON.stringify(appliedFilter); + + conf = entities.createConfigForLoadingRows() + .entity("Organisation_entity") + .fields(["ORGANISATIONID"]) + .filter(appliedFilter); + + rowCount = entities.getRowCount(conf); +} + + +result.string(rowCount); \ No newline at end of file diff --git a/entity/District_entity/entityfields/date_edit/valueProcess.js b/entity/District_entity/entityfields/date_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..054ad94ce22cb654da8b7caf533ffefc5219d21f --- /dev/null +++ b/entity/District_entity/entityfields/date_edit/valueProcess.js @@ -0,0 +1,13 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); + + +var currentDate = null; + +if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT) +{ + currentDate = vars.get("$sys.date"); +} + +result.string(currentDate); \ No newline at end of file diff --git a/entity/District_entity/entityfields/date_new/valueProcess.js b/entity/District_entity/entityfields/date_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..032607ee56724f30881fec7bad289679ce944e4f --- /dev/null +++ b/entity/District_entity/entityfields/date_new/valueProcess.js @@ -0,0 +1,13 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); + + +var currentDate = null; + +if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) +{ + currentDate = vars.get("$sys.date"); +} + +result.string(currentDate); \ No newline at end of file diff --git a/entity/District_entity/entityfields/district_filter/valueProcess.js b/entity/District_entity/entityfields/district_filter/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..f184154fd9e40e1aef1e59d59efb97b7310f33ee --- /dev/null +++ b/entity/District_entity/entityfields/district_filter/valueProcess.js @@ -0,0 +1,27 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); +import("Sql_lib"); + + +var currentFilter = vars.get("$this.value"); +var entity = "Organisation_entity"; +var emptyFilter = { + entity: entity, + filter: { + type: "group", + operator: "AND", + childs: [] + } +}; + + +if (currentFilter) + currentFilter = JSON.parse(currentFilter); + +//if the filter field is empty or if the entity was changed, reset the filter +if (!currentFilter || currentFilter.entity != emptyFilter.entity) +{ + var condJson = JSON.stringify(emptyFilter); + result.string(condJson); +} \ No newline at end of file diff --git a/entity/District_entity/entityfields/district_number/displayValueProcess.js b/entity/District_entity/entityfields/district_number/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..95a9d9d10972827b4d89b9f4ad7aa68161204049 --- /dev/null +++ b/entity/District_entity/entityfields/district_number/displayValueProcess.js @@ -0,0 +1,10 @@ +import("system.vars"); +import("system.logging"); +import("system.result"); +import("system.neon"); +import("Sql_lib"); + + +var districtNo = vars.get("$field.DISTRICT_NUMBER"); + +result.string(districtNo.padStart(4, '0')); diff --git a/entity/District_entity/entityfields/district_number/onValidation.js b/entity/District_entity/entityfields/district_number/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..33392435cc69fabaa74c0d64eb48848b90674fc6 --- /dev/null +++ b/entity/District_entity/entityfields/district_number/onValidation.js @@ -0,0 +1,18 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); +import("system.translate"); +import("Sql_lib"); + + +var localValue = vars.get("$local.value"); +var value = vars.get("$field.DISTRICT_NUMBER"); +var biggestDistrictNo = newSelect("MAX(DISTRICT_NUMBER)").from("DISTRICT").cell(); + +if (localValue) +{ + if (Number(localValue) <= Number(biggestDistrictNo) && Number(localValue) != Number(value)) + { + result.string(translate.withArguments("The district no has to be bigger than %0", [biggestDistrictNo])); + } +} \ No newline at end of file diff --git a/entity/District_entity/entityfields/district_number/valueProcess.js b/entity/District_entity/entityfields/district_number/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3e307b09a5f62a6e669170e08eb49aac6f036fee --- /dev/null +++ b/entity/District_entity/entityfields/district_number/valueProcess.js @@ -0,0 +1,21 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); +import("Sql_lib"); + + +var returnableDistrictNo = null; +var thisValue = vars.get("this.value"); +var previousDistrictNo = newSelect("COUNT(*)").from("DISTRICT").cell(); + +if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) +{ + if (previousDistrictNo != Number(previousDistrictNo)+1 && !thisValue) + { + returnableDistrictNo = Number(previousDistrictNo)+1; + } else{ + + } +} + +result.string(returnableDistrictNo); \ No newline at end of file diff --git a/entity/District_entity/entityfields/district_number_fieldgroup/valueProcess.js b/entity/District_entity/entityfields/district_number_fieldgroup/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..33857cd9988203551e8ec559931de007c78e462f --- /dev/null +++ b/entity/District_entity/entityfields/district_number_fieldgroup/valueProcess.js @@ -0,0 +1,7 @@ +import("system.vars"); +import("system.result"); +import("system.translate"); + +var districtNo = vars.get("$field.DISTRICT_NUMBER"); + +result.string(translate.text("District No.:") + " " + districtNo.padStart(4, '0')); \ No newline at end of file diff --git a/entity/District_entity/entityfields/district_status/dropDownProcess.js b/entity/District_entity/entityfields/district_status/dropDownProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..43063fe007d6d15d886c7cdd4bc624d7f2ddecf4 --- /dev/null +++ b/entity/District_entity/entityfields/district_status/dropDownProcess.js @@ -0,0 +1,9 @@ +import("system.result"); +import("system.translate"); + +var selectableOptions = new Array(); + +selectableOptions[0] = translate.text("Active"); +selectableOptions[1] = translate.text("Inactive"); + +result.object(selectableOptions); \ No newline at end of file diff --git a/entity/District_entity/entityfields/districtresponsibles/children/districtid_param/valueProcess.js b/entity/District_entity/entityfields/districtresponsibles/children/districtid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d3d1d4b6cb94a84199fdc7783e0194a1a7255152 --- /dev/null +++ b/entity/District_entity/entityfields/districtresponsibles/children/districtid_param/valueProcess.js @@ -0,0 +1,5 @@ +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/documents/children/assignmentrowid_param/valueProcess.js b/entity/District_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9e43ccb56de5d1eec96b494b8780ed76fee0a034 --- /dev/null +++ b/entity/District_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.DISTRICTID")); \ No newline at end of file diff --git a/entity/District_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js b/entity/District_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8a6858d63bdfcd7a5877551916d5725825758863 --- /dev/null +++ b/entity/District_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string("DISTRICT"); \ No newline at end of file diff --git a/entity/District_entity/entityfields/iso3/displayValueProcess.js b/entity/District_entity/entityfields/iso3/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d951329b1376a125deb9c072c0d0f8f76a5cc328 --- /dev/null +++ b/entity/District_entity/entityfields/iso3/displayValueProcess.js @@ -0,0 +1,5 @@ +import("Context_lib"); +import("system.vars"); +import("system.result"); + +result.string(ContextUtils.loadContentTitle("Language_entity", vars.get("$field.ISO3"))); \ No newline at end of file diff --git a/entity/District_entity/entityfields/logs/children/tablenames_param/valueProcess.js b/entity/District_entity/entityfields/logs/children/tablenames_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..20ea9507113c01c54feb25d50022a77f7d111462 --- /dev/null +++ b/entity/District_entity/entityfields/logs/children/tablenames_param/valueProcess.js @@ -0,0 +1,9 @@ +import("system.vars"); +import("system.result"); +import("Context_lib"); + +var res = [{id: vars.get("$field.DISTRICTID"), tableNames: ["DISTRICT"]}]; + +res = JSON.stringify(res);//currently only strings can be passed as param + +result.object(res); \ No newline at end of file diff --git a/entity/District_entity/entityfields/organisations/children/filterpreset_param/valueProcess.js b/entity/District_entity/entityfields/organisations/children/filterpreset_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8ca4bf12840a2f9193816b3411c4f55bf41662fc --- /dev/null +++ b/entity/District_entity/entityfields/organisations/children/filterpreset_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.vars"); + +result.string(JSON.stringify(JSON.parse(vars.get("$field.appliedFilter")).filter)); \ No newline at end of file diff --git a/entity/District_entity/entityfields/parentdistrict_districtid/displayValueProcess.js b/entity/District_entity/entityfields/parentdistrict_districtid/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a90a11a8f75217e38b2801567c29527b5b3b8191 --- /dev/null +++ b/entity/District_entity/entityfields/parentdistrict_districtid/displayValueProcess.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); +import("Sql_lib"); + +var parentDistrictId = vars.get("$field.PARENTDISTRICT_DISTRICTID"); +var parentDistrictName = newSelect("DISTRICT.DISTRICT_NAME").from("DISTRICT").where("DISTRICT.DISTRICTID", parentDistrictId).cell(); + +result.string(parentDistrictName); \ No newline at end of file diff --git a/entity/District_entity/entityfields/parentdistrict_districtid/onValueChange.js b/entity/District_entity/entityfields/parentdistrict_districtid/onValueChange.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/District_entity/entityfields/parentdistrict_districtid/stateProcess.js b/entity/District_entity/entityfields/parentdistrict_districtid/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/District_entity/entityfields/parentfilter/stateProcess.js b/entity/District_entity/entityfields/parentfilter/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a8368fb6d4da5006d6e2ab9045d62360c81497f6 --- /dev/null +++ b/entity/District_entity/entityfields/parentfilter/stateProcess.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if (!vars.get("$field.parentFilter") || !vars.get("$field.PARENTDISTRICT_DISTRICTID")) + result.string(neon.COMPONENTSTATE_DISABLED); +else + result.string(neon.COMPONENTSTATE_READONLY); \ No newline at end of file diff --git a/entity/District_entity/entityfields/parentfilter/valueProcess.js b/entity/District_entity/entityfields/parentfilter/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e1c0dfd89d6d147325bc77eb3fe1e1b452c6793e --- /dev/null +++ b/entity/District_entity/entityfields/parentfilter/valueProcess.js @@ -0,0 +1,64 @@ +import("system.result"); +import("system.vars"); +import("system.neon"); +import("Sql_lib"); + +var res = ""; +var parentDistrictId = vars.get("$field.PARENTDISTRICT_DISTRICTID"); + +if (parentDistrictId) +{ + var completeParentFilter = _getParentFilter(parentDistrictId, null); + completeParentFilter.entity = "Organisation_entity"; + res = completeParentFilter; +} +else +{ + var entity = "Organisation_entity"; + var emptyFilter = { + entity: entity, + filter: { + type: "group", + operator: "AND", + childs: [] + } + }; + + res = emptyFilter; +} + +result.string(JSON.stringify(res)); + + +function _getParentFilter(pParentDistrictId, pPreviousFilter) +{ + var resFilter; + + if (pPreviousFilter != null) + { + resFilter = pPreviousFilter; + } + + if (pParentDistrictId) + { + var parentDistrictFilter, grandParentDistrict; + [parentDistrictFilter, grandParentDistrict] = newSelect(["DISTRICT.DISTRICT_FILTER", "DISTRICT.PARENTDISTRICT_DISTRICTID"]) + .from("DISTRICT") + .where("DISTRICT.DISTRICTID", pParentDistrictId) + .arrayRow(); + + parentDistrictFilter = JSON.parse(parentDistrictFilter); + + if (pPreviousFilter) + parentDistrictFilter.filter.childs.push(resFilter.filter);//todo: kommentar ergänzen was wir heir eigentlcih machen + + resFilter = parentDistrictFilter; + + if (grandParentDistrict.length > 0) + { + resFilter = _getParentFilter(grandParentDistrict, resFilter); + } + } + + return resFilter; +} \ No newline at end of file diff --git a/entity/District_entity/entityfields/totalturnover/valueProcess.js b/entity/District_entity/entityfields/totalturnover/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d63350d1cb18c577a222613ef77f6dd22f8d36fa --- /dev/null +++ b/entity/District_entity/entityfields/totalturnover/valueProcess.js @@ -0,0 +1,27 @@ +import("system.logging"); +import("system.vars"); +import("system.result"); +import("system.entities"); +import("system.neon"); + +var appliedFilter = vars.get("$field.DISTRICT_FILTER"); +var conf, rows, districtTurnover = 0; + +if (appliedFilter) +{ + appliedFilter = JSON.parse(appliedFilter).filter; + appliedFilter = JSON.stringify(appliedFilter); + + conf = entities.createConfigForLoadingRows() + .entity("Organisation_entity") + .fields(["TurnoverCurrentYear"]) + .filter(appliedFilter); + + rows = entities.getRows(conf); + + for (i = 0; i < rows.length; i++) { + appliedFilter += Number(rows[i].TurnoverCurrentYear); + } +} + +result.string(districtTurnover); \ No newline at end of file diff --git a/entity/District_entity/entityfields/user_edit/valueProcess.js b/entity/District_entity/entityfields/user_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a55cb327464d6def9b94735913c25ffb5e4328ef --- /dev/null +++ b/entity/District_entity/entityfields/user_edit/valueProcess.js @@ -0,0 +1,13 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); + + +var currentUser = null; + +if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT) +{ + currentUser = vars.get("$sys.user"); +} + +result.string(currentUser); \ No newline at end of file diff --git a/entity/District_entity/entityfields/user_new/valueProcess.js b/entity/District_entity/entityfields/user_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..1411b9ac93e217a76a876371a2609ff9464f4997 --- /dev/null +++ b/entity/District_entity/entityfields/user_new/valueProcess.js @@ -0,0 +1,13 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); + + +var currentUser = null; + +if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) +{ + currentUser = vars.get("$sys.user"); +} + +result.string(currentUser); \ No newline at end of file diff --git a/entity/District_entity/recordcontainers/db/cacheKeyProcess.js b/entity/District_entity/recordcontainers/db/cacheKeyProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..4e5a7a89391853d20e3bc5f9ff7171e85914b0dd --- /dev/null +++ b/entity/District_entity/recordcontainers/db/cacheKeyProcess.js @@ -0,0 +1,9 @@ +import("CachedRecordContainer_lib"); +import("system.result"); + + +var cacheKey; + +cacheKey = CachedRecordContainerUtils.getCommonKey("$param.OnlyResponsibleDistricts"); + +result.string(cacheKey); \ No newline at end of file diff --git a/entity/District_entity/recordcontainers/db/conditionProcess.js b/entity/District_entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..f21e37720ef93b4f016c491f77aea009222c89ac --- /dev/null +++ b/entity/District_entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,18 @@ +import("system.result"); +import("system.vars"); +import("Sql_lib"); + + +var onlyResponsibleParam = vars.get("$param.OnlyResponsibleDistricts"); + +if (onlyResponsibleParam) +{ + var responsibleDistricts = newSelect("DISTRICTRESPONSIBLE.DISTRICT_ID") + .from("DISTRICTRESPONSIBLE") + .where("DISTRICTRESPONSIBLE.EMPLOYEE_CONTACT_ID", onlyResponsibleParam) + .arrayColumn(); + + var cond = newWhere("DISTRICT.DISTRICTID", responsibleDistricts, SqlBuilder.IN()); + + result.string(cond.toString()); +} \ No newline at end of file diff --git a/entity/District_entity/recordcontainers/db/orderClauseProcess.js b/entity/District_entity/recordcontainers/db/orderClauseProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8eecff7ca3cc3956505cd3d2e40b072c3af92f33 --- /dev/null +++ b/entity/District_entity/recordcontainers/db/orderClauseProcess.js @@ -0,0 +1,4 @@ +import("system.db"); +import("system.result"); + +result.object({"DISTRICT_NUMBER" : db.ASCENDING}); \ No newline at end of file diff --git a/entity/District_entity/recordcontainers/db/recordfieldmappings/parent_district.displayvalue/expression.js b/entity/District_entity/recordcontainers/db/recordfieldmappings/parent_district.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..d5e9849d7e301f0625f043ffec0ff09edcdd0a7f --- /dev/null +++ b/entity/District_entity/recordcontainers/db/recordfieldmappings/parent_district.displayvalue/expression.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Sql_lib"); + + +result.string(newSelect("DISTRICT.DISTRICT_NAME") + .from("DISTRICT") + .where("DISTRICT.PARENTDISTRICT_DISTRICTID = DISTRICT.DISTRICTID") + .toString()); \ No newline at end of file diff --git a/entity/District_entity/recordcontainers/jdito/cacheKeyProcess.js b/entity/District_entity/recordcontainers/jdito/cacheKeyProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/Document_entity/Document_entity.aod b/entity/Document_entity/Document_entity.aod index f37fc7d02a7905f55670a648cd231fb68d5b7454..ee34493e4aca7a926e969ba52fee713d7fbf3164 100644 --- a/entity/Document_entity/Document_entity.aod +++ b/entity/Document_entity/Document_entity.aod @@ -227,6 +227,18 @@ <fieldName>Documents</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>b7b14281-6e78-4005-ad5b-14dffc4091f5</name> + <entityName>District_entity</entityName> + <fieldName>Documents</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>e6553781-e306-4335-a929-2c2a8ad8270f</name> + <entityName>DistrictResponsible_entity</entityName> + <fieldName>Documents</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> diff --git a/entity/Employee_entity/Employee_entity.aod b/entity/Employee_entity/Employee_entity.aod index afac629c0418a4e61f3d0ac64a38c7f3a09a1bf2..60ea8401f68c771715b123bb20d125584e78a98f 100644 --- a/entity/Employee_entity/Employee_entity.aod +++ b/entity/Employee_entity/Employee_entity.aod @@ -262,6 +262,12 @@ <fieldName>Leadimport_Empl</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>e9a775ab-e63d-493d-94dc-6b27dfb77173</name> + <entityName>DistrictResponsible_entity</entityName> + <fieldName>Employees</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> @@ -384,6 +390,10 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityParameter> + <name>DepartmentAttrIdByEmployeeContactId_param</name> + <expose v="true" /> + </entityParameter> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/Language_entity/Language_entity.aod b/entity/Language_entity/Language_entity.aod index 7387d818146c65d8ccc2640acde7c01c8fc9bf12..865dc46a9d633d325a0b1c832c40531179628e5c 100644 --- a/entity/Language_entity/Language_entity.aod +++ b/entity/Language_entity/Language_entity.aod @@ -87,6 +87,12 @@ <fieldName>Languages</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>9ee48241-5d40-46e9-83ec-a1dc55fdb7d5</name> + <entityName>District_entity</entityName> + <fieldName>Languages</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> diff --git a/entity/LogHistory_entity/LogHistory_entity.aod b/entity/LogHistory_entity/LogHistory_entity.aod index 7026c8106b6023ef68952b4209b26221fe7a4f54..5cb913b76a3cc6b3f66a7ec01719f9cbf1ef1173 100644 --- a/entity/LogHistory_entity/LogHistory_entity.aod +++ b/entity/LogHistory_entity/LogHistory_entity.aod @@ -111,6 +111,18 @@ <fieldName>LogHistories</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>fd46379e-f1be-4a9e-9914-4f3f81d96ad5</name> + <entityName>District_entity</entityName> + <fieldName>LogHistories</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>e97b5f2d-d2e0-4539-96e9-e3f96107ffaa</name> + <entityName>DistrictResponsible_entity</entityName> + <fieldName>LogHistories</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> </entityProvider> <entityParameter> diff --git a/entity/Member_entity/Member_entity.aod b/entity/Member_entity/Member_entity.aod index 4e8d292267ea3d25bcba25ba03bfa77dbb7a140b..6d305e8e0cdabdcc77505178c7af6c633d880776 100644 --- a/entity/Member_entity/Member_entity.aod +++ b/entity/Member_entity/Member_entity.aod @@ -174,12 +174,6 @@ <targetIdField>CONTACT_ID</targetIdField> <recordContainer>db</recordContainer> <dependencies> - <entityDependency> - <name>df6a9a25-f787-41f6-877b-c8e3cbbdc6be</name> - <entityName>Salesproject_entity</entityName> - <fieldName>Members</fieldName> - <isConsumer v="false" /> - </entityDependency> <entityDependency> <name>efeb191c-dd03-46e1-b176-c4e0c2f75fc5</name> <entityName>Campaign_entity</entityName> @@ -203,6 +197,28 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityConsumer> + <name>DistrictResponsibles</name> + <dependency> + <name>dependency</name> + </dependency> + </entityConsumer> + <entityProvider> + <name>WithDistrictResponsibles</name> + <recordContainer>jdito</recordContainer> + <dependencies> + <entityDependency> + <name>6f90b6c6-118c-485e-9a41-365bdc325f9b</name> + <entityName>Salesproject_entity</entityName> + <fieldName>Members</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityField> + <name>UID</name> + <documentation>%aditoprj%/entity/Member_entity/entityfields/uid/documentation.adoc</documentation> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -325,5 +341,72 @@ </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> + <jDitoRecordContainer> + <name>jdito</name> + <jDitoRecordAlias>Data_alias</jDitoRecordAlias> + <contentProcess>%aditoprj%/entity/Member_entity/recordcontainers/jdito/contentProcess.js</contentProcess> + <recordFieldMappings> + <jDitoRecordFieldMapping> + <name>UID.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>OBJECTMEMBERID.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>CONTACT_ID.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>CONTACTROLE.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>DEPARTMENT.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>ICON.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>IMAGE.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>MEMBERROLE.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>OBJECT_ROWID.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>OBJECT_TYPE.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>ORG_ORGID.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>ORGANISATION_NAME.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>PERSON_FIRSTNAME.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>PERSON_FULL_NAME.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>PERSON_LASTNAME.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>PERSON_PERSID.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>PERSON_SALUTATION.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>PERSON_TITLE.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>POSITION.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>TARGETCONTEXT.value</name> + </jDitoRecordFieldMapping> + </recordFieldMappings> + </jDitoRecordContainer> </recordContainers> </entity> diff --git a/entity/Member_entity/entityfields/uid/documentation.adoc b/entity/Member_entity/entityfields/uid/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..4db4f5e24216d619048062e493f79e2bb919aa77 --- /dev/null +++ b/entity/Member_entity/entityfields/uid/documentation.adoc @@ -0,0 +1 @@ +Is only used by the jdito record container. \ No newline at end of file diff --git a/entity/Member_entity/recordcontainers/jdito/contentProcess.js b/entity/Member_entity/recordcontainers/jdito/contentProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b678a96f2fa95f38313aa434a2b5895f899a228a --- /dev/null +++ b/entity/Member_entity/recordcontainers/jdito/contentProcess.js @@ -0,0 +1,114 @@ +import("system.result"); +import("system.vars"); +import("system.entities"); +import("KeywordRegistry_basic"); +import("Sql_lib"); + +var idValues = vars.get("$local.idvalues"); +var filter = vars.get("$local.filter"); +var memberLoadingConfig = entities.createConfigForLoadingRows() + .entity("Member_entity") + .provider("Links") + .addParameter("ObjectRowId_param", vars.get("$param.ObjectRowId_param")) + .addParameter("ObjectType_param", vars.get("$param.ObjectType_param")) + .fields(["#UID", "CONTACT_ID", "CONTACTROLE", "DEPARTMENT", "ICON", "IMAGE", "MEMBERROLE", "OBJECT_ROWID", "OBJECT_TYPE", + "OBJECTMEMBERID", "ORG_ORGID", "ORGANISATION_NAME", "PERSON_FIRSTNAME", "PERSON_FULL_NAME", + "PERSON_LASTNAME", "PERSON_PERSID", "PERSON_SALUTATION", "PERSON_TITLE", "POSITION", "TARGETCONTEXT"]); + +if (idValues) +{ + memberLoadingConfig.uids(idValues); +} + +if (filter && filter.filter != null) +{ + memberLoadingConfig.filter(JSON.stringify(filter.filter)); +} + +var memberRows = entities.getRows(memberLoadingConfig); + +if (vars.get("$param.ObjectType_param") == "Salesproject" && vars.get("$param.ObjectRowId_param") != null) +{ + var orgContactId = newSelect("SALESPROJECT.CONTACT_ID") + .from("SALESPROJECT") + .where("SALESPROJECT.SALESPROJECTID", "$param.ObjectRowId_param") + .cell(); + + var districtLoadingConfig = entities.createConfigForLoadingRows() + .entity("DistrictResponsible_entity") + .provider("OrganisationResponsibles") + .addParameter("OrgUid_param", orgContactId) + .fields(["#UID","DISTRICTRESPONSIBLEID", "DISTRICT_ID", "EMPLOYEE_CONTACT_ID", + "EMPLOYEE_CONTACT_ID.displayValue", "USER_EDIT", "USER_NEW", + "departmentAttributeName", "DATE_EDIT", "DATE_NEW"]); + + var districtRows = entities.getRows(districtLoadingConfig); + + + districtRows = districtRows.map(function(row) + { + return [row["#UID"], row["DISTRICTRESPONSIBLEID"], row["DISTRICT_ID"], row["EMPLOYEE_CONTACT_ID"], row["EMPLOYEE_CONTACT_ID.displayValue"], + row["USER_EDIT"], row["USER_NEW"], row["departmentAttributeName"], row["DATE_EDIT"], row["DATE_NEW"]]; + }); +} + + +memberRows = memberRows.map(function(row) +{ + return [row["#UID"], row["OBJECTMEMBERID"], row["CONTACT_ID"], row["CONTACTROLE"], row["DEPARTMENT"], row["ICON"], row["IMAGE"], row["MEMBERROLE"], row["OBJECT_ROWID"], + row["OBJECT_TYPE"], row["ORG_ORGID"], row["ORGANISATION_NAME"], row["PERSON_FIRSTNAME"], + row["PERSON_FULL_NAME"], row["PERSON_LASTNAME"], row["PERSON_PERSID"], row["PERSON_SALUTATION"], row["PERSON_TITLE"], + row["POSITION"], row["TARGETCONTEXT"]]; +}); + +var responsibleUids = []; + +districtRows.forEach(function(row){ + responsibleUids.push(row[3]); +}); + +var loadingConfPers = entities.createConfigForLoadingRows() + .entity("Person_entity") + .uids(responsibleUids) + .fields(["ORGANISATION_ID", "ORGANISATION_NAME", "CONTACTROLE", "POSITION", + "FIRSTNAME", "LASTNAME", "SALUTATION", "TITLE"]); + +var persRows = entities.getRows(loadingConfPers); +var counter = 0; + +persRows = persRows.map(function(row){ + return [row["SALUTATION"], row["TITLE"], row["FIRSTNAME"], row["LASTNAME"], + row["ORGANISATION_NAME"], row["ORGANISATION_ID"], row["CONTACTROLE"], + row["POSITION"], row["PERSONID"]]; +}); + + +districtRows.forEach(function(row){ + + memberRows.push( + [row[0], + null, + row[3], + persRows[counter][6], + row[7], + "VAADIN:GLOBE", + "TEXT:" + row[4].substring(row[4].indexOf(" ", 0)+1, row[4].length), + "MEMBERROLEDISTRICTRESPONSIBLE", + vars.get("$param.ObjectRowId_param"), + vars.get("$param.ObjectType_param"), + persRows[counter][5], + persRows[counter][4], + persRows[counter][2], + row[4], + persRows[counter][3], + persRows[counter][8], + persRows[counter][0], + persRows[counter][1], + persRows[counter][7], + null + ]); + + counter++; +}); + +result.object(memberRows); \ No newline at end of file diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index 1c97f114691c109ed9fbaa97f151ceb5bc9a9ba3..6bb2df593c28e5a15da6e2d156fd1219ce8e5d57 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -144,6 +144,12 @@ <fieldName>OrganisationConsumer</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>36d6824f-8f2f-4207-9dde-60f0b8f08815</name> + <entityName>District_entity</entityName> + <fieldName>Organisations</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> @@ -1231,6 +1237,24 @@ <documentation>%aditoprj%/entity/Organisation_entity/entityfields/indexp/documentation.adoc</documentation> <recordContainer>index</recordContainer> </entityProvider> + <entityConsumer> + <name>DistrictResponsibles</name> + <dependency> + <name>dependency</name> + <entityName>DistrictResponsible_entity</entityName> + <fieldName>OrganisationResponsibles</fieldName> + </dependency> + <children> + <entityParameter> + <name>OrgUid_param</name> + <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/districtresponsibles/children/orguid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityParameter> + <name>FilterPreSet_param</name> + <expose v="true" /> + </entityParameter> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Organisation_entity/entityfields/districtresponsibles/children/orguid_param/valueProcess.js b/entity/Organisation_entity/entityfields/districtresponsibles/children/orguid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..70a1c0fcc1293fa4bf37109294829055704eeaea --- /dev/null +++ b/entity/Organisation_entity/entityfields/districtresponsibles/children/orguid_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/entity/Organisation_entity/initFilterProcess.js b/entity/Organisation_entity/initFilterProcess.js index dccabf9d95be287466b9da7ca74205609bb11900..4ceb24fc0886eb4cba97f9320889469a96558fd1 100644 --- a/entity/Organisation_entity/initFilterProcess.js +++ b/entity/Organisation_entity/initFilterProcess.js @@ -4,10 +4,13 @@ import("Keyword_lib"); import("KeywordRegistry_basic"); import("system.result"); -if (vars.get("$sys.presentationmode") === neon.CONTEXT_PRESENTATIONMODE_FILTER) +var filter = vars.get("$param.FilterPreSet_param"); + +if (vars.get("$sys.presentationmode") === neon.CONTEXT_PRESENTATIONMODE_FILTER && (!filter && filter != null)) { var statusInactive = $KeywordRegistry.contactStatus$inactive(); - var filter = { + + filter = { type: "group", operator: "AND", childs: [{ @@ -21,4 +24,6 @@ if (vars.get("$sys.presentationmode") === neon.CONTEXT_PRESENTATIONMODE_FILTER) }; result.string(JSON.stringify(filter)); -} \ No newline at end of file +} + +result.string(filter); \ No newline at end of file diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index 6215388cf055883064b22679c2ab20dbb367015f..367ab7a019fd98e0fe9d3949b0df96941aaabe82 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -1279,6 +1279,20 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityConsumer> + <name>Districts</name> + <dependency> + <name>dependency</name> + <entityName>District_entity</entityName> + <fieldName>Districts</fieldName> + </dependency> + <children> + <entityParameter> + <name>OnlyResponsibleDistricts</name> + <valueProcess>%aditoprj%/entity/Person_entity/entityfields/districts/children/onlyresponsibledistricts/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Person_entity/entityfields/districts/children/onlyresponsibledistricts/valueProcess.js b/entity/Person_entity/entityfields/districts/children/onlyresponsibledistricts/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e1c2fe5e6971340baf7fc0dcfe3a0f00e5cd0427 --- /dev/null +++ b/entity/Person_entity/entityfields/districts/children/onlyresponsibledistricts/valueProcess.js @@ -0,0 +1,10 @@ +import("system.vars"); +import("system.result"); +import("Employee_lib"); + + +var contactId = vars.get("$field.CONTACTID"); + +if (EmployeeUtils.isUser(contactId)) { + result.string(contactId); +} \ No newline at end of file diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod index fc857899ee1c840fcedd78e0863d440f807ed0ab..c3ff1ca80c3bfd9b85ae0ecab2fbb575669f61c1 100644 --- a/entity/Salesproject_entity/Salesproject_entity.aod +++ b/entity/Salesproject_entity/Salesproject_entity.aod @@ -14,7 +14,7 @@ <useFavorites v="true" /> <iconId>VAADIN:BOOK_DOLLAR</iconId> <imageProcess>%aditoprj%/entity/Salesproject_entity/imageProcess.js</imageProcess> - <titlePlural>Sales Projects</titlePlural> + <titlePlural>Salesprojects</titlePlural> <recordContainer>db</recordContainer> <entityFields> <entityProvider> @@ -257,7 +257,7 @@ <dependency> <name>dependency</name> <entityName>Member_entity</entityName> - <fieldName>Links</fieldName> + <fieldName>WithDistrictResponsibles</fieldName> </dependency> <children> <entityParameter> diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index 8c5a16686dc10102603c2db08462f2b480fb1add..fa04a60d9ee1f6af17de5eb0435d41b5c09d3dc0 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -7305,6 +7305,63 @@ <entry> <key>Unread</key> </entry> + <entry> + <key>Parent Filter</key> + </entry> + <entry> + <key>Filter information</key> + </entry> + <entry> + <key>District Responsible</key> + </entry> + <entry> + <key>Responsibles</key> + </entry> + <entry> + <key>Districts</key> + </entry> + <entry> + <key>{$DISTRICTNUMBER}</key> + </entry> + <entry> + <key>{$DISTRICT_PARENT_DISTRICT}</key> + </entry> + <entry> + <key>Responsible Districts</key> + </entry> + <entry> + <key>District No.:</key> + </entry> + <entry> + <key>Customer counting</key> + </entry> + <entry> + <key>{$PARENT_DISTRICT}</key> + </entry> + <entry> + <key>{$DISTRICT_NUMBER}</key> + </entry> + <entry> + <key>District definition</key> + </entry> + <entry> + <key>{$DISTRICT_NO}</key> + </entry> + <entry> + <key>{$DISTRICT}</key> + </entry> + <entry> + <key>The district no has to be bigger than %0</key> + </entry> + <entry> + <key>District Filter</key> + </entry> + <entry> + <key>{$DISTRICT_RESPONSIBLE}</key> + </entry> + <entry> + <key>{$DISTRICT_TOTAL_TURNOVER}</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 22e0f10f3b2f44fcf03a8547d7d533a2cb3fce6f..6481d8a8ba40fcf0bf98abef7970ef3ab2536ce1 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -9309,6 +9309,79 @@ Bitte Datumseingabe prüfen</value> <entry> <key>The use of any of your previous %0 passwords is prohibited</key> </entry> + <entry> + <key>Parent Filter</key> + <value>Übergeordneter Filter</value> + </entry> + <entry> + <key>Filter information</key> + </entry> + <entry> + <key>District Responsible</key> + <value>Gebietsverantwortlicher</value> + </entry> + <entry> + <key>Responsibles</key> + <value>Gebietsverantwortliche</value> + </entry> + <entry> + <key>Districts</key> + </entry> + <entry> + <key>{$DISTRICTNUMBER}</key> + <value>Gebietsnummer</value> + </entry> + <entry> + <key>{$DISTRICT_PARENT_DISTRICT}</key> + <value>Übergeordnetes Gebiet</value> + </entry> + <entry> + <key>Responsible Districts</key> + <value>Verantwortliche Gebiete</value> + </entry> + <entry> + <key>District No.:</key> + <value>Gebiets-Nr.:</value> + </entry> + <entry> + <key>Customer counting</key> + <value>Anzahl Kunden</value> + </entry> + <entry> + <key>{$PARENT_DISTRICT}</key> + </entry> + <entry> + <key>{$DISTRICT_NUMBER}</key> + <value>Gebietsnummer</value> + </entry> + <entry> + <key>District definition</key> + <value>Gebietsdefinition</value> + </entry> + <entry> + <key>{$DISTRICT_NO}</key> + <value>Gebietsnr.:</value> + </entry> + <entry> + <key>{$DISTRICT}</key> + <value>Gebiet</value> + </entry> + <entry> + <key>The district no has to be bigger than %0</key> + <value>Die Gebietsnummer sollte größer sein als %0</value> + </entry> + <entry> + <key>District Filter</key> + <value>Gebietsfilter</value> + </entry> + <entry> + <key>{$DISTRICT_RESPONSIBLE}</key> + <value>Gebietsverantwortlicher</value> + </entry> + <entry> + <key>{$DISTRICT_TOTAL_TURNOVER}</key> + <value>Umsatz gesamt</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 ff0565ce60b2392642c9ea6cf6cbe84c9b4b8ce2..20f4b0786a2631b7095d541b239c31f912b1314e 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -7376,6 +7376,63 @@ <entry> <key>Unread</key> </entry> + <entry> + <key>Parent Filter</key> + </entry> + <entry> + <key>Filter information</key> + </entry> + <entry> + <key>District Responsible</key> + </entry> + <entry> + <key>Responsibles</key> + </entry> + <entry> + <key>Districts</key> + </entry> + <entry> + <key>{$DISTRICTNUMBER}</key> + </entry> + <entry> + <key>{$DISTRICT_PARENT_DISTRICT}</key> + </entry> + <entry> + <key>Responsible Districts</key> + </entry> + <entry> + <key>District No.:</key> + </entry> + <entry> + <key>Customer counting</key> + </entry> + <entry> + <key>{$PARENT_DISTRICT}</key> + </entry> + <entry> + <key>{$DISTRICT_NUMBER}</key> + </entry> + <entry> + <key>District definition</key> + </entry> + <entry> + <key>{$DISTRICT_NO}</key> + </entry> + <entry> + <key>{$DISTRICT}</key> + </entry> + <entry> + <key>The district no has to be bigger than %0</key> + </entry> + <entry> + <key>District Filter</key> + </entry> + <entry> + <key>{$DISTRICT_RESPONSIBLE}</key> + </entry> + <entry> + <key>{$DISTRICT_TOTAL_TURNOVER}</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/neonContext/District/District.aod b/neonContext/District/District.aod new file mode 100644 index 0000000000000000000000000000000000000000..f595315a283bb53432ac96e6083e65a450ca5496 --- /dev/null +++ b/neonContext/District/District.aod @@ -0,0 +1,34 @@ +<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.1"> + <name>District</name> + <title>Districts</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:GLOBE</icon> + <mainView>DistrictMain_view</mainView> + <filterView>DistrictFilter_view</filterView> + <editView>DistrictEdit_view</editView> + <previewView>DistrictPreview_view</previewView> + <entity>District_entity</entity> + <references> + <neonViewReference> + <name>7e7c84fd-f4c5-4907-ab43-b31d6fafb42a</name> + <view>DistrictFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>12843ee8-b70b-41e3-88e8-4500d299b588</name> + <view>DistrictEdit_view</view> + </neonViewReference> + <neonViewReference> + <name>db6ac483-a73c-462f-8e2d-e59db4c7c6a2</name> + <view>DistrictMain_view</view> + </neonViewReference> + <neonViewReference> + <name>bb3c4a77-62b0-4749-a4ef-55c60c6b9e5c</name> + <view>DistrictPreview_view</view> + </neonViewReference> + <neonViewReference> + <name>bb8600b2-a4ee-49a5-b120-b2e12db7e25c</name> + <view>DistrictList_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonContext/DistrictResponsible/DistrictResponsible.aod b/neonContext/DistrictResponsible/DistrictResponsible.aod new file mode 100644 index 0000000000000000000000000000000000000000..58d47bc30bb3ee9a657e860f9b9f6b45872194e5 --- /dev/null +++ b/neonContext/DistrictResponsible/DistrictResponsible.aod @@ -0,0 +1,21 @@ +<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.1"> + <name>DistrictResponsible</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:GLOBE</icon> + <entity>DistrictResponsible_entity</entity> + <references> + <neonViewReference> + <name>ee2298ba-af17-492b-9128-714e82def8e3</name> + <view>DistrictResponsibleMultiEdit_view</view> + </neonViewReference> + <neonViewReference> + <name>fc24246c-51de-4d00-b2aa-7e9505461c2e</name> + <view>DistrictResponsibleList_view</view> + </neonViewReference> + <neonViewReference> + <name>cba355d3-4ef4-441e-8976-f51c8fe65eec</name> + <view>DistrictResponsiblePreviewList_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonContext/Organisation/Organisation.aod b/neonContext/Organisation/Organisation.aod index 5303c6b55cee4d3796c3573e87fe61bf836703ec..0f3b35cfd17c386cdffabe928b45f720c8196ec9 100644 --- a/neonContext/Organisation/Organisation.aod +++ b/neonContext/Organisation/Organisation.aod @@ -53,7 +53,7 @@ </neonViewReference> <neonViewReference> <name>a97ac17d-171b-4c9a-83fa-bb5a466c7b20</name> - <view>OrganisationNoNoiseTable_view</view> + <view>OrganisationDuplicateEditview_view</view> </neonViewReference> <neonViewReference> <name>ade0ed85-260d-4da5-bf4c-f838cfdcc693</name> @@ -67,5 +67,9 @@ <name>0b052872-d6b4-41ac-ad0b-580575893e1b</name> <view>OrganisationLesserNoiseTable_view</view> </neonViewReference> + <neonViewReference> + <name>2193fe84-ff57-4382-8200-5d1d846f455c</name> + <view>OrganisationDistrictResponsibles_view</view> + </neonViewReference> </references> </neonContext> diff --git a/neonContext/Person/Person.aod b/neonContext/Person/Person.aod index 5a9b1ecbe90107c4e484b01a2a7755d85faa8284..0d4160ba11000d5a5b3388a502c2767644e76db0 100644 --- a/neonContext/Person/Person.aod +++ b/neonContext/Person/Person.aod @@ -63,5 +63,9 @@ <name>2a6c44be-53e2-469e-84b3-615841bd4430</name> <view>PersonDuplicateEditview_view</view> </neonViewReference> + <neonViewReference> + <name>93a274f8-8d73-4e18-b77c-a7eda6028116</name> + <view>PersonDistricts_view</view> + </neonViewReference> </references> </neonContext> diff --git a/neonView/DistrictEdit_view/DistrictEdit_view.aod b/neonView/DistrictEdit_view/DistrictEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..ef598ae5665601c0ec565416dd283b994c2c4db6 --- /dev/null +++ b/neonView/DistrictEdit_view/DistrictEdit_view.aod @@ -0,0 +1,57 @@ +<?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>DistrictEdit_view</name> + <title>Responsible Districts</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>genericViewTemplate</name> + <editMode v="true" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>3c4e3069-f8ce-4cfc-84f5-17b5cbe606ec</name> + <entityField>DISTRICT_NAME</entityField> + </entityFieldLink> + <entityFieldLink> + <name>fd54e6af-1045-402d-a464-0bcd8d27573c</name> + <entityField>DISTRICT_NUMBER</entityField> + </entityFieldLink> + <entityFieldLink> + <name>ec0706b4-dcf4-4c0d-b99a-cc0b129f3e46</name> + <entityField>DISTRICT_INFO</entityField> + </entityFieldLink> + <entityFieldLink> + <name>325331a3-facb-4fd3-9efb-2bd8ed6f08f0</name> + <entityField>ISO3</entityField> + </entityFieldLink> + <entityFieldLink> + <name>941cb436-8b93-427d-ae2d-3731e55dd040</name> + <entityField>DISTRICT_STATUS</entityField> + </entityFieldLink> + <entityFieldLink> + <name>f77428c6-eaff-4554-aedb-cf56d4c573d6</name> + <entityField>PARENTDISTRICT_DISTRICTID</entityField> + </entityFieldLink> + <entityFieldLink> + <name>914ec7a6-f89f-44c5-9ea9-1a6223e4cf62</name> + <entityField>parentFilter</entityField> + </entityFieldLink> + <entityFieldLink> + <name>44d4f67e-5041-4b3f-a64f-71910050e035</name> + <entityField>DISTRICT_FILTER</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + <neonViewReference> + <name>f1dddbee-5718-46b8-b682-ba4e707bf529</name> + <entityField>DistrictResponsibles</entityField> + <view>DistrictResponsibleMultiEdit_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/DistrictFilter_view/DistrictFilter_view.aod b/neonView/DistrictFilter_view/DistrictFilter_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..d9ab4d5e1e5a07d9a54f2e13504089ab9f994681 --- /dev/null +++ b/neonView/DistrictFilter_view/DistrictFilter_view.aod @@ -0,0 +1,45 @@ +<?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>DistrictFilter_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <layout> + <groupLayout> + <name>layout</name> + </groupLayout> + </layout> + <children> + <treeTableViewTemplate> + <name>treetableViewTemplate</name> + <parentField>PARENTDISTRICT_DISTRICTID</parentField> + <hideContentSearch v="false" /> + <showChildrenCount v="false" /> + <entityField>#ENTITY</entityField> + <linkedColumns /> + <defaultGroupFields /> + <fixedFilterFields /> + <columns> + <neonTreeTableColumn> + <name>9f8e99dc-cfb3-4038-b949-27571f787db2</name> + <entityField>DISTRICT_NAME</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>98f4acf0-ecb3-4999-8727-16df56e502cc</name> + <entityField>DISTRICT_NUMBER</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>9533ae87-3b08-4dd6-8265-13024cbab918</name> + <entityField>DISTRICT_INFO</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>df5ff116-cead-46c3-9569-0a51f2243c81</name> + <entityField>ISO3</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>87184bb1-4d44-4872-bae7-9be903f71354</name> + <entityField>DISTRICT_STATUS</entityField> + </neonTreeTableColumn> + </columns> + </treeTableViewTemplate> + </children> +</neonView> diff --git a/neonView/DistrictList_view/DistrictList_view.aod b/neonView/DistrictList_view/DistrictList_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..4525f95ab63f63f63563bb6b985716a92d409f55 --- /dev/null +++ b/neonView/DistrictList_view/DistrictList_view.aod @@ -0,0 +1,48 @@ +<?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>DistrictList_view</name> + <title>Responsible Districts</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <treeTableViewTemplate> + <name>treeTableViewTemplate</name> + <parentField>PARENTDISTRICT_DISTRICTID</parentField> + <hideActions v="true" /> + <entityField>#ENTITY</entityField> + <linkedColumns /> + <defaultGroupFields /> + <fixedFilterFields /> + <hideHeader v="false" /> + <isCreatable v="false" /> + <isDeletable v="false" /> + <isEditable v="false" /> + <columns> + <neonTreeTableColumn> + <name>15a66360-dff7-4d21-b4e1-f48102f0bda1</name> + <entityField>DISTRICT_NAME</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>ca9631f4-f48b-49a6-83dd-3c5b33ee669a</name> + <entityField>DISTRICT_NUMBER</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>257e37e4-e6b0-4d74-aa46-9c0643aed985</name> + <entityField>DISTRICT_INFO</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>54a43aa1-1347-474c-9465-3a018d0cb99f</name> + <entityField>ISO3</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>932b9d0a-ccfc-4d17-b158-b19e3795af0b</name> + <entityField>DISTRICT_STATUS</entityField> + </neonTreeTableColumn> + </columns> + </treeTableViewTemplate> + </children> +</neonView> diff --git a/neonView/DistrictMain_view/DistrictMain_view.aod b/neonView/DistrictMain_view/DistrictMain_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..2babd2f4b0b697301ad2cc98105a9779c53e8da9 --- /dev/null +++ b/neonView/DistrictMain_view/DistrictMain_view.aod @@ -0,0 +1,33 @@ +<?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>DistrictMain_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <masterSlaveLayout> + <name>layout</name> + <master>8b52b148-a054-4e85-8de0-856be82abc77</master> + </masterSlaveLayout> + </layout> + <children> + <neonViewReference> + <name>8b52b148-a054-4e85-8de0-856be82abc77</name> + <entityField>#ENTITY</entityField> + <view>DistrictPreview_view</view> + </neonViewReference> + <neonViewReference> + <name>b409f300-c8b4-4052-9012-5e6b79c03a9c</name> + <entityField>Organisations</entityField> + <view>OrganisationFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>665bcb1a-aeb5-4dc5-9c2b-5398ee85bdc9</name> + <entityField>Documents</entityField> + <view>DocumentFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>7001aa5a-75d1-42b4-bc45-db303d89184e</name> + <entityField>LogHistories</entityField> + <view>LogHistoryFilter_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/DistrictPreview_view/DistrictPreview_view.aod b/neonView/DistrictPreview_view/DistrictPreview_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..14f7d89a8f626627ee8676edcab16390a3d43d84 --- /dev/null +++ b/neonView/DistrictPreview_view/DistrictPreview_view.aod @@ -0,0 +1,63 @@ +<?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>DistrictPreview_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <layout> + <headerFooterLayout> + <name>layout</name> + <header>cardViewTemplate</header> + <footer>scoreCardViewTemplate</footer> + </headerFooterLayout> + </layout> + <children> + <cardViewTemplate> + <name>cardViewTemplate</name> + <titleField>DISTRICT_NAME</titleField> + <descriptionField>DISTRICT_NUMBER_fieldGroup</descriptionField> + <entityField>#ENTITY</entityField> + </cardViewTemplate> + <neonViewReference> + <name>a7a731e8-f93e-4d90-8459-d249a13ecf0d</name> + <entityField>DistrictResponsibles</entityField> + <view>DistrictResponsiblePreviewList_view</view> + </neonViewReference> + <genericViewTemplate> + <name>furtherInfosGenericViewTemplate</name> + <showDrawer v="true" /> + <drawerCaption>Further informations</drawerCaption> + <fixedDrawer v="false" /> + <hideEmptyFields v="true" /> + <entityField>#ENTITY</entityField> + <title>Further informations</title> + <fields> + <entityFieldLink> + <name>cda733b1-3bf4-4ec0-9aef-8865b7704094</name> + <entityField>LANG</entityField> + </entityFieldLink> + <entityFieldLink> + <name>f1c69329-5a9f-456f-b37d-1ca1b0e4943c</name> + <entityField>DISTRICT_INFO</entityField> + </entityFieldLink> + <entityFieldLink> + <name>0dddb53a-30ea-4c82-b7c2-7c3372a2968a</name> + <entityField>DISTRICT_FILTER</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + <scoreCardViewTemplate> + <name>scoreCardViewTemplate</name> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>5aa54d53-a6c2-4b5f-9eae-67c8e4208cfc</name> + <entityField>totalTurnover</entityField> + </entityFieldLink> + <entityFieldLink> + <name>c76e215e-e2f4-42e5-a245-810003fec56b</name> + <entityField>customerCounting</entityField> + </entityFieldLink> + </fields> + </scoreCardViewTemplate> + </children> +</neonView> diff --git a/neonView/DistrictResponsibleList_view/DistrictResponsibleList_view.aod b/neonView/DistrictResponsibleList_view/DistrictResponsibleList_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..26598ff9fafe4cf123ccf96272ce838a5474a346 --- /dev/null +++ b/neonView/DistrictResponsibleList_view/DistrictResponsibleList_view.aod @@ -0,0 +1,33 @@ +<?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>DistrictResponsibleList_view</name> + <title>Responsibles</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <noneLayout> + <name>layout</name> + </noneLayout> + </layout> + <children> + <tableViewTemplate> + <name>tableViewTemplate</name> + <hideActions v="true" /> + <entityField>#ENTITY</entityField> + <linkedColumns /> + <fixedFilterFields /> + <isCreatable v="false" /> + <isDeletable v="false" /> + <isEditable v="false" /> + <columns> + <neonTableColumn> + <name>32e7b066-76b4-4bd2-b440-bc7844c929a6</name> + <entityField>EMPLOYEE_CONTACT_ID</entityField> + </neonTableColumn> + <neonTableColumn> + <name>dc9bce22-9a99-4db9-a76a-8fd4a91d5f0f</name> + <entityField>departmentAttributeName</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView> diff --git a/neonView/DistrictResponsibleMultiEdit_view/DistrictResponsibleMultiEdit_view.aod b/neonView/DistrictResponsibleMultiEdit_view/DistrictResponsibleMultiEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..5446115f96b50fc2b2ff9c4600e45c678bac3c68 --- /dev/null +++ b/neonView/DistrictResponsibleMultiEdit_view/DistrictResponsibleMultiEdit_view.aod @@ -0,0 +1,28 @@ +<?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>DistrictResponsibleMultiEdit_view</name> + <title></title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericMultipleViewTemplate> + <name>genericViewTemplate</name> + <entityField>#ENTITY</entityField> + <title>Responsible</title> + <columns> + <neonGenericMultipleTableColumn> + <name>e1988e26-68a4-4a96-a484-4d9f7506505d</name> + <entityField>departmentAttributeName</entityField> + </neonGenericMultipleTableColumn> + <neonGenericMultipleTableColumn> + <name>2c588be3-a0df-4c3f-9632-574e5b975073</name> + <entityField>EMPLOYEE_CONTACT_ID</entityField> + </neonGenericMultipleTableColumn> + </columns> + </genericMultipleViewTemplate> + </children> +</neonView> diff --git a/neonView/DistrictResponsiblePreviewList_view/DistrictResponsiblePreviewList_view.aod b/neonView/DistrictResponsiblePreviewList_view/DistrictResponsiblePreviewList_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..d04097450b6219bbaeadd253491c0c6fb4fcb0d6 --- /dev/null +++ b/neonView/DistrictResponsiblePreviewList_view/DistrictResponsiblePreviewList_view.aod @@ -0,0 +1,26 @@ +<?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>DistrictResponsiblePreviewList_view</name> + <title>Contactperson</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <noneLayout> + <name>layout</name> + </noneLayout> + </layout> + <children> + <titledListViewTemplate> + <name>titledListViewTemplate</name> + <titleField>departmentAttributeName</titleField> + <entityField>#ENTITY</entityField> + <title>Contactperson</title> + <columns> + <neonTitledListTableColumn> + <name>007d67c4-146b-4202-a677-4390059b4a0a</name> + <entityField>EMPLOYEE_CONTACT_ID</entityField> + <fullWidth v="false" /> + </neonTitledListTableColumn> + </columns> + </titledListViewTemplate> + </children> +</neonView> diff --git a/neonView/OrganisationDistrictResponsibles_view/OrganisationDistrictResponsibles_view.aod b/neonView/OrganisationDistrictResponsibles_view/OrganisationDistrictResponsibles_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..ab57158edfed4b568aeb345746fc7e6acfe527c0 --- /dev/null +++ b/neonView/OrganisationDistrictResponsibles_view/OrganisationDistrictResponsibles_view.aod @@ -0,0 +1,18 @@ +<?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>OrganisationDistrictResponsibles_view</name> + <title>Responsibles</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <noneLayout> + <name>layout</name> + </noneLayout> + </layout> + <children> + <neonViewReference> + <name>a698babd-271c-4f21-94f7-391f4ad80877</name> + <entityField>DistrictResponsibles</entityField> + <view>DistrictResponsibleList_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/OrganisationMain_view/OrganisationMain_view.aod b/neonView/OrganisationMain_view/OrganisationMain_view.aod index 4b49bf017ef8e844fe502401ba56b0a5820d7f0c..24ea1854e8e08fdbfd35e58001e1c7d6787ecb26 100644 --- a/neonView/OrganisationMain_view/OrganisationMain_view.aod +++ b/neonView/OrganisationMain_view/OrganisationMain_view.aod @@ -70,5 +70,10 @@ <entityField>SelfDuplicatesUncached</entityField> <view>OrganisationFilter_view</view> </neonViewReference> + <neonViewReference> + <name>db26269b-32ae-47da-ba22-41e0a5952103</name> + <entityField>#ENTITY</entityField> + <view>OrganisationDistrictResponsibles_view</view> + </neonViewReference> </children> </neonView> diff --git a/neonView/PersonDistricts_view/PersonDistricts_view.aod b/neonView/PersonDistricts_view/PersonDistricts_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..d665b77e67fd84ddbffcf34c6bc2e926d2b31098 --- /dev/null +++ b/neonView/PersonDistricts_view/PersonDistricts_view.aod @@ -0,0 +1,18 @@ +<?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>PersonDistricts_view</name> + <title>Responsible Districts</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <noneLayout> + <name>layout</name> + </noneLayout> + </layout> + <children> + <neonViewReference> + <name>c461b0a2-316c-481f-9697-0b24adbcf8bc</name> + <entityField>Districts</entityField> + <view>DistrictList_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/PersonMain_view/PersonMain_view.aod b/neonView/PersonMain_view/PersonMain_view.aod index f59ffc93a3820bf72035b5c719272c599d506113..1151edfebd004c1cee595613ef88ce19e857afd0 100644 --- a/neonView/PersonMain_view/PersonMain_view.aod +++ b/neonView/PersonMain_view/PersonMain_view.aod @@ -64,5 +64,10 @@ <entityField>SelfDuplicatesUncached</entityField> <view>PersonFilter_view</view> </neonViewReference> + <neonViewReference> + <name>f826f154-bf7f-4c7e-9ce2-3105cc629851</name> + <entityField>#ENTITY</entityField> + <view>PersonDistricts_view</view> + </neonViewReference> </children> </neonView> diff --git a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod index a44cefc227883f0d42806ec23c3538da867cb9b4..55876a9e625edba650d16f96b91d7dd6d9b288e7 100644 --- a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod +++ b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod @@ -30,7 +30,7 @@ <recordContainerCachingAlias>RecordContainerCache</recordContainerCachingAlias> <clientSearchOptimizedForSpeed v="true" /> <clientSearchExcludeForIgnorecase v="true" /> - <neonClientPermissionsEnabled v="true" /> + <neonClientPermissionsEnabled v="false" /> <clientFeedbackMailaddress /> <blobHandlingMethod>DATABASE</blobHandlingMethod> <databaseAuditGetOldValueLobs v="false" /> diff --git a/process/Employee_lib/process.js b/process/Employee_lib/process.js index 5a89f59926f91c80bc9e0adaa7f9845254eb5cf7..11a783e252b8318daa74cc7a957410c93943a71f 100644 --- a/process/Employee_lib/process.js +++ b/process/Employee_lib/process.js @@ -1,7 +1,8 @@ +import("system.tools"); import("system.vars"); import("system.db"); +import("Attribute_lib"); import("Sql_lib"); -import("system.tools"); /** * Provides functions for employees and users.j @@ -145,4 +146,24 @@ EmployeeUtils.isUser = function (pContactId) { var user = tools.getUserByAttribute(tools.CONTACTID, pContactId); return user != null; +} + +/** + * Returns users department as corresponding attribute id. + * + * @param {String} pContactId the contactId from the employee, from which you want the department back. + * @param {String} pDepartmentAsDisplayable the department as displayable value. + * @return {String} the department as corresponding attribute id or as displayable departmentname (e.g.: "Marketing", "Human Ressources"). + */ +EmployeeUtils.getUsersDepartment = function(pContactId, pDepartmentAsDisplayable){ + + var user = tools.getUsersByAttribute(tools.CONTACTID, [pContactId]); + var department = user[0][tools.PARAMS].department; + + if (pDepartmentAsDisplayable) + { + department = AttributeUtil.getSimpleAttributeName(department, true) + } + + return department; } \ No newline at end of file