From 8449d5454c2ce1f3c89a1813cc746fecb6f398c2 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 18 Jan 2023 10:59:57 +0100 Subject: [PATCH] Add ID to the allowed appointments fields (this will fix the rescheduling flow) --- application/controllers/Booking.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/controllers/Booking.php b/application/controllers/Booking.php index 55094b05..e70cd52b 100755 --- a/application/controllers/Booking.php +++ b/application/controllers/Booking.php @@ -93,7 +93,7 @@ class Booking extends EA_Controller { foreach ($available_providers as &$available_provider) { - // Only expose the required provider data. + // Only expose the required provider data. $this->providers_model->only($available_provider, [ 'id', @@ -170,7 +170,7 @@ class Booking extends EA_Controller { return; } - // Make sure the appointment can still be rescheduled. + // Make sure the appointment can still be rescheduled. $start_datetime = strtotime($results[0]['start_datetime']); @@ -543,6 +543,7 @@ class Booking extends EA_Controller { $appointment['status'] = $appointment_status_options[0] ?? NULL; $this->appointments_model->only($appointment, [ + 'id', 'start_datetime', 'end_datetime', 'location',