From 001d76fd05fbd950084a64ca111c5b983518d1d8 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 17 Jan 2020 11:34:37 -0500 Subject: [PATCH] fix(calendar(js)): allow event invitations to be moved Fixes #4926 --- .../SchedulerUI/UIxAppointmentViewTemplate.wox | 2 +- .../js/Scheduler/Component.service.js | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/UI/Templates/SchedulerUI/UIxAppointmentViewTemplate.wox b/UI/Templates/SchedulerUI/UIxAppointmentViewTemplate.wox index f5c9bb4cb..f5bb9556c 100644 --- a/UI/Templates/SchedulerUI/UIxAppointmentViewTemplate.wox +++ b/UI/Templates/SchedulerUI/UIxAppointmentViewTemplate.wox @@ -49,7 +49,7 @@ - + diff --git a/UI/WebServerResources/js/Scheduler/Component.service.js b/UI/WebServerResources/js/Scheduler/Component.service.js index 1858f8074..aea7a2933 100644 --- a/UI/WebServerResources/js/Scheduler/Component.service.js +++ b/UI/WebServerResources/js/Scheduler/Component.service.js @@ -694,13 +694,25 @@ /** * @function isInvitationOccurrence * @memberof Component.prototype - * @desc Check if the component an invitation and an occurrence of a recurrent component + * @desc Check if the component is an invitation and an occurrence of a recurrent component * @returns true or false */ Component.prototype.isInvitationOccurrence = function() { return (this.occurrenceId && this.userHasRSVP); }; + /** + * @function isMovable + * @memberof Component.prototype + * @desc Return true if the component can be moved to a different calendar which occurs in two cases: + * - the component is editable, ie is owned by the current user; + * - the component is an invitation and the current user is an attendee. + * @returns true or false + */ + Component.prototype.isMovable = function() { + return (!this.isReadOnly || this.userHasRSVP); + }; + /** * @function showPercentComplete * @memberof Component.prototype