diff --git a/entity/Appointment_entity/Appointment_entity.aod b/entity/Appointment_entity/Appointment_entity.aod index 79ecf9b8b98ccffe43dfd4c89ae9159a4d904edb..8c65a287ac0388110d49f188e10d7a79151e2f05 100644 --- a/entity/Appointment_entity/Appointment_entity.aod +++ b/entity/Appointment_entity/Appointment_entity.aod @@ -3,7 +3,7 @@ <name>Appointment_entity</name> <title>Termin</title> <majorModelMode>DISTRIBUTED</majorModelMode> - <recordContainer>jdito</recordContainer> + <recordContainer>jDitoRC</recordContainer> <entityFields> <entityField> <name>SUMMARY</name> @@ -169,13 +169,5 @@ <element>MASTEREND.value</element> </recordFields> </jDitoRecordContainer> - <jDitoRecordContainer> - <name>jdito</name> - <jDitoRecordAlias></jDitoRecordAlias> - <contentProcess>%aditoprj%/entity/Appointment_entity/contentProcess.js</contentProcess> - <onInsert>%aditoprj%/entity/Appointment_entity/onInsert.js</onInsert> - <onUpdate>%aditoprj%/entity/Appointment_entity/onUpdate.js</onUpdate> - <onDelete>%aditoprj%/entity/Appointment_entity/onDelete.js</onDelete> - </jDitoRecordContainer> </recordContainers> </entity> diff --git a/entity/Appointment_entity/entityfields/status/possibleItemsProcess.js b/entity/Appointment_entity/entityfields/status/possibleItemsProcess.js index af4adc546276386b72eae1b8e7f0a6fa21adc0c5..00519fe1e8a1a08097e6e5838a8028f4187377a1 100644 --- a/entity/Appointment_entity/entityfields/status/possibleItemsProcess.js +++ b/entity/Appointment_entity/entityfields/status/possibleItemsProcess.js @@ -13,7 +13,7 @@ if( calendars.getBackendType() != calendars.BACKEND_EXCHANGEWS ) else { result.object( [ - [calendars.STATUS_BUSY, translate.text("Gebucht")], + //[calendars.STATUS_BUSY, translate.text("Gebucht")], [calendars.STATUS_TENTATIVE, translate.text("Vorläufig")], [calendars.STATUS_OOF, translate.text("Außer Haus")], [calendars.STATUS_FREE, translate.text("frei")] diff --git a/entity/Appointment_entity/recordcontainers/jditorc/onUpdate.js b/entity/Appointment_entity/recordcontainers/jditorc/onUpdate.js index c26d2893e08bd0c013b16217fd08d75aee55a85f..d58c694cc4083e26687a5412ba419d64a8f1ecd9 100644 --- a/entity/Appointment_entity/recordcontainers/jditorc/onUpdate.js +++ b/entity/Appointment_entity/recordcontainers/jditorc/onUpdate.js @@ -16,14 +16,10 @@ if(vars.exists("$param.entry")) { var event = JSON.parse(vars.getString("$param.entry")); - var ok = false; - if ( calendars.getBackendType() == calendars.BACKEND_EXCHANGEWS && event[calendars.ORGANIZER2]["cn"] != event[calendars.USER2]["cn"]) - { - question.showMessage(translate.text("Ein Gruppentermin kann nur durch den Organisator bearbeitet werden.")); - ok = true; - } - else - { + //if ( calendars.getBackendType() == calendars.BACKEND_EXCHANGEWS && event[calendars.ORGANIZER2]["cn"] != event[calendars.USER2]["cn"]) + // question.showMessage(translate.text("Ein Gruppentermin kann nur durch den Organisator bearbeitet werden.")); + //else + //{ event[calendars.ID] = vars.getString("$field.UID"); event[calendars.TYPE] = calendars.VEVENT; event[calendars.STATUS] = vars.getString("$field.STATUS"); @@ -53,7 +49,7 @@ if(vars.exists("$param.entry")) calendars.updateEntry(event); ok = true; - } + //} } // Liefert die AffectedUsers function getAffectedUsers( pEvent ) diff --git a/process/Appointment_lib/process.js b/process/Appointment_lib/process.js index 4c7859a726e6d231572402349873890018ce0ac8..37a89036a25943006dcd6d9f3878afc8df170f44 100644 --- a/process/Appointment_lib/process.js +++ b/process/Appointment_lib/process.js @@ -1,3 +1,5 @@ +import("system.logging"); +import("system.calendars"); import("system.neon"); import("system.text"); @@ -73,7 +75,24 @@ AppointmentUtils.setPartStat = function (currentUserUri, attendees, newState) { */ AppointmentUtils.sendExchangedAction = function(event, newState) { - event["X-ADITO-STATUSACTION"] = newState; // "ACCEPT", "DECLINE", "" - event[calendars.AFFECTEDUSERS] = ""; - calendars.updateEntry(event); + switch(newState) + { + case "ACCEPTED": + newState = "ACCEPT"; + break; + case "DECLINED": + newState = "DECLINE"; + break; + case "TENTATIVE": + newState = "TENTATIVELYACCEPT"; + break; + default : + newState = "TENTATIVELYACCEPT"; + } + + + jsonEvent = JSON.parse(event); + jsonEvent["X-ADITO-STATUSACTION"] = newState; // "ACCEPT", "DECLINE", "" + jsonEvent[calendars.AFFECTEDUSERS] = ""; + calendars.updateEntry(jsonEvent); } \ No newline at end of file