diff --git a/application/controllers/Backend_api.php b/application/controllers/Backend_api.php index 9356a55b..74819c3c 100755 --- a/application/controllers/Backend_api.php +++ b/application/controllers/Backend_api.php @@ -83,11 +83,11 @@ class Backend_api extends EA_Controller { ]) ]; - foreach ($response['appointments'] as &$appointment) + foreach ($response['appointments'] as $index => $appointment) { - $appointment['provider'] = $this->providers_model->get_row($appointment['id_users_provider']); - $appointment['service'] = $this->services_model->get_row($appointment['id_services']); - $appointment['customer'] = $this->customers_model->get_row($appointment['id_users_customer']); + $response['appointments'][$index]['provider'] = $this->providers_model->get_row($appointment['id_users_provider']); + $response['appointments'][$index]['service'] = $this->services_model->get_row($appointment['id_services']); + $response['appointments'][$index]['customer'] = $this->customers_model->get_row($appointment['id_users_customer']); } $user_id = $this->session->userdata('user_id'); diff --git a/assets/js/backend_calendar_table_view.js b/assets/js/backend_calendar_table_view.js index f0a4818f..931cec5d 100755 --- a/assets/js/backend_calendar_table_view.js +++ b/assets/js/backend_calendar_table_view.js @@ -71,7 +71,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; var endDate = endDateMoment.toDate(); getCalendarEvents(startDate, endDate) - .done(function () { + .done(function (response) { var currentDate = startDate; while (currentDate <= endDate) {