Skip to content
Snippets Groups Projects
Commit b87c497c authored by Alexander Vögl's avatar Alexander Vögl
Browse files

Merge branch '2020.1' into '2020.1.0_OrderRefactoring'

# Conflicts:
#   .liquibase/Data_alias/basic/2020.1.2/changelog.xml
parents 8f497347 ad84517f
No related branches found
No related tags found
No related merge requests found
Showing
with 106 additions and 112 deletions
import("system.neon");
import("system.vars");
import("Context_lib");
import("Attribute_lib");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
AttributeRelationUtils.presetMandatoryAttributes(ContextUtils.getCurrentContextId(), "Attributes");
\ No newline at end of file
import("Keyword_lib");
import("KeywordRegistry_basic");
import("system.result");
var statusInactive = $KeywordRegistry.contactStatus$inactive();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "NOT_EQUAL",
contenttype: "TEXT",
key: statusInactive,
value: KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), statusInactive)
}]
};
result.string(JSON.stringify(filter));
\ No newline at end of file
import("Keyword_lib");
import("KeywordRegistry_basic");
import("system.neon");
import("system.vars");
import("Context_lib");
import("Attribute_lib");
var statusFilterElement = {
"type":"row",
"name":"STATUS",
"operator":"NOT_EQUAL",
"key":$KeywordRegistry.contactStatus$inactive(),
"contenttype": "TEXT"
};
statusFilterElement.value = KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), statusFilterElement.key);
var filter = {
"type":"group",
"operator":"AND",
"childs": [statusFilterElement]
};
filter = JSON.stringify(filter);
neon.setFilter("#ENTITY", filter);
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
AttributeRelationUtils.presetMandatoryAttributes(ContextUtils.getCurrentContextId(), "Attributes");
}
......@@ -96,6 +96,7 @@
<isMenuAction v="true" />
<isObjectAction v="false" />
<isSelectionAction v="false" />
<iconId>VAADIN:USER</iconId>
<state>AUTO</state>
<tooltip></tooltip>
</entityActionField>
......@@ -104,6 +105,7 @@
<title>Receive new Department Permission</title>
<onActionProcess>%aditoprj%/entity/PermissionCalendar_entity/entityfields/addactions/children/receivenewdepartmentpermissiondealteraction/onActionProcess.js</onActionProcess>
<isObjectAction v="false" />
<iconId>VAADIN:GROUP</iconId>
<state>AUTO</state>
</entityActionField>
</children>
......
......@@ -10,9 +10,10 @@
</siblings>
<grantDeleteProcess>%aditoprj%/entity/Person_entity/grantDeleteProcess.js</grantDeleteProcess>
<contentTitleProcess>%aditoprj%/entity/Person_entity/contentTitleProcess.js</contentTitleProcess>
<onInit>%aditoprj%/entity/Person_entity/onInit.js</onInit>
<afterUiInit>%aditoprj%/entity/Person_entity/afterUiInit.js</afterUiInit>
<onValidation>%aditoprj%/entity/Person_entity/onValidation.js</onValidation>
<afterOperatingState>%aditoprj%/entity/Person_entity/afterOperatingState.js</afterOperatingState>
<initFilterProcess>%aditoprj%/entity/Person_entity/initFilterProcess.js</initFilterProcess>
<iconId>VAADIN:USERS</iconId>
<imageProcess>%aditoprj%/entity/Person_entity/imageProcess.js</imageProcess>
<usePermissions v="false" />
......
import("system.neon");
import("system.vars");
import("Context_lib");
import("Attribute_lib");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
AttributeRelationUtils.presetMandatoryAttributes(ContextUtils.getCurrentContextId(), "Attributes");
\ No newline at end of file
import("Keyword_lib");
import("KeywordRegistry_basic");
import("system.result");
var statusInactive = $KeywordRegistry.contactStatus$inactive();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "NOT_EQUAL",
contenttype: "TEXT",
key: statusInactive,
value: KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), statusInactive)
}]
};
result.string(JSON.stringify(filter));
\ No newline at end of file
import("Keyword_lib");
import("KeywordRegistry_basic");
import("system.neon");
import("system.vars");
import("Context_lib");
import("Attribute_lib");
var statusFilterElement = {
"type":"row",
"name":"STATUS",
"operator":"NOT_EQUAL",
"key":$KeywordRegistry.contactStatus$inactive(),
"contenttype": "TEXT"
};
statusFilterElement.value = KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), statusFilterElement.key);
var filter = {
"type":"group",
"operator":"AND",
"childs": [statusFilterElement]
};
filter = JSON.stringify(filter);
neon.setFilter("#ENTITY", filter);
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
AttributeRelationUtils.presetMandatoryAttributes(ContextUtils.getCurrentContextId(), "Attributes");
}
import("system.translate");
import("system.result");
import("Date_lib");
import("system.vars");
......@@ -6,4 +7,6 @@ var startDate = vars.get("$field.STARTDATE");
var endDate = vars.get("$field.ENDDATE");
if (!DateUtils.validateBeginnBeforeEnd(startDate, endDate))
result.string(DateUtils.getValidationFailString());
\ No newline at end of file
result.string(DateUtils.getValidationFailString());
else if(!vars.get("$field.PROJECTTITLE") && vars.get("$field.PROJECTTYPE") && vars.exists("$param.PresetTitle_param"))
result.string(translate.text("The Sales Project can only be filled when a company has been specified"));
\ No newline at end of file
......@@ -6,8 +6,9 @@
<title>Task</title>
<grantDeleteProcess>%aditoprj%/entity/Task_entity/grantDeleteProcess.js</grantDeleteProcess>
<contentTitleProcess>%aditoprj%/entity/Task_entity/contentTitleProcess.js</contentTitleProcess>
<onInit>%aditoprj%/entity/Task_entity/onInit.js</onInit>
<afterUiInit>%aditoprj%/entity/Task_entity/afterUiInit.js</afterUiInit>
<onValidation>%aditoprj%/entity/Task_entity/onValidation.js</onValidation>
<initFilterProcess>%aditoprj%/entity/Task_entity/initFilterProcess.js</initFilterProcess>
<iconId>VAADIN:TASKS</iconId>
<iconIdProcess>%aditoprj%/entity/Task_entity/iconIdProcess.js</iconIdProcess>
<titlePlural>Tasks</titlePlural>
......
import("system.neon");
import("system.vars");
import("ActivityTask_lib");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
TaskUtils.addLinkRecords("$param.ObjectId_param", "$param.RowId_param", "$param.PresetLinks_param", "$field.PARENT_CONTEXT", "$field.PARENT_ID");
\ No newline at end of file
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
var statusEnded = $KeywordRegistry.taskStatus$ended();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "NOT_EQUAL",
contenttype: "TEXT",
key: statusEnded,
value: KeywordUtils.getViewValue($KeywordRegistry.taskStatus(), statusEnded)
}]
};
result.string(JSON.stringify(filter));
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.neon");
import("ActivityTask_lib");
import("Keyword_lib");
import("KeywordRegistry_basic");
var recordState = vars.get("$sys.recordstate");
if(recordState == neon.OPERATINGSTATE_NEW)
{
TaskUtils.addLinkRecords("$param.ObjectId_param", "$param.RowId_param", "$param.PresetLinks_param", "$field.PARENT_CONTEXT", "$field.PARENT_ID");
}
else if (recordState != neon.OPERATINGSTATE_SEARCH)
{
var statusFilterElement = {
"type":"row",
"name":"STATUS",
"operator":"NOT_EQUAL",
"key":$KeywordRegistry.taskStatus$ended(),
"contenttype": "TEXT"
};
statusFilterElement.value = KeywordUtils.getViewValue($KeywordRegistry.taskStatus(), statusFilterElement.key);
var filter = {
"type":"group",
"operator":"AND",
"childs": [statusFilterElement]
};
filter = JSON.stringify(filter);
neon.setFilter("#ENTITY", filter);
}
\ No newline at end of file
......@@ -30,14 +30,14 @@
<displayValueProcess>%aditoprj%/entity/VisitPlanEntry_entity/entityfields/status/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
<name>ORGANISATION_ID</name>
<documentation>%aditoprj%/entity/VisitPlanEntry_entity/entityfields/organisation_id/documentation.adoc</documentation>
<name>ORGANISATION_CONTACT_ID</name>
<documentation>%aditoprj%/entity/VisitPlanEntry_entity/entityfields/organisation_contact_id/documentation.adoc</documentation>
<title>Organisation</title>
<consumer>Organisations</consumer>
<mandatory v="true" />
<stateProcess>%aditoprj%/entity/VisitPlanEntry_entity/entityfields/organisation_id/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/VisitPlanEntry_entity/entityfields/organisation_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/VisitPlanEntry_entity/entityfields/organisation_id/displayValueProcess.js</displayValueProcess>
<stateProcess>%aditoprj%/entity/VisitPlanEntry_entity/entityfields/organisation_contact_id/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/VisitPlanEntry_entity/entityfields/organisation_contact_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/VisitPlanEntry_entity/entityfields/organisation_contact_id/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
<name>ENTRYDATE</name>
......@@ -247,10 +247,10 @@
<name>END_TIME.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>ORGANISATION_ID.value</name>
<name>ORGANISATION_CONTACT_ID.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>ORGANISATION_ID.displayValue</name>
<name>ORGANISATION_CONTACT_ID.displayValue</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>CONTACT_ID.value</name>
......
......@@ -2,7 +2,8 @@
For storing Visitentries with their information(date, time, contact, and most importantly: it's Status).
Linked to VisitPlanEmployeeWeek_entity so you only see the entries in the chosen week.
ORGANISATION_ID is used to store the company that's being visited, CONTACT_ID to Store the Point-of-Contact,
ORGANISATION_CONTACT_ID is used to store the company that's being visited,
CONTACT_ID to Store the Point-of-Contact,
since you are normally visiting one specific person.
Keep in mind, that only the organization is important for the visitRecommendations and not the Point of Contact.
\ No newline at end of file
......@@ -3,7 +3,7 @@ import("system.result");
import("Contact_lib");
import("system.vars");
var orgId = vars.get("$field.ORGANISATION_ID");
var orgId = vars.get("$field.ORGANISATION_CONTACT_ID");
var contactId = vars.get("$field.CONTACT_ID");
var orgContactId = ContactUtils.getPersOrgIds(contactId)[2];
......
......@@ -12,6 +12,6 @@ if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.v
.from("CONTACT")
.where("CONTACT.CONTACTID", contactId)
.cell();
neon.setFieldValue("$field.ORGANISATION_ID", orgId);
neon.setFieldValue("$field.ORGANISATION_CONTACT_ID", orgId);
result.string(vars.get("$param.ContactId_param"));
}
\ No newline at end of file
......@@ -17,7 +17,7 @@ var pointOfContact = newSelect("CONTACT.CONTACTID", db.getCurrentAlias())
.leftJoin("AB_ATTRIBUTE", "AB_ATTRIBUTE.AB_ATTRIBUTEID = AB_ATTRIBUTERELATION.AB_ATTRIBUTE_ID")
.leftJoin("ORGANISATION", "ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID")
.where("AB_ATTRIBUTE.AB_ATTRIBUTEID", $AttributeRegistry.visitPlanPointOfContact())
.and("CONTACT.CONTACTID", vars.get("$field.ORGANISATION_ID"))
.and("CONTACT.CONTACTID", vars.get("$field.ORGANISATION_CONTACT_ID"))
.cell();
var context;
......@@ -25,7 +25,7 @@ if(pointOfContact)
links.push([ContactUtils.getContextByContactId(pointOfContact), pointOfContact]);
else
{
var contactId = vars.get("$field.ORGANISATION_ID");
var contactId = vars.get("$field.ORGANISATION_CONTACT_ID");
context = ContactUtils.getContextByContactId(contactId);
if(context == 'Person')
{
......
......@@ -40,8 +40,8 @@ var entryDateAsLong = selectionRowData[0].ENTRYDATE;
var entryDate = datetime.toDate(entryDateAsLong, "dd-MM-yyyy");
var startTime = selectionRowData[0].BEGIN_TIME;
var endTime = selectionRowData[0].END_TIME;
var organisation_id = selectionRowData[0].ORGANISATION_ID;
var organisationName = OrganisationUtils.getNameByOrganisationId(organisation_id);
var organisationContact_id = selectionRowData[0].ORGANISATION_CONTACT_ID;
var organisationName = OrganisationUtils.getNameByContactId(organisationContact_id);
var contact_id = selectionRowData[0].CONTACT_ID;
var contactName = ContactUtils.getFullTitleByContactId(contact_id);
var contactMail = CommUtil.getStandardSubSqlMail(contact_id)
......@@ -53,9 +53,9 @@ var department = contactData[0];
var contactRole = contactData[1];
var addressId = newSelect("CONTACT.ADDRESS_ID")
.from("CONTACT")
.where("CONTACT.CONTACTID", organisation_id)
.where("CONTACT.CONTACTID", organisationContact_id)
.cell();
var organisationAddress = new AddrObject(organisation_id);
var organisationAddress = new AddrObject(organisationContact_id);
var organisationAddressFormatted = organisationAddress.getFormattedAddress(false, "{salutation_name}\n {street} {buildingno}\n {country_short} - {zip} {city}");
var contactCommunication = newSelect("COMMUNICATION.MEDIUM_ID, COMMUNICATION.ADDR")
.from("COMMUNICATION")
......@@ -105,7 +105,7 @@ columnTypes = db.getColumnTypes("AB_APPOINTMENTLINK", columns, db.getCurrentAlia
values = [util.getNewUUID(),
uidAppointment[0],
"Organisation",
organisation_id]
organisationContact_id]
insert = db.insertData("AB_APPOINTMENTLINK", columns, columnTypes, values)
values = [util.getNewUUID(),
......
......@@ -59,7 +59,7 @@ if(vars.exists("$param.Entries_param") && vars.get("$param.Entries_param"))
var childAddresses = newSelect("ADDRESS, BUILDINGNO, ZIP, CITY, COUNTRY")
.from("ADDRESS")
.leftJoin("VISITPLANENTRY", "ADDRESS.ADDRESSID = (select ADDRESS_ID from CONTACT where CONTACT.CONTACTID \n\
= VISITPLANENTRY.ORGANISATION_ID)")
= VISITPLANENTRY.ORGANISATION_CONTACT_ID)")
.where("VISITPLANENTRY.VISITPLANEMPLOYEEWEEK_ID", entryid)
.and("VISITPLANENTRY.ENTRYDATE", entrydateDB)
.table();
......
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