Skip to content
Snippets Groups Projects
Commit 718df69e authored by c.wimmer's avatar c.wimmer
Browse files

[Projekt: Crowd-Development / Besuch vor Ort][TicketNr.: 1066738][[aus...

[Projekt: Crowd-Development / Besuch vor Ort][TicketNr.: 1066738][[aus Schmalz] Besuchsvorschlag anlegen]
[Projekt: Crowd-Development / Besuch vor Ort][TicketNr.: 1066740][[aus Schmalz] Neuer Wochenplaneintrag]
[Projekt: Crowd-Development / Besuch vor Ort][TicketNr.: 1066737][[aus Schmalz] Besuchsvorschlag - Darstellung in der Filterview]
parent 59462d94
No related branches found
No related tags found
No related merge requests found
Showing
with 506 additions and 224 deletions
<?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">
<changeSet author="c.wimmer" id="c994f27c-c773-41f3-b467-aa11e27f1142">
<addColumn tableName="VISITRECOMMENDATION">
<column name="USER_NEW" type="NVARCHAR(50)"/>
<column name="CONTACT_PERSON_ID" type="CHAR(36)"/>
<column name="RESPONSIBLE" type="CHAR(36)"/>
</addColumn>
</changeSet>
</databaseChangeLog>
......@@ -13,4 +13,6 @@
<include relativeToChangelogFile="true" file="alter_VisitrecommendationpriorityDatatype.xml"/>
<include relativeToChangelogFile="true" file="alter_KeywordTitlesForTranslation.xml"/>
<include relativeToChangelogFile="true" file="alter_CommrestrictionsEmployeeInvolved.xml"/>
<include relativeToChangelogFile="true" file="alter_VisitrecommendationpriorityUserNewResp.xml"/>
<include relativeToChangelogFile="true" file="insert_VisitFrequencyAttributeUsagePers.xml"/>
</databaseChangeLog>
<?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">
<changeSet author="c.wimmer" id="077aed97-bd93-4062-be37-78d306c4b4c6">
<insert tableName="AB_ATTRIBUTEUSAGE">
<column name="AB_ATTRIBUTEUSAGEID" value="23897e8d-00d5-45ff-86c7-391db0bd5cf4"/>
<column name="AB_ATTRIBUTE_ID" value="547b8b9d-88ba-4590-9e01-34d2a58116cc"/>
<column name="MAX_COUNT" valueNumeric="1"/>
<column name="OBJECT_TYPE" value="Person"/>
</insert>
</changeSet>
</databaseChangeLog>
......@@ -14778,6 +14778,48 @@
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>USER_NEW</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>CONTACT_PERSON_ID</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>RESPONSIBLE</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......
......@@ -254,6 +254,10 @@
<name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" />
</entityProvider>
<entityParameter>
<name>PresetLinks_param</name>
<expose v="true" />
</entityParameter>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......
......@@ -14,4 +14,15 @@ if(vars.exists("$param.Entry_param") && vars.get("$param.Entry_param"))
"OBJECTTYPE" : entry["AppLinkContext"]
});
}
}
if(vars.exists("$param.PresetLinks_param") && vars.get("$param.PresetLinks_param"))
{
var presetLink = JSON.parse(vars.get("$param.PresetLinks_param"));
presetLink.forEach(function(link) {
neon.addRecord("AppointmentLinks", {
"OBJECTTYPE" : link[0],
"OBJECTID" : link[1]
});
});
}
\ No newline at end of file
......@@ -268,6 +268,12 @@
<fieldName>Employees</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>7e6bff46-4047-49da-a5ef-40510a8255a2</name>
<entityName>VisitRecommendation_entity</entityName>
<fieldName>Employees</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
......
import("Workflow_lib");
import("system.neon");
import("system.vars");
import("system.tools");
import("Employee_lib");
var rowdata = vars.get("$local.rowdata");
var user = {};
var params = []; //this has to be an array
params[tools.EMAIL] = rowdata["EMAIL_ADDRESS.value"];
params[tools.CALENDARID] = rowdata["EMAIL_ADDRESS.value"];
params[tools.DESCRIPTION] = rowdata["DESCRIPTION.value"];
params[tools.CONTACTID] = rowdata["CONTACT_ID.value"];
params[tools.FIRSTNAME] = rowdata["FIRSTNAME.value"];
params[tools.LASTNAME] = rowdata["LASTNAME.value"];
params[tools.ISACTIVE] = rowdata["ISACTIVE.value"];
params.department = rowdata["DEPARTMENT.value"];
params[tools.PHONE_ADDRESS] = rowdata["PHONE_ADDRESS.value"];
user[tools.TITLE] = rowdata["TITLE.value"];
user[tools.PARAMS] = params;
if (rowdata["PASSWORD.value"] && rowdata["PASSWORD.value"] == rowdata["CONFIRM_PASSWORD.value"])
{
user[tools.PASSWORD] = rowdata["PASSWORD.value"];
}
tools.insertUser(user, rowdata["UID.value"]);
import("Workflow_lib");
import("system.neon");
import("system.vars");
import("system.tools");
import("Employee_lib");
var rowdata = vars.get("$local.rowdata");
var user = {};
var params = []; //this has to be an array
params[tools.EMAIL] = rowdata["EMAIL_ADDRESS.value"];
params[tools.CALENDARID] = rowdata["EMAIL_ADDRESS.value"];
params[tools.DESCRIPTION] = rowdata["DESCRIPTION.value"];
params[tools.CONTACTID] = rowdata["CONTACT_ID.value"];
params[tools.FIRSTNAME] = rowdata["FIRSTNAME.value"];
params[tools.LASTNAME] = rowdata["LASTNAME.value"];
params[tools.ISACTIVE] = rowdata["ISACTIVE.value"];
params.department = rowdata["DEPARTMENT.value"];
params[tools.PHONE_ADDRESS] = rowdata["PHONE_ADDRESS.value"];
user[tools.TITLE] = rowdata["TITLE.value"];
user[tools.PARAMS] = params;
if (rowdata["PASSWORD.value"] && rowdata["PASSWORD.value"] == rowdata["CONFIRM_PASSWORD.value"])
{
user[tools.PASSWORD] = rowdata["PASSWORD.value"];
}
tools.insertUser(user, rowdata["UID.value"]);
WorkflowSignalSender.inserted();
\ No newline at end of file
This diff is collapsed.
import("system.logging");
import("Sql_lib");
import("system.neon");
import("system.vars");
var personContactId = vars.getString("$field.CONTACTID");
var params = {};
var orgId = newSelect("CONTACT.ORGANISATION_ID").from("CONTACT").where("CONTACT.CONTACTID", personContactId).cell();
var orgContactId = newSelect("CONTACT.CONTACTID").from("CONTACT").where("CONTACT.ORGANISATION_ID", orgId).and("CONTACT.PERSON_ID is null").cell();
params["ContactIdPerson_param"] = personContactId;
params["ContactId_param"] = orgContactId;
neon.openContext("VisitRecommendation", null, null, neon.OPERATINGSTATE_NEW, params);
\ No newline at end of file
import("system.result");
import("system.neon");
import("system.vars");
import("KeywordRegistry_basic");
if (vars.get("$field.STATUS") == $KeywordRegistry.contactStatus$inactive())
result.string(neon.COMPONENTSTATE_DISABLED);
\ No newline at end of file
import("system.result");
import("system.vars");
import("Keyword_lib");
import("KeywordRegistry_basic");
result.string(KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.visitRecommendationPriority(), "PERSON.VISITPLAN_PRIO"));
......@@ -8,6 +8,7 @@
<grantUpdateProcess>%aditoprj%/entity/VisitPlanEntry_entity/grantUpdateProcess.js</grantUpdateProcess>
<grantDeleteProcess>%aditoprj%/entity/VisitPlanEntry_entity/grantDeleteProcess.js</grantDeleteProcess>
<onValidation>%aditoprj%/entity/VisitPlanEntry_entity/onValidation.js</onValidation>
<afterSave>%aditoprj%/entity/VisitPlanEntry_entity/afterSave.js</afterSave>
<titlePlural></titlePlural>
<recordContainer>jDito</recordContainer>
<entityFields>
......@@ -182,6 +183,7 @@
<title>Contact</title>
<consumer>Persons</consumer>
<mandatory v="true" />
<valueProcess>%aditoprj%/entity/VisitPlanEntry_entity/entityfields/contact_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/VisitPlanEntry_entity/entityfields/contact_id/displayValueProcess.js</displayValueProcess>
</entityField>
<entityConsumer>
......@@ -193,13 +195,10 @@
</dependency>
<children>
<entityParameter>
<name>ExcludedContactIds_param</name>
<name>OrgId_param</name>
<valueProcess>%aditoprj%/entity/VisitPlanEntry_entity/entityfields/persons/children/orgid_param/valueProcess.js</valueProcess>
<expose v="true" />
</entityParameter>
<entityParameter>
<name>OnlyShowContactIds_param</name>
<valueProcess>%aditoprj%/entity/VisitPlanEntry_entity/entityfields/persons/children/onlyshowcontactids_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityParameter>
......
import("system.translate");
import("system.eMath");
import("system.datetime");
import("Date_lib");
import("system.logging");
import("system.result");
import("system.neon");
import("system.calendars");
import("system.util");
import("system.vars");
import("Calendar_lib");
import("Communication_lib");
var savedData = vars.get("$local.entitydata");
if(savedData["STATUS"] == "VISITSTATUSAPPPLANED")
{
var summary = translate.text("Besuch vor Ort") + " | " + savedData["CONTACT_ID.displayValue"];
var description = savedData["CONTACT_ID.displayValue"];
var standardMail = CommUtil.getStandardMail(savedData["CONTACT_ID"]);
var entryDate = datetime.toDate(savedData["ENTRYDATE"], "dd-MM-yyyy");
var startTime = entryDate + " " + datetime.toDate(savedData["BEGIN_TIME"], "HH:mm:ss.S");
startTime = datetime.toLong(startTime, "dd-MM-yyyy HH:mm:ss.S");
var endTime = savedData["END_TIME"];
var duration = eMath.subInt(endTime, startTime);
var params = {};
params["Entry_param"] = JSON.stringify(CalendarUtil.createEntry(util.getNewUUID(), calendars.VEVENT, summary, description, false, null, null
, null, null, startTime, duration, null, null, null, null, [standardMail]));
params["PresetLinks_param"] = JSON.stringify([
["Organisation", savedData["ORGANISATION_CONTACT_ID"]],
["Person", savedData["CONTACT_ID"]]
]);
neon.openContext("Appointment", "AppointmentEdit_view", [vars.get("$field.UID")], neon.OPERATINGSTATE_NEW, params, null);
result.string(true);
}
\ No newline at end of file
import("system.logging");
import("system.neon");
import("system.result");
import("system.vars");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && (vars.get("$this.value") == null || vars.get("$this.value") == undefined))
result.string(vars.get("$param.ContactId_param"));
import("system.logging");
import("Sql_lib");
import("system.vars");
import("system.result");
var orgContactId = vars.get("$field.ORGANISATION_CONTACT_ID")
var orgId = newSelect("CONTACT.ORGANISATION_ID").from("CONTACT").where("CONTACT.CONTACTID", orgContactId).cell();
result.string(orgId);
\ No newline at end of file
import("system.datetime");
import("Sql_lib");
import("system.logging");
import("system.neon");
......@@ -11,7 +12,7 @@ var values = [
rowData["BEGIN_TIME.value"],
rowData["END_TIME.value"],
rowData["ORGANISATION_CONTACT_ID.value"],
rowData["STATUS"]
rowData["STATUS.value"]
];
var columns = [
......
......@@ -5,8 +5,6 @@
<documentation>%aditoprj%/entity/VisitRecommendation_entity/documentation.adoc</documentation>
<title>Visit Recommendation</title>
<grantCreate v="true" />
<grantUpdateProcess>%aditoprj%/entity/VisitRecommendation_entity/grantUpdateProcess.js</grantUpdateProcess>
<grantDeleteProcess>%aditoprj%/entity/VisitRecommendation_entity/grantDeleteProcess.js</grantDeleteProcess>
<iconId>VAADIN:BRIEFCASE</iconId>
<image>VAADIN:BRIEFCASE</image>
<titlePlural>Visit Recommendations</titlePlural>
......@@ -29,7 +27,7 @@
<entityField>
<name>CONTACT_ID</name>
<documentation>%aditoprj%/entity/VisitRecommendation_entity/entityfields/contact_id/documentation.adoc</documentation>
<title>Customer</title>
<title>Organisation</title>
<consumer>OrganisationConsumer</consumer>
<stateProcess>%aditoprj%/entity/VisitRecommendation_entity/entityfields/contact_id/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/VisitRecommendation_entity/entityfields/contact_id/valueProcess.js</valueProcess>
......@@ -40,7 +38,7 @@
</entityField>
<entityField>
<name>ORGANISATION_NAME</name>
<title>Customer</title>
<title>Organisation</title>
</entityField>
<entityField>
<name>ORGANISATION_POINT_OF_CONTACT</name>
......@@ -55,6 +53,7 @@
<title>Priority</title>
<consumer>KeywordVisitRecommendationPriority</consumer>
<mandatory v="true" />
<valueProcess>%aditoprj%/entity/VisitRecommendation_entity/entityfields/priority/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/VisitRecommendation_entity/entityfields/priority/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
......@@ -75,6 +74,7 @@
<entityField>
<name>INFO</name>
<title>Info</title>
<contentType>LONG_TEXT</contentType>
</entityField>
<entityField>
<name>DATE_PLANNED</name>
......@@ -123,6 +123,11 @@
<expose v="true" />
<mandatory v="true" />
</entityParameter>
<entityParameter>
<name>OrgId_param</name>
<valueProcess>%aditoprj%/entity/VisitRecommendation_entity/entityfields/personconsumer/children/orgid_param/valueProcess.js</valueProcess>
<expose v="true" />
</entityParameter>
</children>
</entityConsumer>
<entityParameter>
......@@ -158,6 +163,19 @@
<name>TARGET_CONTEXT</name>
<valueProcess>%aditoprj%/entity/VisitRecommendation_entity/entityfields/target_context/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>USER_NEW</name>
<title>Created from</title>
<valueProcess>%aditoprj%/entity/VisitRecommendation_entity/entityfields/user_new/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>CONTACT_PERSON_ID</name>
<title>Contact</title>
<description></description>
<consumer>PersonConsumer</consumer>
<stateProcess>%aditoprj%/entity/VisitRecommendation_entity/entityfields/contact_person_id/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/VisitRecommendation_entity/entityfields/contact_person_id/valueProcess.js</valueProcess>
</entityField>
<entityProvider>
<name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" />
......@@ -176,11 +194,53 @@
</entityParameter>
</children>
</entityConsumer>
<entityParameter>
<name>ContactIdPerson_param</name>
<expose v="true" />
</entityParameter>
<entityField>
<name>RESPONSIBLE</name>
<title>Responsible</title>
<consumer>Employees</consumer>
<mandatory v="true" />
</entityField>
<entityConsumer>
<name>Employees</name>
<dependency>
<name>dependency</name>
<entityName>Employee_entity</entityName>
<fieldName>Employees</fieldName>
</dependency>
<children>
<entityParameter>
<name>OnlyActives_param</name>
<valueProcess>%aditoprj%/entity/VisitRecommendation_entity/entityfields/employees/children/onlyactives_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityField>
<name>STREET</name>
<title>Street</title>
</entityField>
<entityField>
<name>COUNTRY</name>
<title>Country</title>
</entityField>
<entityField>
<name>ZIP</name>
<title>ZIP</title>
</entityField>
<entityField>
<name>CITY</name>
<title>City</title>
</entityField>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
<name>jDito</name>
<jDitoRecordAlias>Data_alias</jDitoRecordAlias>
<isFilterable v="true" />
<isSortable v="true" />
<contentProcess>%aditoprj%/entity/VisitRecommendation_entity/recordcontainers/jdito/contentProcess.js</contentProcess>
<onInsert>%aditoprj%/entity/VisitRecommendation_entity/recordcontainers/jdito/onInsert.js</onInsert>
<onUpdate>%aditoprj%/entity/VisitRecommendation_entity/recordcontainers/jdito/onUpdate.js</onUpdate>
......@@ -191,26 +251,38 @@
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>ORGANISATION_NAME.value</name>
<isFilterable v="true" />
<isLookupFilter v="true" />
<isFilterable v="false" />
<isLookupFilter v="false" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>ORGANISATION_POINT_OF_CONTACT.value</name>
<isFilterable v="false" />
<isLookupFilter v="false" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>STREET.value</name>
<isFilterable v="true" />
<isLookupFilter v="true" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>ORGANISATION_ADDRESS.value</name>
<name>COUNTRY.value</name>
<isFilterable v="true" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>ZIP.value</name>
<isFilterable v="true" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>CITY.value</name>
<isFilterable v="true" />
<isLookupFilter v="true" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>PRIORITY.value</name>
<isFilterable v="true" />
<isLookupFilter v="true" />
<isLookupFilter v="false" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>PRIORITY_SOURCE.value</name>
<isFilterable v="true" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>PRIORITY.displayValue</name>
......@@ -218,7 +290,7 @@
<jDitoRecordFieldMapping>
<name>DUE_DATE.value</name>
<isFilterable v="true" />
<isLookupFilter v="true" />
<isLookupFilter v="false" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>INFO.value</name>
......@@ -231,6 +303,30 @@
<jDitoRecordFieldMapping>
<name>PRIORITY_SOURCE.displayValue</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>USER_NEW.displayValue</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>USER_NEW.value</name>
<isFilterable v="true" />
<isLookupFilter v="true" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>CONTACT_PERSON_ID.displayValue</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>CONTACT_PERSON_ID.value</name>
<isFilterable v="true" />
<isLookupFilter v="true" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>RESPONSIBLE.displayValue</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>RESPONSIBLE.value</name>
<isFilterable v="true" />
<isLookupFilter v="true" />
</jDitoRecordFieldMapping>
</recordFieldMappings>
<filterExtensions>
<filterExtensionSet>
......
......@@ -4,4 +4,4 @@ import("system.result");
import("system.vars");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$param.ContactId_param") && vars.exists("$param.ContactId_param"))
result.string(neon.COMPONENTSTATE_INVISIBLE)
\ No newline at end of file
result.string(neon.COMPONENTSTATE_INVISIBLE)
\ No newline at end of file
import("system.logging");
import("system.neon");
import("system.result");
import("system.vars");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$param.ContactIdPerson_param") && vars.exists("$param.ContactIdPerson_param"))
result.string(neon.COMPONENTSTATE_INVISIBLE)
\ 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