|
@@ -74,7 +74,7 @@
|
|
placeholder="(optional)">
|
|
placeholder="(optional)">
|
|
</div>
|
|
</div>
|
|
<div class="mb-3">
|
|
<div class="mb-3">
|
|
- <button class="btn btn-sm btn-primary d-block w-100 font-weight-bold">
|
|
|
|
|
|
+ <button class="btn btn-sm btn-primary d-block w-100 font-weight-bold apply-appt-button" disabled>
|
|
@if($appointment && $appointment->uid)
|
|
@if($appointment && $appointment->uid)
|
|
Update Appointment
|
|
Update Appointment
|
|
@else
|
|
@else
|
|
@@ -135,6 +135,7 @@
|
|
$('.appt-form td.stag-selected').removeClass('stag-selected');
|
|
$('.appt-form td.stag-selected').removeClass('stag-selected');
|
|
$(info.dayEl).addClass('stag-selected');
|
|
$(info.dayEl).addClass('stag-selected');
|
|
$('.appt-form [name="date"]').val(info.dateStr.substr(0, 10));
|
|
$('.appt-form [name="date"]').val(info.dateStr.substr(0, 10));
|
|
|
|
+ $('.apply-appt-button').prop('disabled', false);
|
|
},
|
|
},
|
|
eventClassNames: function(arg) {
|
|
eventClassNames: function(arg) {
|
|
@if($appointment && $appointment->uid)
|
|
@if($appointment && $appointment->uid)
|
|
@@ -171,6 +172,7 @@
|
|
if(_data && _data.success) {
|
|
if(_data && _data.success) {
|
|
@if($appointment && $appointment->uid)
|
|
@if($appointment && $appointment->uid)
|
|
toastr.success('Appointment updated successfully');
|
|
toastr.success('Appointment updated successfully');
|
|
|
|
+ $('.apply-appt-button').prop('disabled', true);
|
|
@else
|
|
@else
|
|
toastr.success('Appointment booked successfully');
|
|
toastr.success('Appointment booked successfully');
|
|
@endif
|
|
@endif
|
|
@@ -186,11 +188,16 @@
|
|
@else
|
|
@else
|
|
toastr.error('Unable to book appointment!');
|
|
toastr.error('Unable to book appointment!');
|
|
@endif
|
|
@endif
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, 'json');
|
|
}, 'json');
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ $(document).on('change input paste', '.appt-form-col *', function() {
|
|
|
|
+ $('.apply-appt-button').prop('disabled', false);
|
|
|
|
+ });
|
|
}
|
|
}
|
|
addMCInitializer('patient-manage-appointment', init);
|
|
addMCInitializer('patient-manage-appointment', init);
|
|
})();
|
|
})();
|