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

[Projekt: Crowd-Development / Besuch vor Ort][TicketNr.: 1068875][[Bug]...

[Projekt: Crowd-Development / Besuch vor Ort][TicketNr.: 1068875][[Bug] Besuchsvorschlag Preview wenn Kontakt hinterlegt ist fehlerhaft]
parent 1e5e059e
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@
<entityProvider>
<name>#PROVIDER</name>
<targetContextField>TARGET_CONTEXT</targetContextField>
<targetIdField>CONTACT_ID</targetIdField>
<targetIdField>TARGET_ID</targetIdField>
<documentation>%aditoprj%/entity/VisitRecommendation_entity/entityfields/#provider/documentation.adoc</documentation>
<dependencies>
<entityDependency>
......@@ -167,6 +167,7 @@
<description></description>
<consumer>PersonConsumer</consumer>
<groupable v="true" />
<linkedContext>Person</linkedContext>
<valueProcess>%aditoprj%/entity/VisitRecommendation_entity/entityfields/contact_person_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/VisitRecommendation_entity/entityfields/contact_person_id/displayValueProcess.js</displayValueProcess>
</entityField>
......@@ -237,6 +238,10 @@
<entityField>
<name>STATUS</name>
</entityField>
<entityField>
<name>TARGET_ID</name>
<valueProcess>%aditoprj%/entity/VisitRecommendation_entity/entityfields/target_id/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......
import("system.vars");
import("system.result");
result.string("Organisation")
\ No newline at end of file
if(vars.get("$field.CONTACT_PERSON_ID"))
result.string("Person")
else
result.string("Organisation")
\ No newline at end of file
import("system.result");
import("system.vars");
if(vars.get("$field.CONTACT_PERSON_ID"))
result.string(vars.get("$field.CONTACT_PERSON_ID"))
else
result.string(vars.get("$field.CONTACT_ID"))
\ No newline at end of file
......@@ -105,7 +105,7 @@ if(idValues == false)
.and("ACTIVITY.CATEGORY", "VISIT")
var visitFrequencyData = newSelect(["''" //0
, "CONTACT.CONTACTID" //1
, "CONTACT.CONTACTID" //1
, "(" + newSelect("CONTACT.CONTACTID")
.from("CONTACT")
.leftJoin("AB_ATTRIBUTERELATION", "CONTACT.CONTACTID = AB_ATTRIBUTERELATION.OBJECT_ROWID")
......@@ -120,7 +120,9 @@ if(idValues == false)
,"ADDRESS.CITY" //6
, "visitPlanFrequency.ID_VALUE"//7
, activitySubQuery //8
, "org.NAME"])//9
, "org.NAME" //9
, "PERSON.PERSONID" //10
])
.from("CONTACT")
.join("ORGANISATION", "CONTACT.ORGANISATION_ID = org.ORGANISATIONID", "org")
.leftJoin("PERSON", "PERSON.PERSONID = CONTACT.PERSON_ID")
......@@ -131,6 +133,7 @@ if(idValues == false)
for (var i = 0; i < visitFrequencyData.length; i++)
{
var isPersonContact = visitFrequencyData[i][10] != ""
var dueDate = "";
var lastVisitDate = "";
var today = datetime.date();
......@@ -177,7 +180,7 @@ if(idValues == false)
"", //USER_NEW.displayValue
"", //USER_NEW.value
ContactUtils.getFullTitleByContactId(visitFrequencyData[i][1], false), //CONTACT_PERSON_ID.displayValue
visitFrequencyData[i][1], //CONTACT_PERSON_ID.value
isPersonContact ? visitFrequencyData[i][1]: "", //CONTACT_PERSON_ID.value
"", //RESPONSIBLE.displayValue
"" //RESPONSIBLE.value
];
......
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