diff --git a/entity/Appointment_entity/Appointment_entity.aod b/entity/Appointment_entity/Appointment_entity.aod index 8fbeb7bf39d8781848068d962278e742a2227c74..156c683d4c400237c1d63a2f1f7e19960f4b6d79 100644 --- a/entity/Appointment_entity/Appointment_entity.aod +++ b/entity/Appointment_entity/Appointment_entity.aod @@ -79,20 +79,26 @@ <title>accept</title> <onActionProcess>%aditoprj%/entity/Appointment_entity/entityfields/partstatactiongroup/children/accept/onActionProcess.js</onActionProcess> <actionOrder v="0" /> + <isMenuAction v="true" /> <iconId>VAADIN:CHECK</iconId> + <stateProcess>%aditoprj%/entity/Appointment_entity/entityfields/partstatactiongroup/children/accept/stateProcess.js</stateProcess> </entityActionField> <entityActionField> <name>decline</name> <title>decline</title> <description></description> <onActionProcess>%aditoprj%/entity/Appointment_entity/entityfields/partstatactiongroup/children/decline/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> <iconId>VAADIN:CLOSE</iconId> + <stateProcess>%aditoprj%/entity/Appointment_entity/entityfields/partstatactiongroup/children/decline/stateProcess.js</stateProcess> </entityActionField> <entityActionField> <name>tentative</name> <title>tentative</title> <onActionProcess>%aditoprj%/entity/Appointment_entity/entityfields/partstatactiongroup/children/tentative/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> <iconId>VAADIN:QUESTION</iconId> + <stateProcess>%aditoprj%/entity/Appointment_entity/entityfields/partstatactiongroup/children/tentative/stateProcess.js</stateProcess> </entityActionField> </children> </entityActionGroup> @@ -162,18 +168,14 @@ </entityParameter> </children> </entityConsumer> - <entityActionGroup> - <name>seriesActionGroup</name> - <children> - <entityActionField> - <name>deleteSeries</name> - <title>Delete</title> - <onActionProcess>%aditoprj%/entity/Appointment_entity/entityfields/seriesactiongroup/children/deleteseries/onActionProcess.js</onActionProcess> - <iconId>VAADIN:TRASH</iconId> - <tooltip>series delete action</tooltip> - </entityActionField> - </children> - </entityActionGroup> + <entityActionField> + <name>deleteSeries</name> + <title>Delete recurring appointment</title> + <onActionProcess>%aditoprj%/entity/Appointment_entity/entityfields/deleteseries/onActionProcess.js</onActionProcess> + <iconId>VAADIN:TRASH</iconId> + <stateProcess>%aditoprj%/entity/Appointment_entity/entityfields/deleteseries/stateProcess.js</stateProcess> + <tooltip>series delete action</tooltip> + </entityActionField> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/Appointment_entity/entityfields/seriesactiongroup/children/deleteseries/onActionProcess.js b/entity/Appointment_entity/entityfields/deleteseries/onActionProcess.js similarity index 100% rename from entity/Appointment_entity/entityfields/seriesactiongroup/children/deleteseries/onActionProcess.js rename to entity/Appointment_entity/entityfields/deleteseries/onActionProcess.js diff --git a/entity/Appointment_entity/entityfields/deleteseries/stateProcess.js b/entity/Appointment_entity/entityfields/deleteseries/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8d6b8cb3eccdac6567b0c0e9e9fe583f72b06a38 --- /dev/null +++ b/entity/Appointment_entity/entityfields/deleteseries/stateProcess.js @@ -0,0 +1,16 @@ +import("system.tools"); +import("system.logging"); +import("system.vars"); +import("system.result"); +import("system.calendars"); +import("system.neon"); + + +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); + else + result.object(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Appointment_entity/entityfields/partstatactiongroup/children/accept/stateProcess.js b/entity/Appointment_entity/entityfields/partstatactiongroup/children/accept/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..073b73435825e69bd31502ff6bc4d809bc9e5c05 --- /dev/null +++ b/entity/Appointment_entity/entityfields/partstatactiongroup/children/accept/stateProcess.js @@ -0,0 +1,9 @@ +import("system.calendars"); +import("system.neon"); +import("system.result"); + + +if(calendars.getBackendType() == calendars.BACKEND_EXCHANGEWS) + result.object(neon.COMPONENTSTATE_EDITABLE); +else + result.object(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Appointment_entity/entityfields/partstatactiongroup/children/decline/stateProcess.js b/entity/Appointment_entity/entityfields/partstatactiongroup/children/decline/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..073b73435825e69bd31502ff6bc4d809bc9e5c05 --- /dev/null +++ b/entity/Appointment_entity/entityfields/partstatactiongroup/children/decline/stateProcess.js @@ -0,0 +1,9 @@ +import("system.calendars"); +import("system.neon"); +import("system.result"); + + +if(calendars.getBackendType() == calendars.BACKEND_EXCHANGEWS) + result.object(neon.COMPONENTSTATE_EDITABLE); +else + result.object(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/entity/Appointment_entity/entityfields/partstatactiongroup/children/tentative/stateProcess.js b/entity/Appointment_entity/entityfields/partstatactiongroup/children/tentative/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..073b73435825e69bd31502ff6bc4d809bc9e5c05 --- /dev/null +++ b/entity/Appointment_entity/entityfields/partstatactiongroup/children/tentative/stateProcess.js @@ -0,0 +1,9 @@ +import("system.calendars"); +import("system.neon"); +import("system.result"); + + +if(calendars.getBackendType() == calendars.BACKEND_EXCHANGEWS) + result.object(neon.COMPONENTSTATE_EDITABLE); +else + result.object(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 8dfda3265518e2bfb99bac44668ca55aac187a94..a28be4d1a108079e642757c3586faa71f4cd6cf8 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -98,6 +98,10 @@ <key>Confirm password</key> <value>Passwort prüfen</value> </entry> + <entry> + <key>Delete recurring appointment</key> + <value>Serie löschen</value> + </entry> <entry> <key>Human Resources</key> <value>Personal</value>