Skip to content
Snippets Groups Projects
Commit 34f39cba authored by Markus Schloder's avatar Markus Schloder
Browse files

Merge branch '1069528_OrganisationFilterBetreuer' into '2020.2.0_Betreuung_HamaDSG'

[Projekt: xRM-Trade 2020][TicketNr.: 1069528][Filter "Betreuer = ich" in Organisation]

See merge request xrm/basic!499
parents 9bf3fb3a 05472f06
No related branches found
No related tags found
No related merge requests found
Showing with 117 additions and 4 deletions
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<name>DistrictContact_entity</name> <name>DistrictContact_entity</name>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<icon>VAADIN:GLOBE</icon> <icon>VAADIN:GLOBE</icon>
<title>District Contact</title> <title>Supervisor</title>
<iconIdProcess>%aditoprj%/entity/DistrictContact_entity/iconIdProcess.js</iconIdProcess> <iconIdProcess>%aditoprj%/entity/DistrictContact_entity/iconIdProcess.js</iconIdProcess>
<image>VAADIN:GLOBE</image> <image>VAADIN:GLOBE</image>
<titlePlural>District Contacts</titlePlural> <titlePlural>Supervisors</titlePlural>
<recordContainer>db</recordContainer> <recordContainer>db</recordContainer>
<entityFields> <entityFields>
<entityProvider> <entityProvider>
......
...@@ -1686,6 +1686,14 @@ ...@@ -1686,6 +1686,14 @@
<filterConditionProcess>%aditoprj%/entity/Organisation_entity/recordcontainers/db/filterextensions/favoriten_filter/filterConditionProcess.js</filterConditionProcess> <filterConditionProcess>%aditoprj%/entity/Organisation_entity/recordcontainers/db/filterextensions/favoriten_filter/filterConditionProcess.js</filterConditionProcess>
<filtertype>BASIC</filtertype> <filtertype>BASIC</filtertype>
</filterExtension> </filterExtension>
<filterExtension>
<name>ResponsibleAssignment</name>
<title>Supervisor assignment</title>
<contentType>TEXT</contentType>
<filterValuesProcess>%aditoprj%/entity/Organisation_entity/recordcontainers/db/filterextensions/responsibleassignment/filterValuesProcess.js</filterValuesProcess>
<filterConditionProcess>%aditoprj%/entity/Organisation_entity/recordcontainers/db/filterextensions/responsibleassignment/filterConditionProcess.js</filterConditionProcess>
<filtertype>EXTENDED</filtertype>
</filterExtension>
</filterExtensions> </filterExtensions>
</dbRecordContainer> </dbRecordContainer>
<indexRecordContainer> <indexRecordContainer>
......
import("Employee_lib");
import("KeywordRegistry_basic");
import("Sql_lib");
import("system.vars");
import("system.result");
var operator = vars.get("$local.operator");
var rawvalue = vars.get("$local.rawvalue");
var operator2 = vars.get("$local.operator2");
var sqlCond = "";
rawvalue = (rawvalue == "true");
if(operator == "1" && rawvalue || operator == "2" && !rawvalue )
operator2 = SqlBuilder.IN();
else if(operator == "1" && !rawvalue || operator == "2" && rawvalue)
operator2 = SqlBuilder.NOT_IN();
else
sqlCond = "1=1";
if (sqlCond == "")
sqlCond = new SqlBuilder().where("CONTACT.CONTACTID",
newSelect("DISTRICTCONTACT.CONTACT_ID")
.from("DISTRICTCONTACT")
.where("DISTRICTCONTACT.ADVISER_CONTACT_ID", EmployeeUtils.getCurrentContactId())
.and(
newWhere(
newWhere("current_date >= cast(DISTRICTCONTACT.VALID_FROM as DATE)")
.and("current_date <= cast(DISTRICTCONTACT.VALID_UNTIL as DATE)"))
.or(newWhere("current_date >= cast(DISTRICTCONTACT.VALID_FROM as DATE)")
.and("DISTRICTCONTACT.VALID_UNTIL is null")))
.and("DISTRICTCONTACT.STATUS", $KeywordRegistry.contactStatus$active()), operator2).toString();
result.string(sqlCond);
\ No newline at end of file
import("system.translate");
import("system.result");
result.object([["true", translate.text("Yes")], ["false", translate.text("No")]]);
\ No newline at end of file
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
<useFavorites v="true" /> <useFavorites v="true" />
<iconId>VAADIN:USERS</iconId> <iconId>VAADIN:USERS</iconId>
<imageProcess>%aditoprj%/entity/Person_entity/imageProcess.js</imageProcess> <imageProcess>%aditoprj%/entity/Person_entity/imageProcess.js</imageProcess>
<usePermissions v="false" />
<titlePlural>Contacts</titlePlural> <titlePlural>Contacts</titlePlural>
<recordContainer>db</recordContainer> <recordContainer>db</recordContainer>
<entityFields> <entityFields>
...@@ -1698,6 +1697,14 @@ ...@@ -1698,6 +1697,14 @@
<filterConditionProcess>%aditoprj%/entity/Person_entity/recordcontainers/db/filterextensions/favorits_filter/filterConditionProcess.js</filterConditionProcess> <filterConditionProcess>%aditoprj%/entity/Person_entity/recordcontainers/db/filterextensions/favorits_filter/filterConditionProcess.js</filterConditionProcess>
<filtertype>BASIC</filtertype> <filtertype>BASIC</filtertype>
</filterExtension> </filterExtension>
<filterExtension>
<name>SupervisorAssignment</name>
<title>Supervisor assignment</title>
<contentType>TEXT</contentType>
<filterValuesProcess>%aditoprj%/entity/Person_entity/recordcontainers/db/filterextensions/supervisorassignment/filterValuesProcess.js</filterValuesProcess>
<filterConditionProcess>%aditoprj%/entity/Person_entity/recordcontainers/db/filterextensions/supervisorassignment/filterConditionProcess.js</filterConditionProcess>
<filtertype>BASIC</filtertype>
</filterExtension>
</filterExtensions> </filterExtensions>
</dbRecordContainer> </dbRecordContainer>
<indexRecordContainer> <indexRecordContainer>
......
import("Employee_lib");
import("KeywordRegistry_basic");
import("Sql_lib");
import("system.vars");
import("system.result");
var operator = vars.get("$local.operator");
var rawvalue = vars.get("$local.rawvalue");
var operator2 = vars.get("$local.operator2");
var sqlCond = "";
rawvalue = (rawvalue == "true");
if(operator == "1" && rawvalue || operator == "2" && !rawvalue )
operator2 = SqlBuilder.IN();
else if(operator == "1" && !rawvalue || operator == "2" && rawvalue)
operator2 = SqlBuilder.NOT_IN();
else
sqlCond = "1=1";
if (sqlCond == "")
sqlCond = new SqlBuilder().where("CONTACT.CONTACTID",
newSelect("pers.CONTACTID")
.from("DISTRICTCONTACT")
.join("CONTACT", "DISTRICTCONTACT.CONTACT_ID = org.CONTACTID", "org")
.join("CONTACT", "pers.ORGANISATION_ID = org.ORGANISATION_ID and pers.PERSON_ID is not null", "pers")
.where("DISTRICTCONTACT.ADVISER_CONTACT_ID", EmployeeUtils.getCurrentContactId())
.and(
newWhere(
newWhere("current_date >= cast(DISTRICTCONTACT.VALID_FROM as DATE)")
.and("current_date <= cast(DISTRICTCONTACT.VALID_UNTIL as DATE)"))
.or(newWhere("current_date >= cast(DISTRICTCONTACT.VALID_FROM as DATE)")
.and("DISTRICTCONTACT.VALID_UNTIL is null")))
.and("DISTRICTCONTACT.STATUS", $KeywordRegistry.contactStatus$active()), operator2).toString();
result.string(sqlCond);
\ No newline at end of file
import("system.translate");
import("system.result");
result.object([["true", translate.text("Yes")], ["false", translate.text("No")]]);
\ No newline at end of file
...@@ -14,6 +14,14 @@ ...@@ -14,6 +14,14 @@
<key>The start date has to be before the end date.</key> <key>The start date has to be before the end date.</key>
<value>Das Startdatum muss vor dem Enddatum sein.</value> <value>Das Startdatum muss vor dem Enddatum sein.</value>
</entry> </entry>
<entry>
<key>Supervisors</key>
<value>Betreuer</value>
</entry>
<entry>
<key>Supervisor assignment</key>
<value>Betreuerzuordnung</value>
</entry>
<entry> <entry>
<key>The given starting location is empty. An area search can not be performed.</key> <key>The given starting location is empty. An area search can not be performed.</key>
<value>Der übergebene Startpunkt ist leer. Die Umkreissuche kann nicht ausgeführt werden.</value> <value>Der übergebene Startpunkt ist leer. Die Umkreissuche kann nicht ausgeführt werden.</value>
...@@ -7368,6 +7376,10 @@ ...@@ -7368,6 +7376,10 @@
<key>Info (Company)</key> <key>Info (Company)</key>
<value>Info (Firma)</value> <value>Info (Firma)</value>
</entry> </entry>
<entry>
<key>Supervisor</key>
<value>Betreuer</value>
</entry>
<entry> <entry>
<key>Möglicherweise ist ein Import-Feld zu groß für das Zielfeld.</key> <key>Möglicherweise ist ein Import-Feld zu groß für das Zielfeld.</key>
<value>An import field may be too large for the target field.</value> <value>An import field may be too large for the target field.</value>
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <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>DistrictContact</name> <name>DistrictContact</name>
<title>District Contact</title> <title>Supervisor</title>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<icon>VAADIN:GLOBE</icon> <icon>VAADIN:GLOBE</icon>
<filterView>DistrictContactFilter_view</filterView> <filterView>DistrictContactFilter_view</filterView>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment