Skip to content
Snippets Groups Projects
Commit 7f5bd637 authored by Benjamin Ulrich's avatar Benjamin Ulrich :speech_balloon: Committed by Sebastian Listl
Browse files

Ticket #1080137: changed VisitplanEntry from jdito to db recordcontainer....

Ticket #1080137: changed VisitplanEntry from jdito to db recordcontainer. Currently Parent not working need to be discussed.
parent 871fcaa9
No related branches found
No related tags found
No related merge requests found
Showing
with 431 additions and 147 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="Pierre Suchacek" id="716d7ee8-c84e-401b-bc05-cbbab5e17542">
<addColumn tableName="VISITPLANENTRY">
<column name="PREPARATION" type="LONGTEXT"/>
</addColumn>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
<?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">
<include relativeToChangelogFile="true" file="alter_VisitplanEntry.xml"/>
</databaseChangeLog>
\ No newline at end of file
......@@ -4,6 +4,7 @@
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<include relativeToChangelogFile="true" file="defaultWeblinks/changelog.xml"/>
<include relativeToChangelogFile="true" file="Checklist/changelog.xml"/>
<include relativeToChangelogFile="true" file="Visitplan/changelog.xml"/>
<include relativeToChangelogFile="true" file="alter_dataTypesToDateTime.xml"/>
<include relativeToChangelogFile="true" file="Grouptask/changelog.xml"/>
</databaseChangeLog>
\ No newline at end of file
......@@ -14752,7 +14752,7 @@
<dbName></dbName>
<primaryKey v="false" />
<columnType v="92" />
<size v="10" />
<size v="8" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
......@@ -14766,7 +14766,7 @@
<dbName></dbName>
<primaryKey v="false" />
<columnType v="92" />
<size v="10" />
<size v="8" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
......@@ -14887,6 +14887,20 @@
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>PREPARATION</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="2005" />
<size v="2147483647" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......
......@@ -233,6 +233,19 @@
<fieldName>#PROVIDER</fieldName>
</dependency>
</entityConsumer>
<entityConsumer>
<name>VisitPlanEntries</name>
<dependency>
<name>dependency</name>
<entityName>VisitPlanEntry_entity</entityName>
<fieldName>#PROVIDER</fieldName>
</dependency>
<children>
<entityParameter>
<name>ContactId_param</name>
</entityParameter>
</children>
</entityConsumer>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......
......@@ -104,6 +104,14 @@
<valueProcess>%aditoprj%/entity/VisitPlanEmployeeWeek_entity/entityfields/entries/children/entries_param/valueProcess.js</valueProcess>
<expose v="true" />
</entityParameter>
<entityParameter>
<name>EntryWeek_param</name>
<valueProcess>%aditoprj%/entity/VisitPlanEmployeeWeek_entity/entityfields/entries/children/entryweek_param/valueProcess.js</valueProcess>
</entityParameter>
<entityParameter>
<name>CurrentContext_param</name>
<valueProcess>%aditoprj%/entity/VisitPlanEmployeeWeek_entity/entityfields/entries/children/currentcontext_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityProvider>
......
import("system.vars");
import("system.result");
result.string(vars.get("$sys.currentcontextname"));
\ No newline at end of file
import("system.vars");
import("system.result");
result.string(vars.get("$field.WEEK"));
\ No newline at end of file
......@@ -6,5 +6,5 @@ import("Sql_lib");
result.string(newSelect("count(*)")
.from("VISITPLANENTRY")
.where("VISITPLANENTRY.VISITPLANEMPLOYEEWEEK_ID", vars.get("$field.VISITPLANEMPLOYEEWEEKID"))
.and("VISITPLANENTRY.STATUS", $KeywordRegistry.visitPlanEntryStatus$Appointmentarranged())
.and("VISITPLANENTRY.STATUS_APPOINTMENT", $KeywordRegistry.visitPlanEntryStatusAppointment$confirmed())
.cell());
\ No newline at end of file
......@@ -6,5 +6,5 @@ import("Sql_lib");
result.string(newSelect("count(*)")
.from("VISITPLANENTRY")
.where("VISITPLANENTRY.VISITPLANEMPLOYEEWEEK_ID", vars.get("$field.VISITPLANEMPLOYEEWEEKID"))
.and("VISITPLANENTRY.STATUS", $KeywordRegistry.visitPlanEntryStatus$planned())
.and("VISITPLANENTRY.STATUS_APPOINTMENT", $KeywordRegistry.visitPlanEntryStatusAppointment$requested())
.cell());
This diff is collapsed.
import("system.translate");
import("system.eMath");
import("Calendar_lib");
import("Communication_lib");
import("KeywordRegistry_basic");
import("Sql_lib");
import("system.datetime");
import("system.logging");
import("system.result");
import("system.eMath");
import("system.neon");
import("system.calendars");
import("system.util");
import("system.result");
import("system.translate");
import("system.vars");
import("system.db");
import("Communication_lib");
import("Calendar_lib");
import("Sql_lib");
import("Date_lib");
var savedData = vars.get("$local.entitydata");
if(savedData["VISITRECOMMENDATION_ID"])
if(vars.get("$param.CurrentContext_param") != null)
{
newWhere("VISITRECOMMENDATION.VISITRECOMMENDATIONID", savedData["VISITRECOMMENDATION_ID"])
.updateData(true, "VISITRECOMMENDATION", ["STATUS"], null, ["PLANNED"]);
}
if(savedData["STATUS_APPOINTMENT"] == "VISITSTATUSAPPOINTMENTCONFIRMED")
{
var summary = translate.text("Site visit") + " | " + savedData["CONTACT_ID.displayValue"];
var description = savedData["CONTACT_ID.displayValue"];
var standardMail = CommUtil.getStandardMail(savedData["CONTACT_ID"]);
var savedData = vars.get("$local.entitydata");
if(savedData["VISITRECOMMENDATION_ID"])
{
newWhere("VISITRECOMMENDATION.VISITRECOMMENDATIONID", savedData["VISITRECOMMENDATION_ID"])
.updateData(true, "VISITRECOMMENDATION", ["STATUS"], null, ["PLANNED"]);
}
if(savedData["STATUS_APPOINTMENT"] == $KeywordRegistry.visitPlanEntryStatusAppointment$confirmed())
{
var summary = translate.text("Site visit") + " | " + savedData["CONTACT_ID.displayValue"];
var description = savedData["CONTACT_ID.displayValue"];
var standardMail = CommUtil.getStandardMail(savedData["CONTACT_ID"]);
var entryDate = datetime.toLocaleDate(savedData["ENTRYDATE"], "dd-MM-yyyy");
var startTime = entryDate + " " + datetime.toLocaleDate(savedData["BEGIN_TIME"], "HH:mm:ss.S");
var entryDate = datetime.toLocaleDate(savedData["ENTRYDATE"], "dd-MM-yyyy");
var startTime = entryDate + " " + datetime.toLocaleDate(savedData["BEGIN_TIME"], "HH:mm:ss.S");
startTime = datetime.toLong(startTime, "dd-MM-yyyy HH:mm:ss.S", "UTC"); // #1076044 set tz to prevent time gaps.
var endTime = savedData["END_TIME"];
var duration = eMath.subInt(endTime, startTime);
var links = [
var endTime = savedData["END_TIME"];
var duration = eMath.subInt(endTime, startTime);
var start = new Date(datetime.clearTime(startTime, vars.get("$sys.timezone")) + Number(savedData["BEGIN_TIME"]));
var end = new Date(datetime.today(vars.get("$sys.timezone")) + Number(savedData["END_TIME"]));
var links = [
{
"OBJECT_ID":savedData["ORGANISATION_CONTACT_ID"],
"OBJECT_TYPE":"Organisation"
"OBJECT_ID": savedData["ORGANISATION_CONTACT_ID"],
"OBJECT_TYPE": "Organisation"
},
{
"OBJECT_ID":savedData["CONTACT_ID"],
"OBJECT_TYPE":"Person"
"OBJECT_ID": savedData["CONTACT_ID"],
"OBJECT_TYPE": "Person"
}
]
]
var params = {
"Entry_param" : JSON.stringify(CalendarUtil.createEntry(summary, description, links, undefined, undefined,
Date(Date.toExponential(startTime)), Date(Date.toExponential(endTime)),
undefined, undefined, undefined, [standardMail], undefined, undefined, undefined))
};
var params = {
"Entry_param" : JSON.stringify(CalendarUtil.createEntry(summary, description, links, undefined, undefined,
start, end, undefined, undefined, undefined, [standardMail], undefined, undefined, undefined))
};
neon.openContext("Appointment", "AppointmentEdit_view", [vars.get("$field.UID")], neon.OPERATINGSTATE_NEW, params, null);
result.string(true);
}
neon.openContext("Appointment", "AppointmentEdit_view", [vars.get("$field.VISITPLANENTRYID")], neon.OPERATINGSTATE_NEW, params, null);
result.string(true);
}
}
\ No newline at end of file
import("Sql_lib");
import("system.datetime");
import("system.result");
import("system.translate");
import("system.vars");
var parentName = translate.text(datetime.toDate(vars.get("$field.ENTRYDATE"), "EEEE"));
var entryDate = datetime.toDate(vars.get("$field.ENTRYDATE"), "dd.MM.yyyy");
var contactId = vars.get("$field.CONTACT_ID");
var orgname = newSelect("ORGANISATION.NAME")
.from("ORGANISATION")
.join("CONTACT", "CONTACT.ORGANISATION_ID = ORGANISATION.ORGANISATIONID")
.whereIfSet("CONTACT.CONTACTID", contactId)
.cell();
result.string(parentName + " " + entryDate + " - " + orgname);
\ No newline at end of file
import("system.result");
import("Context_lib");
result.string(ContextUtils.getCurrentContextId());
\ No newline at end of file
import("system.vars");
import("system.result");
import("Contact_lib");
var contactId = vars.get("$field.CONTACT_ID");
var links = [];
if (contactId)
{
links.push([ContactUtils.getContextByContactId(contactId), contactId]);
}
if (vars.get("$field.ORGANISATION_CONTACT_ID"))
{
links.push(["Organisation", vars.get("$field.ORGANISATION_CONTACT_ID")]);
}
result.object(links);
\ No newline at end of file
import("system.result");
import("system.vars");
result.string(vars.get("$field.VISITPLANENTRYID"));
\ No newline at end of file
import("system.datetime");
import("system.logging");
import("system.util");
import("system.result");
import("system.text");
......
import("system.logging");
import("system.datetime");
import("system.neon");
import("system.result");
......
import("system.result");
import("system.vars");
result.string(vars.get("$field.VISITPLANENTRYID"));
\ No newline at end of file
import("system.result");
result.string("VISITPLANENTRY");
\ 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