Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- // ... All the calendar functionality
- $('#appointment_update').click(function(e) {
- e.preventDefault();
- var data = {
- _token: '{{ csrf_token() }}',
- appointment_id: $('#appointment_id').val(),
- start_time: $('#start_time').val(),
- finish_time: $('#finish_time').val(),
- };
- $.post('{{ route('admin.appointments.ajax_update') }}', data, function( result ) {
- $('#calendar').fullCalendar('removeEvents', $('#event_id').val());
- $('#calendar').fullCalendar('renderEvent', {
- title: result.appointment.client.first_name + ' ' + result.appointment.client.last_name,
- start: result.appointment.start_time,
- end: result.appointment.finish_time
- }, true);
- $('#editModal').modal('hide');
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement