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

Partstat- und DeleteSeries-Button-Sichtbarkeiten angepasst

parent 5b781733
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,7 @@
</entityField>
<entityActionGroup>
<name>PartStatActionGroup</name>
<stateProcess>%aditoprj%/entity/Appointment_entity/entityfields/partstatactiongroup/stateProcess.js</stateProcess>
<children>
<entityActionField>
<name>accept</name>
......@@ -181,6 +182,7 @@
<title>Delete recurring appointment</title>
<onActionProcess>%aditoprj%/entity/Appointment_entity/entityfields/deleteseries/onActionProcess.js</onActionProcess>
<iconId>VAADIN:TRASH</iconId>
<state>AUTO</state>
<stateProcess>%aditoprj%/entity/Appointment_entity/entityfields/deleteseries/stateProcess.js</stateProcess>
<tooltip>series delete action</tooltip>
</entityActionField>
......
import("system.logging");
import("system.tools");
import("system.vars");
import("system.result");
import("system.calendars");
import("system.neon");
import("system.text");
var event = JSON.parse(vars.getString("$param.Entry_param"));
if(event != undefined && event != "") //event not empty
if(event[calendars.RECURRENCEID] != undefined && event[calendars.RECURRENCEID] != "") //event recurring appointment
if(event[calendars.ORGANIZER] == tools.getCurrentUser()["title"]) //user == organizer
result.object(neon.COMPONENTSTATE_EDITABLE);
if(event) //event not empty
{
var ownerCn = event[calendars.USER2]["cn"];
var currentUserTitle = vars.getString("$sys.user");
if(event[calendars.RECURRENCEID] && ownerCn == currentUserTitle) //serientermin und currentUser der TerminOwner
result.object(neon.COMPONENTSTATE_AUTO);
else
result.object(neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
result.object(neon.COMPONENTSTATE_INVISIBLE);
}
else
result.object(neon.COMPONENTSTATE_AUTO);
\ No newline at end of file
import("system.calendars");
import("system.logging");
import("system.result");
import("system.vars");
import("system.tools");
import("system.neon");
if(vars.getString("$param.Entry_param"))
{
var event = JSON.parse(vars.getString("$param.Entry_param"));
var ownerCn = event[calendars.USER2]["cn"];
var currentUserTitle = vars.getString("$sys.user");
if(!(event[calendars.ORGANIZER] == currentUserTitle) && currentUserTitle == ownerCn)
result.object(neon.COMPONENTSTATE_AUTO);
else
result.object(neon.COMPONENTSTATE_INVISIBLE);
}
else
{
result.object(neon.COMPONENTSTATE_AUTO);
}
\ 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