|
@@ -195,8 +195,29 @@
|
|
});
|
|
});
|
|
|
|
|
|
$(document).on('change input paste', '.appt-form-col *', function() {
|
|
$(document).on('change input paste', '.appt-form-col *', function() {
|
|
|
|
+ updateCalendarTitle();
|
|
$('.apply-appt-button').prop('disabled', false);
|
|
$('.apply-appt-button').prop('disabled', false);
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ function updateCalendarTitle() {
|
|
|
|
+ $('.stag-calendar-header-extra').remove();
|
|
|
|
+ if(!$('.appt-form [name="proUid"]').val() || !$('.appt-form [name="timeZone"]').val()) {
|
|
|
|
+ $('.fc-toolbar-title').parent().addClass('mb-3').removeClass('text-center');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ $('.fc-toolbar-title').parent().removeClass('mb-3').addClass('text-center');
|
|
|
|
+ }
|
|
|
|
+ let html = '<div class="stag-calendar-header-extra d-inline-flex">' +
|
|
|
|
+ '<span class="text-secondary">Pro:</span> ' +
|
|
|
|
+ '<span class="font-weight-bold mr-4">' + $('.appt-form [name="proUid"] option:selected').text() + '</span>' +
|
|
|
|
+ '<span class="text-secondary">Times in</span> ' +
|
|
|
|
+ '<span class="font-weight-bold">' + $('.appt-form [name="timeZone"] option:selected').text() + '</span>' +
|
|
|
|
+ '</div>';
|
|
|
|
+ $(html).insertAfter('.fc-toolbar-title');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ updateCalendarTitle();
|
|
}
|
|
}
|
|
addMCInitializer('patient-manage-appointment', init);
|
|
addMCInitializer('patient-manage-appointment', init);
|
|
})();
|
|
})();
|