Skip to content
Snippets Groups Projects
Commit 3d736586 authored by dsg03695's avatar dsg03695
Browse files

Merge into current branche successfully to keep the project up-to-date

parents dc4ad45f 988923a6
No related branches found
No related tags found
No related merge requests found
...@@ -10,4 +10,4 @@ ...@@ -10,4 +10,4 @@
<column name="VALIDTO" type="DATETIME" /> <column name="VALIDTO" type="DATETIME" />
</addColumn> </addColumn>
</changeSet> </changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file \ No newline at end of file
...@@ -19,4 +19,4 @@ ...@@ -19,4 +19,4 @@
<!--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"/>--> <!--<include relativeToChangelogFile="true" file="basic/_demoData/changelog.xml" context="example"/>-->
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
...@@ -15891,8 +15891,20 @@ ...@@ -15891,8 +15891,20 @@
<isUnique v="false" /> <isUnique v="false" />
<index v="false" /> <index v="false" />
<documentation></documentation> <documentation></documentation>
<title></title> <title>District</title>
<description></description> <description></description>
<customProperties>
<customBooleanProperty>
<name>log</name>
<global v="false" />
<property v="true" />
</customBooleanProperty>
<customJDitoProperty>
<name>translate4Log</name>
<global v="false" />
<property>%aditoprj%/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/districtcontact/entityfields/district_id/customproperties/translate4log/property.js</property>
</customJDitoProperty>
</customProperties>
</entityFieldDb> </entityFieldDb>
<entityFieldDb> <entityFieldDb>
<name>CONTACT_ID</name> <name>CONTACT_ID</name>
......
import("system.translate");
import("Keyword_lib");
import("KeywordRegistry_basic");
import("District_lib");
import("system.result");
import("Loghistory_lib");
import("Contact_lib");
var params = Translate4LogParams.load();
if (params.action == 'I')
{
//Gebiet und Betreur umschlüsseln
var arrDistrictContact = DistrictUtils.getDataFromDistrictContact(params.rowId);
var districtName = DistrictUtils.getDistrictName(arrDistrictContact[0]);
var adviserName = ContactUtils.getTitleByContactId(arrDistrictContact[1]);
result.string(districtName + " (" + params.value + "); " + translate.text("Adviser") + ": " + adviserName);
}
else if (params.action == 'D')
{
result.string(params.value);
}
\ No newline at end of file
...@@ -8,12 +8,17 @@ import("Contact_lib"); ...@@ -8,12 +8,17 @@ import("Contact_lib");
var params = Translate4LogParams.load(); var params = Translate4LogParams.load();
//Keyword umschlüsseln //Statusänderung protokollieren
var keyname = KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), params.value); if (params.action == 'U')
{
//Keyword umschlüsseln
var keyname = KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), params.value);
//Gebiet und Betreur umschlüsseln //Gebiet und Betreur umschlüsseln
var arrDistrictContact = DistrictUtils.getDataFromDistrictContact(params.rowId); var arrDistrictContact = DistrictUtils.getDataFromDistrictContact(params.rowId);
var districtName = DistrictUtils.getDistrictName(arrDistrictContact[0]); var districtName = DistrictUtils.getDistrictName(arrDistrictContact[0]);
var adviserName = ContactUtils.getFullTitleByContactId(arrDistrictContact[1]) //var adviserName = ContactUtils.getFullTitleByContactId(arrDistrictContact[1]);
var adviserName = ContactUtils.getTitleByContactId(arrDistrictContact[1]);
result.string(keyname + " (" + translate.text("District") + ": " + districtName + "; " + translate.text("Adviser") + ": " + adviserName + ")");
\ No newline at end of file result.string(keyname + " (" + translate.text("District") + ": " + districtName + "; " + translate.text("Adviser") + ": " + adviserName + ")");
}
\ No newline at end of file
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
<documentation>%aditoprj%/entity/District_entity/documentation.adoc</documentation> <documentation>%aditoprj%/entity/District_entity/documentation.adoc</documentation>
<icon>VAADIN:GLOBE</icon> <icon>VAADIN:GLOBE</icon>
<title>District definition</title> <title>District definition</title>
<grantDelete v="false" />
<grantDeleteProcess>%aditoprj%/entity/District_entity/grantDeleteProcess.js</grantDeleteProcess>
<contentTitleProcess>%aditoprj%/entity/District_entity/contentTitleProcess.js</contentTitleProcess> <contentTitleProcess>%aditoprj%/entity/District_entity/contentTitleProcess.js</contentTitleProcess>
<iconIdProcess>%aditoprj%/entity/District_entity/iconIdProcess.js</iconIdProcess> <iconIdProcess>%aditoprj%/entity/District_entity/iconIdProcess.js</iconIdProcess>
<titlePlural></titlePlural> <titlePlural></titlePlural>
...@@ -316,6 +318,7 @@ ...@@ -316,6 +318,7 @@
<isPageable v="false" /> <isPageable v="false" />
<conditionProcess>%aditoprj%/entity/District_entity/recordcontainers/db/conditionProcess.js</conditionProcess> <conditionProcess>%aditoprj%/entity/District_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<orderClauseProcess>%aditoprj%/entity/District_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> <orderClauseProcess>%aditoprj%/entity/District_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
<onDBDelete>%aditoprj%/entity/District_entity/recordcontainers/db/onDBDelete.js</onDBDelete>
<cacheType>GLOBAL</cacheType> <cacheType>GLOBAL</cacheType>
<cacheKeyProcess>%aditoprj%/entity/District_entity/recordcontainers/db/cacheKeyProcess.js</cacheKeyProcess> <cacheKeyProcess>%aditoprj%/entity/District_entity/recordcontainers/db/cacheKeyProcess.js</cacheKeyProcess>
<linkInformation> <linkInformation>
......
import("system.result");
import("Sql_lib");
import("system.vars");
//Ist das zu löschende Gebiet ein übergeordnetes Gebiet, dann ist das Löschen nicht erlaubt.
var districtId = vars.get("$field.DISTRICTID");
var anzahl = newSelect("COUNT(*)")
.from("DISTRICT")
.where("DISTRICT.PARENTDISTRICT_DISTRICTID", districtId)
.cell(true);
if (anzahl > 0)
result.string(false);
else
result.string(true);
import("Sql_lib");
import("system.vars");
import("system.db");
var condition;
var deleteArray = [];
var districtId = vars.get("$field.DISTRICTID");
//Gebiet wird gelöscht -> auch die Referenzen in den folgenden Tabellen löschen
condition = newWhere("DISTRICTCONTACT.DISTRICT_ID", districtId);
deleteArray.push(["DISTRICTCONTACT", condition.build()]);
condition = newWhere("DISTRICTRESPONSIBLE.DISTRICT_ID", districtId);
deleteArray.push(["DISTRICTRESPONSIBLE", condition.build()]);
db.deletes(deleteArray);
\ No newline at end of file
...@@ -155,15 +155,15 @@ DistrictUtils.assignDistrict = function (pDistrictId, pAppliedFilter) ...@@ -155,15 +155,15 @@ DistrictUtils.assignDistrict = function (pDistrictId, pAppliedFilter)
"STATUS", "STATUS",
"VALID_FROM", "VALID_FROM",
"VALID_UNTIL", "VALID_UNTIL",
"ORIGIN"/*, "ORIGIN",
"USER_NEW", "USER_NEW",
"DATE_NEW"*/ "DATE_NEW"
]; ];
var updateArray = []; var updateArray = [];
var colsUpdate = [ var colsUpdate = [
"STATUS"/*, "STATUS",
"USER_EDIT", "USER_EDIT",
"DATE_EDIT"*/ "DATE_EDIT"
]; ];
//Anlegen der Firmen-Betreuer-Datensätze in der Tabelle DISTRICTCONTACT //Anlegen der Firmen-Betreuer-Datensätze in der Tabelle DISTRICTCONTACT
...@@ -201,9 +201,9 @@ DistrictUtils.assignDistrict = function (pDistrictId, pAppliedFilter) ...@@ -201,9 +201,9 @@ DistrictUtils.assignDistrict = function (pDistrictId, pAppliedFilter)
arrResponsibleIds[j][2], arrResponsibleIds[j][2],
arrResponsibleIds[j][3], arrResponsibleIds[j][3],
arrResponsibleIds[j][4], arrResponsibleIds[j][4],
$KeywordRegistry.districtOrigin$auto()/*, $KeywordRegistry.districtOrigin$auto(),
vars.get("$sys.user"), vars.get("$sys.user"),
vars.get("$sys.date")*/ vars.get("$sys.date")
]; ];
insertArray.push(["DISTRICTCONTACT", colsInsert, null, valsInsert]); insertArray.push(["DISTRICTCONTACT", colsInsert, null, valsInsert]);
} }
...@@ -219,9 +219,9 @@ DistrictUtils.assignDistrict = function (pDistrictId, pAppliedFilter) ...@@ -219,9 +219,9 @@ DistrictUtils.assignDistrict = function (pDistrictId, pAppliedFilter)
for (var l=0; l<arrExistingIds.length; l++) for (var l=0; l<arrExistingIds.length; l++)
{ {
var valsUpdate = [ var valsUpdate = [
$KeywordRegistry.contactStatus$inReview()/*, $KeywordRegistry.contactStatus$inReview(),
vars.get("$sys.user"), vars.get("$sys.user"),
vars.get("$sys.date")*/ vars.get("$sys.date")
]; ];
var condition = newWhere("DISTRICTCONTACT.DISTRICTCONTACTID", arrExistingIds[l][0]); var condition = newWhere("DISTRICTCONTACT.DISTRICTCONTACTID", arrExistingIds[l][0]);
updateArray.push(["DISTRICTCONTACT", colsUpdate, null, valsUpdate, condition.build()]); updateArray.push(["DISTRICTCONTACT", colsUpdate, null, valsUpdate, condition.build()]);
......
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