Skip to content
Snippets Groups Projects
Commit 0915c459 authored by Andreas Schindlbeck's avatar Andreas Schindlbeck
Browse files

#1041362 AppointmentLinks jetzt auch gesperrt wenn User nicht ändern darf

parent 6d47c660
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@
<title>{$OBJECTLINK_OBJECT}</title>
<consumer>Objects</consumer>
<linkedContext>Object</linkedContext>
<stateProcess>%aditoprj%/entity/AppointmentLink_entity/entityfields/objectid/stateProcess.js</stateProcess>
<displayValueProcess>%aditoprj%/entity/AppointmentLink_entity/entityfields/objectid/displayValueProcess.js</displayValueProcess>
<onValueChangeTypes>
<element>MASK</element>
......@@ -35,6 +36,7 @@
<title>{$OBJECTLINK_TYPE}</title>
<consumer>Context</consumer>
<linkedContext>Context</linkedContext>
<stateProcess>%aditoprj%/entity/AppointmentLink_entity/entityfields/objecttype/stateProcess.js</stateProcess>
<displayValueProcess>%aditoprj%/entity/AppointmentLink_entity/entityfields/objecttype/displayValueProcess.js</displayValueProcess>
</entityField>
<entityParameter>
......@@ -94,6 +96,12 @@
<description>PARAMETER
</description>
</entityParameter>
<entityConsumer>
<name>AppointmentId</name>
<dependency>
<name>dependency</name>
</dependency>
</entityConsumer>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.logging");
import("system.result");
import("system.tools");
import("system.neon");
import("system.vars");
import("system.calendars");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW)
result.object(neon.COMPONENTSTATE_DISABLED);
else if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$param.AppointmentId_param"))
{
var entry = calendars.getEntry(vars.get("$param.AppointmentId_param"), null, null);
doCalc(entry);
}
else if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
{
var entryy = calendars.getEntry(vars.get("$field.APPOINTMENT_ID"), null, null);
doCalc(entryy);
}
function doCalc(entry)
{
if(entry[calendars.ORGANIZER2]["paramvalue"] == "mailto:" + tools.getCurrentUser()["params"]["email"])
result.object(neon.COMPONENTSTATE_EDITABLE);
else
result.object(neon.COMPONENTSTATE_DISABLED);
}
\ No newline at end of file
import("system.logging");
import("system.result");
import("system.tools");
import("system.neon");
import("system.vars");
import("system.calendars");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW)
result.object(neon.COMPONENTSTATE_DISABLED);
else if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$param.AppointmentId_param"))
{
var entry = calendars.getEntry(vars.get("$param.AppointmentId_param"), null, null);
doCalc(entry);
}
else if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
{
var entryy = calendars.getEntry(vars.get("$field.APPOINTMENT_ID"), null, null);
doCalc(entryy);
}
function doCalc(entry)
{
if(entry[calendars.ORGANIZER2]["paramvalue"] == "mailto:" + tools.getCurrentUser()["params"]["email"])
result.object(neon.COMPONENTSTATE_EDITABLE);
else
result.object(neon.COMPONENTSTATE_DISABLED);
}
\ 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