Skip to content
Snippets Groups Projects
Commit dccd16a4 authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

merged origin/2020.2.0_Betreuung_HamaDSG into District_merge

parents 714a052a 5804111f
No related branches found
No related tags found
No related merge requests found
Showing
with 181 additions and 0 deletions
import("system.vars");
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
result.string(KeywordUtils.getViewValue($KeywordRegistry.adviserRole(), vars.get("$field.ADVISER_ROLE")));
\ No newline at end of file
import("system.vars");
import("system.result");
result.string(vars.get("$field.DISTRICT_ID"));
\ No newline at end of file
import("system.result");
import("system.vars");
import("Contact_lib");
result.string(ContactUtils.getFullTitleByContactId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
import("system.vars");
import("system.neon");
import("system.result");
if(vars.get("$param.currentOrganisationId_param"))
result.string(neon.COMPONENTSTATE_READONLY);
\ No newline at end of file
import("system.result");
import("system.vars");
result.string(vars.get("$param.currentOrganisationId_param"));
\ No newline at end of file
import("system.vars");
import("system.result");
import("Sql_lib");
if(vars.get("$field.DISTRICT_ID") != "" && vars.get("$field.DISTRICT_ID") != null)
{
result.string(newSelect("DISTRICT_NAME").from("DISTRICT").where("DISTRICT.DISTRICTID", "$field.DISTRICT_ID").cell())
}
\ No newline at end of file
import("system.vars");
import("system.result");
if(vars.get("$param.DistrictId_param") && vars.get("$this.value") == null)
result.string(vars.get("$param.DistrictId_param"))
\ No newline at end of file
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
result.string($KeywordRegistry.adviserRole());
\ No newline at end of file
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
result.string($KeywordRegistry.contactStatus());
\ No newline at end of file
import("system.vars");
import("system.result");
import("system.neon");
import("KeywordRegistry_basic");
import("Sql_lib");
if(vars.get("$sys.presentationmode") != neon.CONTEXT_PRESENTATIONMODE_FILTER){
var cond = newSelect("AB_KEYWORD_ENTRY.KEYID")
.from("AB_KEYWORD_ENTRY")
.where("AB_KEYWORD_ENTRY.CONTAINER", $KeywordRegistry.contactStatus())
.and("AB_KEYWORD_ENTRY.KEYID", $KeywordRegistry.contactStatus$inReview(), SqlBuilder.LIKE());
result.string(cond.toString());
}
\ No newline at end of file
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
result.string($KeywordRegistry.districtOrigin());
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
import("KeywordRegistry_basic");
import("Keyword_lib");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
{
var key = vars.get("$field.ORIGIN");
if (key)
{
var res = KeywordUtils.getViewValue($KeywordRegistry.districtOrigin(), key);
result.string(res);
}
}
\ No newline at end of file
import("system.result");
import("system.neon");
import("system.vars");
import("KeywordRegistry_basic");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
{
result.string($KeywordRegistry.districtOrigin$manual());
}
\ No newline at end of file
import("system.util");
import("KeywordRegistry_basic");
import("system.vars");
import("system.neon");
import("District_lib");
var arrIds = vars.get("$sys.selection");
DistrictUtils.setDistrictContactStatus(arrIds, $KeywordRegistry.contactStatus$active());
//refresh only if the function is called twice
neon.refreshAll();
neon.refreshAll();
\ No newline at end of file
import("KeywordRegistry_basic");
import("system.vars");
import("system.neon");
import("District_lib");
var arrIds = vars.get("$sys.selection");
DistrictUtils.setDistrictContactStatus(arrIds, $KeywordRegistry.contactStatus$inactive());
//refresh only if the function is called twice
neon.refreshAll();
neon.refreshAll();
\ No newline at end of file
import("system.result");
import("system.vars");
import("KeywordRegistry_basic");
import("Keyword_lib");
var key = vars.get("$field.STATUS");
var res = KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), key);
result.string(res);
\ No newline at end of file
import("system.vars");
import("system.result");
import("system.neon");
import("KeywordRegistry_basic");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null)
result.string($KeywordRegistry.contactStatus$active());
\ No newline at end of file
import("system.vars");
import("system.result");
var res = "TEXT:" + vars.get("$field.CONTACT_ID.displayValue");
result.string(res);
\ No newline at end of file
import("KeywordRegistry_basic");
import("Employee_lib");
import("system.entities");
import("system.result");
import("system.vars");
import("Sql_lib");
var isDashletView = vars.get("$param.isDashletView_param");
var organisationID = vars.get("$param.currentOrganisationId_param");
var districtID = vars.get("$param.DistrictId_param");
var cond = newWhere();
if (vars.exists("$param.RowId_param") && vars.get("$param.RowId_param") && vars.exists("$param.ObjectId_param") && vars.get("$param.ObjectId_param"))
{
cond.and("DISTRICTCONTACT.ADVISER_CONTACT_ID", newSelect("DISTRICTRESPONSIBLE.EMPLOYEE_CONTACT_ID")
.from("DISTRICTRESPONSIBLE")
.where("DISTRICTRESPONSIBLE.DISTRICTRESPONSIBLEID", "$param.RowId_param")
, SqlBuilder.IN());
}
if (organisationID)
{
cond.and("DISTRICTCONTACT.CONTACT_ID", organisationID);
}
var statusInReview = $KeywordRegistry.contactStatus$inReview();
var districtOrigin = $KeywordRegistry.districtOrigin$auto();
if(isDashletView)
{
var currentContactId = EmployeeUtils.getCurrentContactId();
cond.and("DISTRICTCONTACT.STATUS", statusInReview);
cond.and("DISTRICTCONTACT.ORIGIN", districtOrigin);
cond.and("DISTRICTCONTACT.ADVISER_CONTACT_ID", currentContactId);
}
if(districtID){
cond.and("DISTRICTCONTACT.DISTRICT_ID", districtID);
}
result.string(cond.toString());
\ No newline at end of file
import("system.result");
var res = "DISTRICTCONTACT \n\
left join CONTACT on (CONTACT.CONTACTID = DISTRICTCONTACT.CONTACT_ID)";
result.string(res);
\ 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