fix(calendar(js)): fix refresh of attendees freebusy information

* refresh template with freebusy information of organizer
* fix event coverage in freebusy timeline when event spans a day

Related to bug #4899
This commit is contained in:
Francis Lachapelle
2019-12-03 10:34:47 -05:00
parent 3bb40e4024
commit fbdabc9615
3 changed files with 10 additions and 4 deletions
@@ -240,7 +240,9 @@
var index = _.findIndex(this.component.attendees, function(currentAttendee) {
return currentAttendee.email == attendee.email;
});
this.component.attendees.splice(index, 1);
if (index > -1)
this.component.attendees.splice(index, 1);
delete this.$futureFreebusyData[attendee.uid];
};
/**
@@ -270,7 +272,9 @@
roundedStart.setMinutes(15*startQuarter);
roundedEnd.setMinutes(15*endQuarter);
_.forEach(roundedStart.daysUpTo(roundedEnd), function(date, index) {
_.forEach(roundedStart.beginOfDay().daysUpTo(roundedEnd.beginOfDay()), function(date, index) {
if (date < roundedStart)
date = new Date(roundedStart.getTime());
var currentDay = date.getDate(),
dayKey = date.getDayString(),
hourKey;