|
@@ -567,34 +567,15 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
successCallback(displayEvents);
|
|
successCallback(displayEvents);
|
|
- $('.fc .availability').each(function () {
|
|
|
|
- $(this).parent('.fc-timegrid-event-harness').css('pointer-events', 'none');
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- @if($currentAppointment)
|
|
|
|
- if(!self.editHonored) {
|
|
|
|
- window.setTimeout(function() {
|
|
|
|
- let allEvents = self.calendar.getEvents();
|
|
|
|
- if(allEvents) {
|
|
|
|
- let currentEvent = allEvents.filter(function(_ev) {
|
|
|
|
- return _ev.extendedProps.appointmentUid === '{{ $currentAppointment->uid }}';
|
|
|
|
- });
|
|
|
|
- if(currentEvent) currentEvent = currentEvent[0];
|
|
|
|
- if(currentEvent) {
|
|
|
|
- self.selectedEvent = currentEvent;
|
|
|
|
- self.showEditAppointmentModal();
|
|
|
|
- self.editHonored = true;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }, 250);
|
|
|
|
- }
|
|
|
|
- @endif
|
|
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
failureCallback('Unable to refresh appointments!');
|
|
failureCallback('Unable to refresh appointments!');
|
|
}
|
|
}
|
|
}, 'json');
|
|
}, 'json');
|
|
},
|
|
},
|
|
|
|
+ eventDidMount: function(view) {
|
|
|
|
+ self.afterRenderingEvents();
|
|
|
|
+ },
|
|
eventClassNames: function(arg) {
|
|
eventClassNames: function(arg) {
|
|
let classes = [];
|
|
let classes = [];
|
|
if (arg.event.extendedProps.clientOnly) {
|
|
if (arg.event.extendedProps.clientOnly) {
|
|
@@ -652,6 +633,30 @@
|
|
});
|
|
});
|
|
this.calendar.render();
|
|
this.calendar.render();
|
|
},
|
|
},
|
|
|
|
+ afterRenderingEvents: function() {
|
|
|
|
+ let self = this;
|
|
|
|
+ $('.fc .availability').each(function () {
|
|
|
|
+ $(this).parent('.fc-timegrid-event-harness').css('pointer-events', 'none');
|
|
|
|
+ });
|
|
|
|
+ @if($currentAppointment)
|
|
|
|
+ if(!self.editHonored) {
|
|
|
|
+ window.setTimeout(function() {
|
|
|
|
+ let allEvents = self.calendar.getEvents();
|
|
|
|
+ if(allEvents) {
|
|
|
|
+ let currentEvent = allEvents.filter(function(_ev) {
|
|
|
|
+ return _ev.extendedProps.appointmentUid === '{{ $currentAppointment->uid }}';
|
|
|
|
+ });
|
|
|
|
+ if(currentEvent) currentEvent = currentEvent[0];
|
|
|
|
+ if(currentEvent) {
|
|
|
|
+ self.selectedEvent = currentEvent;
|
|
|
|
+ self.showEditAppointmentModal();
|
|
|
|
+ self.editHonored = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, 250);
|
|
|
|
+ }
|
|
|
|
+ @endif
|
|
|
|
+ },
|
|
dateStr: function(_dateTime) {
|
|
dateStr: function(_dateTime) {
|
|
return _dateTime.getFullYear() + "-" +
|
|
return _dateTime.getFullYear() + "-" +
|
|
("0"+(_dateTime.getMonth()+1)).slice(-2) + "-" +
|
|
("0"+(_dateTime.getMonth()+1)).slice(-2) + "-" +
|