|
@@ -9,7 +9,7 @@
|
|
</h4>
|
|
</h4>
|
|
</div>
|
|
</div>
|
|
<hr class="mt-2 mb-3">
|
|
<hr class="mt-2 mb-3">
|
|
- <div class="d-flex align-items-start">
|
|
|
|
|
|
+ <div class="d-flex align-items-start appt-form">
|
|
<div class="appt-form-col pr-2">
|
|
<div class="appt-form-col pr-2">
|
|
<div class="mb-3">
|
|
<div class="mb-3">
|
|
<label class="text-secondary mb-1">Patient</label>
|
|
<label class="text-secondary mb-1">Patient</label>
|
|
@@ -66,7 +66,16 @@
|
|
navLinks: true,
|
|
navLinks: true,
|
|
dayMaxEvents: true,
|
|
dayMaxEvents: true,
|
|
events: function(info, successCallback, failureCallback) {
|
|
events: function(info, successCallback, failureCallback) {
|
|
- $.get('/api/appointment/getAllAppointmentsForPro?start=1990-01-01&end=2025-01-01&timeZone=CENTRAL', function(_data) {
|
|
|
|
|
|
+ let proUid = $('.appt-form [name="proUid"]').val();
|
|
|
|
+ if(!proUid) successCallback([]); // no events if no pro selected
|
|
|
|
+ let timeZone = $('.appt-form [name="timeZone"]').val();
|
|
|
|
+ if(!timeZone) successCallback([]); // no events if no tz selected
|
|
|
|
+ $.get('/api/appointment/getAllAppointmentsForPro' +
|
|
|
|
+ '?proUid=' + proUid +
|
|
|
|
+ '&start=' + info.startStr.substr(0, 10) +
|
|
|
|
+ '&end=' + info.endStr.substr(0, 10) +
|
|
|
|
+ '&timeZone=' + timeZone, function(_data) {
|
|
|
|
+ // $.get('/api/appointment/getAllAppointmentsForPro?start=1990-01-01&end=2025-01-01&timeZone=CENTRAL', function(_data) {
|
|
if(_data && _data.success) {
|
|
if(_data && _data.success) {
|
|
successCallback(_data.data);
|
|
successCallback(_data.data);
|
|
}
|
|
}
|
|
@@ -81,8 +90,12 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
calendarObject.render();
|
|
calendarObject.render();
|
|
|
|
+
|
|
|
|
+ $(document).on('change', '.appt-form [name="proUid"], .appt-form [name="timeZone"]', function() {
|
|
|
|
+ calendarObject.refetchEvents();
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- addMCInitializer('patient-manage-appointment-' + Math.random() * 10000, init);
|
|
|
|
|
|
+ addMCInitializer('patient-manage-appointment', init);
|
|
})();
|
|
})();
|
|
</script>
|
|
</script>
|
|
@endsection
|
|
@endsection
|