Skip to content
Snippets Groups Projects
Commit 7d0047f5 authored by dsg03695's avatar dsg03695
Browse files

Merge completed

parents 353d3dc1 eb6a4681
No related branches found
No related tags found
No related merge requests found
Showing
with 576 additions and 99 deletions
......@@ -19,4 +19,4 @@
<!--enable this only when you definetly want to overwrite the existing data with demo records:-->
<!--<include relativeToChangelogFile="true" file="basic/_demoData/changelog.xml" context="example"/>-->
</databaseChangeLog>
\ No newline at end of file
</databaseChangeLog>
......@@ -15791,7 +15791,7 @@
<description></description>
<auditSyncConfig>
<name>auditSyncConfig</name>
<auditMode v="0" />
<auditMode v="1" />
<syncActive v="false" />
<syncComplete v="true" />
<syncDirection v="1" />
......@@ -15823,8 +15823,20 @@
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<title>District assignment status</title>
<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/status/customproperties/translate4log/property.js</property>
</customJDitoProperty>
</customProperties>
</entityFieldDb>
<entityFieldDb>
<name>ADVISER_ROLE</name>
......@@ -15895,6 +15907,18 @@
<documentation></documentation>
<title></title>
<description></description>
<customProperties>
<customBooleanProperty>
<name>log</name>
<global v="false" />
<property v="false" />
</customBooleanProperty>
<customStringProperty>
<name>tableRef</name>
<global v="false" />
<property>CONTACT</property>
</customStringProperty>
</customProperties>
</entityFieldDb>
<entityFieldDb>
<name>VALID_FROM</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();
//Keyword umschlüsseln
var keyname = KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), params.value);
//Gebiet und Betreur umschlüsseln
var arrDistrictContact = DistrictUtils.getDataFromDistrictContact(params.rowId);
var districtName = DistrictUtils.getDistrictName(arrDistrictContact[0]);
var adviserName = ContactUtils.getFullTitleByContactId(arrDistrictContact[1])
result.string(keyname + " (" + translate.text("District") + ": " + districtName + "; " + translate.text("Adviser") + ": " + adviserName + ")");
\ No newline at end of file
......@@ -259,6 +259,22 @@
<dropDownProcess>%aditoprj%/entity/District_entity/entityfields/district_autoadd/dropDownProcess.js</dropDownProcess>
<valueProcess>%aditoprj%/entity/District_entity/entityfields/district_autoadd/valueProcess.js</valueProcess>
</entityField>
<entityActionField>
<name>assignDistrict</name>
<title>Assign district</title>
<onActionProcess>%aditoprj%/entity/District_entity/entityfields/assigndistrict/onActionProcess.js</onActionProcess>
</entityActionField>
<entityActionGroup>
<name>ActionGroup</name>
<children>
<entityActionField>
<name>assignAllActiveDistricts</name>
<title>Assign all selected districts</title>
<onActionProcess>%aditoprj%/entity/District_entity/entityfields/actiongroup/children/assignallactivedistricts/onActionProcess.js</onActionProcess>
<isObjectAction v="false" />
</entityActionField>
</children>
</entityActionGroup>
<entityProvider>
<name>DistrictContacts</name>
<dependencies>
......
import("system.vars");
import("system.question");
import("system.translate");
import("District_lib");
var arrDistrictIds = vars.get("$sys.selection");
question.showMessage(translate.text("Assignment for all selected districts will start now!"));
DistrictUtils.assignDistrictOnServer(arrDistrictIds);
\ No newline at end of file
import("District_lib");
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
//Aufbau des kompletten Filters über alle Hierarchie-Ebenen hinweg
var appliedFilter = DistrictUtils.getAppliedFilter(vars.get("$field.DISTRICT_FILTER"), vars.get("$field.PARENTDISTRICT_DISTRICTID"));
result.string(appliedFilter);
import("system.question");
import("system.translate");
import("District_lib");
import("system.vars");
var arrDistrictId = [vars.get("$field.DISTRICTID")];
question.showMessage(translate.text("District assignment will start now!"));
DistrictUtils.assignDistrictOnServer(arrDistrictId);
import("District_lib");
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
//Aufbau des übergeordneten Filters
var res = DistrictUtils.getParentFilter(vars.get("$field.PARENTDISTRICT_DISTRICTID"));
result.string(res);
<?xml version="1.0" encoding="UTF-8"?>
<neonNotificationType xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonNotificationType/1.1.0">
<name>DistrictAssigned</name>
<title>District assigned</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<icon>VAADIN:GLOBE</icon>
</neonNotificationType>
......@@ -12,6 +12,7 @@
<treeTableViewTemplate>
<name>treetableViewTemplate</name>
<parentField>PARENTDISTRICT_DISTRICTID</parentField>
<favoriteActionGroup1>ActionGroup</favoriteActionGroup1>
<hideContentSearch v="false" />
<showChildrenCount v="false" />
<entityField>#ENTITY</entityField>
......
......@@ -37,4 +37,36 @@
<entry>
<key>Field Service</key>
<value>Außendienst</value>
</entry>
<entry>
<key>Assign district</key>
<value>Gebiet zuordnen</value>
</entry>
<entry>
<key>District assignment will start now!</key>
<value>Die Gebietszuordnung wird jetzt gestartet!</value>
</entry>
<entry>
<key>Assignment of district \"%0\" is completed!</key>
<value>Zuordnung des Gebietes \"%0\" ist abgeschlossen!</value>
</entry>
<entry>
<key>%0 companies were newley assigned. \n%1 companies are no longer assigned (these assignments got the status 'review'). \n%2 valid assignments were unchanged.\nThe Process took %3 seconds.</key>
<value>%0 Firmen wurden neu hinzugefügt. \n %1 Firmen sind nicht länger zugeordnet (diese Zuordnungen wurden auf den Status 'zur Prüfung' gesetzt). \n %2 gültige Zuordnungen blieben unverändert. \n Der Prozess dauert %3 Sekunden. </value>
</entry>
<entry>
<key>District assignment status</key>
<value>Gebietzuordnungstatus</value>
</entry>
<entry>
<key>Assign all selected districts</key>
<value>Zuordnung für alle selektierten Gebiete</value>
</entry>
<entry>
<key>Assignment for all selected districts will start now!</key>
<value>Zuordnung für alle selektierten Gebiete wird jetzt gestartet</value>
</entry>
<entry>
<key>Assignment of all selected districts is completed!</key>
<value>Zuordnung für alle selektierten Gebiete abgeschlossen</value>
</entry>
\ No newline at end of file
......@@ -27,4 +27,28 @@
</entry>
<entry>
<key>Field Service</key>
</entry>
<entry>
<key>Assign district</key>
</entry>
<entry>
<key>District assignment will start now!</key>
</entry>
<entry>
<key>Assignment of district \"%0\" is completed!</key>
</entry>
<entry>
<key>%0 companies were newley assigned. \n%1 companies are no longer assigned (these assignments got the status 'review'). \n%2 valid assignments were unchanged.\nThe Process took %3 seconds.</key>
</entry>
<entry>
<key>District assignment status</key>
</entry>
<entry>
<key>Assign all selected districts</key>
</entry>
<entry>
<key>Assignment for all selected districts will start now!</key>
</entry>
<entry>
<key>Assignment of all selected districts is completed!</key>
</entry>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.1">
<name>District_lib</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<process>%aditoprj%/process/District_lib/process.js</process>
<alias>Data_alias</alias>
<variants>
<element>LIBRARY</element>
</variants>
</process>
import("KeywordRegistry_basic");
import("system.vars");
import("system.util");
import("Sql_lib");
import("Util_lib");
import("system.db");
import("system.indexsearch");
import("JditoFilter_lib");
import("Util_lib");
import("system.process");
import("Employee_lib");
/**
* Functions for district.
*/
function DistrictUtils () {}
/**
* Gets the name of a district
*
* @param {String} pDistrictId <p>
* Id of the district.<br>
* @return {String} <p>
* Name of the district.<br>
*/
DistrictUtils.getDistrictName = function (pDistrictId)
{
var districtName = newSelect("DISTRICT_NAME")
.from("DISTRICT")
.where("DISTRICT.DISTRICTID", pDistrictId)
.cell(true);
return(districtName)
}
/**
* Get data from district
*
* @param {String} pDistrictId <p>
* ID of a district<br>
* @return {Array} <p>
* array of data from a district <br>
*/
DistrictUtils.getDataFromDistrict = function (pDistrictId)
{
var districtData = newSelect("DISTRICT_FILTER, PARENTDISTRICT_DISTRICTID")
.from("DISTRICT")
.where("DISTRICT.DISTRICTID", pDistrictId)
.arrayRow();
return(districtData);
}
/**
* Get data from a special district
*
* @param {String} pDistrictContactId <p>
* Id of the districtcontact.<br>
* @return {Array} <p>
* array of data from one districtcontact dataset <br>
*/
DistrictUtils.getDataFromDistrictContact = function (pDistrictContactId)
{
var arrData = newSelect("DISTRICT_ID, ADVISER_CONTACT_ID")
.from("DISTRICTCONTACT")
.where("DISTRICTCONTACT.DISTRICTCONTACTID", pDistrictContactId)
.arrayRow();
return(arrData);
}
/**
* Executes a process to assign districts on the server and creates a notification when finished.
*
* @param {Array} pArrDistrictIds <p>
* Array of district-IDs.<br>
* @param {String} pUser=currentUser (optional) <p>
* User that will get the notification, <br>
* if null (not undefined!), no notification<br>
* will be created.<br>
*/
DistrictUtils.assignDistrictOnServer = function (pArrDistrictIds, pUser)
{
//pUser hat folgendes Format: _____USER_bcdfb521-c7d0-4ef1-8916-78e7d3232046
if (pUser === undefined)
pUser = EmployeeUtils.getCurrentUserId();
var processConfig = process.createStartAsyncConfig()
.setName("assignDistrict_serverProcess")
.setLocalVariables({
arrDistrictIds : pArrDistrictIds.join(";"),
user : pUser || ""
})
.setUser(pUser)
process.startAsync(processConfig);
}
/**
* Assignes a district to companies. You should only call this function on the server because it
* can take some time to execute, use DistrictUtils.assignDistrictOnServer instead.
*
* @param {String} pDistrictId <p>
* Id of the district.<br>
* @param {String} pAppliedFilter <p>
* Filter condition to get the assigned companies.<br>
* @return {Object} <p>
* Count of new assigned companies and no longer assigned companies.<br>
*/
DistrictUtils.assignDistrict = function (pDistrictId, pAppliedFilter)
{
var newAssigned = 0;
var unchanged = 0;
var invalid = 0;
//Einlesen von allen bereits existierenden automatischen Zuordnungen,
//die nicht auf Status 'zur Prüfung' sthen
var arrExistingIds = new SqlBuilder()
.select("DISTRICTCONTACT.DISTRICTCONTACTID, DISTRICTCONTACT.CONTACT_ID, DISTRICTCONTACT.ADVISER_CONTACT_ID")
.from("DISTRICTCONTACT")
.where("DISTRICTCONTACT.DISTRICT_ID", pDistrictId)
.and ("DISTRICTCONTACT.ORIGIN", $KeywordRegistry.districtOrigin$auto())
.and ("DISTRICTCONTACT.STATUS", $KeywordRegistry.contactStatus$inReview(), SqlBuilder.NOT_EQUAL())
.table();
//Einlesen aller Betreuer, die dem übergebenen Gebiet zugeordnet sind
var arrResponsibleIds = new SqlBuilder()
.select("DISTRICTRESPONSIBLE.EMPLOYEE_CONTACT_ID, DISTRICTRESPONSIBLE.ADVISER_ROLE, " +
"DISTRICTRESPONSIBLE.ADVISER_STATUS, DISTRICTRESPONSIBLE.VALID_FROM, DISTRICTRESPONSIBLE.VALID_UNTIL")
.from("DISTRICTRESPONSIBLE")
.where("DISTRICTRESPONSIBLE.DISTRICT_ID", pDistrictId)
.table();
//Aufbereiten des im JSON-Format übergebenen Filters in eine SQL-Condition
var appliedFilterCondition = JSON.parse(pAppliedFilter).filter;
appliedFilterCondition = JSON.stringify(appliedFilterCondition);
var sqlCondition = db.toFilterCondition(appliedFilterCondition, "Organisation_entity")
//Einlesen der Contact-IDs zu den Firmen, die gemäß Filter diesem Gebiet zugeordnet sind
var arrOrgContactIds = new SqlBuilder()
.selectDistinct("CONTACT.CONTACTID")
.from("ORGANISATION")
.join("CONTACT", newWhere("ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID").and("CONTACT.PERSON_ID is null"))
.leftJoin("ADDRESS", "ADDRESS.ADDRESSID = CONTACT.ADDRESS_ID")
.leftJoin("CLASSIFICATIONSTORAGE", "CLASSIFICATIONSTORAGE.OBJECT_ROWID = CONTACT.CONTACTID")
.whereIfSet(sqlCondition)
.arrayColumn();
var insertArray = [];
var colsInsert = [
"DISTRICTCONTACTID",
"CONTACT_ID",
"DISTRICT_ID",
"ADVISER_CONTACT_ID",
"ADVISER_ROLE",
"STATUS",
"VALID_FROM",
"VALID_UNTIL",
"ORIGIN"/*,
"USER_NEW",
"DATE_NEW"*/
];
var updateArray = [];
var colsUpdate = [
"STATUS"/*,
"USER_EDIT",
"DATE_EDIT"*/
];
//Anlegen der Firmen-Betreuer-Datensätze in der Tabelle DISTRICTCONTACT
for (var i=0; i<arrOrgContactIds.length; i++)
{
for (var j=0; j<arrResponsibleIds.length; j++)
{
//Existiert der Firmen-Betreuer-Datensatz bereits?
var found = 'N'
for (var k=0; k<arrExistingIds.length; k++)
{
if (arrExistingIds[k][1] == arrOrgContactIds[i] && arrExistingIds[k][2] == arrResponsibleIds[j][0])
{
unchanged++;
found = 'Y';
//Gefundenen Eintrag aus dem Array entfernen
//-> Am Schluss bleiben in dem Array alle ungültigen Datensätze übrig. Bei diesen wird weiter unten der Status geändert
arrExistingIds.splice(k, 1);
break;
}
}
//Firmen-Betreuer-Datensatz existiert noch nicht -> Insert
if (found == 'N')
{
//Falls Status null, dann auf active setzen
if (Utils.isNullOrEmpty(arrResponsibleIds[j][2]))
arrResponsibleIds[j][2] = $KeywordRegistry.contactStatus$active();
var valsInsert = [
util.getNewUUID(),
arrOrgContactIds[i],
pDistrictId,
arrResponsibleIds[j][0],
arrResponsibleIds[j][1],
arrResponsibleIds[j][2],
arrResponsibleIds[j][3],
arrResponsibleIds[j][4],
$KeywordRegistry.districtOrigin$auto()/*,
vars.get("$sys.user"),
vars.get("$sys.date")*/
];
insertArray.push(["DISTRICTCONTACT", colsInsert, null, valsInsert]);
}
}
}
newAssigned = insertArray.length;
db.inserts(insertArray);
//Gibt es noch ungültige Zuordnungen, dann bei diesen den Status auf "zur Prüfung setzen"
if (arrExistingIds.length > 0)
{
invalid = arrExistingIds.length;
for (var l=0; l<arrExistingIds.length; l++)
{
var valsUpdate = [
$KeywordRegistry.contactStatus$inReview()/*,
vars.get("$sys.user"),
vars.get("$sys.date")*/
];
var condition = newWhere("DISTRICTCONTACT.DISTRICTCONTACTID", arrExistingIds[l][0]);
updateArray.push(["DISTRICTCONTACT", colsUpdate, null, valsUpdate, condition.build()]);
}
db.updates(updateArray)
}
return {
newAssigned : newAssigned,
invalid : invalid,
unchanged : unchanged
};
}
/**
* Get the complete hierarchical filter
*
* @param {JSON-String} pDistrictFilter <p>
* The filter of the current level<br>
* @param {String} pParentDistrict_DistrictId <p>
* District-ID of the parent district<br>*
* @return {JSON-String} <p>
* JSON-String of the complete filter (all levels) <br>
*/
DistrictUtils.getAppliedFilter = function (pDistrictFilter, pParentDistrict_DistrictId)
{
var parentFilter = DistrictUtils.getParentFilter(pParentDistrict_DistrictId);
var appliedFilter = {
entity: "Organisation_entity",
filter: {
type: "group",
operator: "AND",
childs: []
}};
if (parentFilter)
{
appliedFilter.filter.childs.push(JSON.parse(parentFilter).filter);
}
if (pDistrictFilter)
{
appliedFilter.filter.childs.push(JSON.parse(pDistrictFilter).filter);
}
return JSON.stringify(appliedFilter);
}
/**
* Get the filter starting with the parent level
* @param {String} pParentDistrict_DistrictId <p>
* District-ID of the parent district<br>
* @return {JSON-String} <p>
* JSON-String of the filter starting with the parent<br>
*/
DistrictUtils.getParentFilter = function (pParentDistrict_DistrictId)
{
var res = "";
if (pParentDistrict_DistrictId)
{
var completeParentFilter = DistrictUtils._getParentFilter(pParentDistrict_DistrictId, null);
completeParentFilter.entity = "Organisation_entity";
res = completeParentFilter;
}
else
{
var entity = "Organisation_entity";
var emptyFilter = {
entity: entity,
filter: {
type: "group",
operator: "AND",
childs: []
}
};
res = emptyFilter;
}
return JSON.stringify(res);
}
/**
* This function will recursively go through each filter level up to the root.
* @param {String} pParentDistrict_DistrictId <p>
* District-ID of the parent district<br>
* @param {JSON} pPreviousFilter <p>
* Collected filters so far<br>
* @return {JSON} <p>
* JSON-Object of the collected filters<br>
*/
DistrictUtils._getParentFilter = function (pParentDistrict_DistrictId, pPreviousFilter)
{
var resFilter;
if (pPreviousFilter != null)
{
resFilter = pPreviousFilter;
}
if (pParentDistrict_DistrictId)
{
var parentDistrictFilter, grandParentDistrict;
[parentDistrictFilter, grandParentDistrict] = newSelect(["DISTRICT.DISTRICT_FILTER", "DISTRICT.PARENTDISTRICT_DISTRICTID"])
.from("DISTRICT")
.where("DISTRICT.DISTRICTID", pParentDistrict_DistrictId)
.arrayRow();
parentDistrictFilter = JSON.parse(parentDistrictFilter);
if (pPreviousFilter)
parentDistrictFilter.filter.childs.push(resFilter.filter);
resFilter = parentDistrictFilter;
if (grandParentDistrict.length > 0)
{
resFilter = DistrictUtils._getParentFilter(grandParentDistrict, resFilter);
}
}
return resFilter;
}
\ No newline at end of file
......@@ -41,7 +41,7 @@ $KeywordRegistry.activityDirection$internal = function(){return "x";};
$KeywordRegistry.contactStatus = function(){return "ContactStatus";};
$KeywordRegistry.contactStatus$active = function(){return "CONTACTSTATACTIVE";};
$KeywordRegistry.contactStatus$inactive = function(){return "CONTACTSTATINACTIVE";};
$KeywordRegistry.contactStatus$reviewed = function(){return "CONTACTSTATREVIEW";};
$KeywordRegistry.contactStatus$inReview = function(){return "CONTACTSTATREVIEW";};
$KeywordRegistry.currency = function(){return "Currency";};
$KeywordRegistry.currency$eur = function(){return "EUR";};
......
<?xml version="1.0" encoding="UTF-8"?>
<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.1">
<name>assignDistrict_serverProcess</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<process>%aditoprj%/process/assignDistrict_serverProcess/process.js</process>
<alias>Data_alias</alias>
<variants>
<element>EXECUTABLE</element>
</variants>
</process>
import("system.datetime");
import("Sql_lib");
import("system.db");
import("system.util");
import("system.translate");
import("system.vars");
import("system.notification");
import("District_lib");
var res;
var message;
var description;
var newAssigned = 0;
var unchanged = 0;
var invalid = 0;
var startTime = datetime.date();
var user = vars.get("$local.user");
var arrDistrictIds = vars.get("$local.arrDistrictIds").split(";");
//Alle übergebenen Gebiete bearbeiten
for (var i=0; i<arrDistrictIds.length; i++)
{
//Pro Gebiet den kompletten hierarchieschen Filter aufbauen
var districtData = DistrictUtils.getDataFromDistrict(arrDistrictIds[i]);
var completeFilter = DistrictUtils.getAppliedFilter(districtData[0], districtData[1])
//Automatische Zuordnung
res = DistrictUtils.assignDistrict(arrDistrictIds[i], completeFilter);
newAssigned += res.newAssigned;
unchanged += res.unchanged;
invalid += res.invalid;
}
if (arrDistrictIds.length == 1)
{
var districtName = DistrictUtils.getDistrictName(arrDistrictIds[0]);
message = translate.withArguments("Assignment of district \"%0\" is completed!", [districtName]);
}
else
message = translate.text("Assignment of all selected districts is completed!");
// Benachrichtigung am Ende der Zuordnungen
description = translate.withArguments("%0 companies were newley assigned. \n" +
"%1 companies are no longer assigned (these assignments got the status 'review'). \n" +
"%2 valid assignments were unchanged.\n" +
"The Process took %3 seconds.",
[newAssigned, invalid, unchanged, Math.round((datetime.date() - startTime) / datetime.ONE_SECOND)])
notification.addNotification(util.getNewUUID(), null, null, null, "DistrictAssigned", notification.PRIO_NORMAL, 2, notification.STATE_UNSEEN, [user], message, description);
\ No newline at end of file
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