From 573786bb658bb3b3c54d17512e395177eed10cf3 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 19 Jan 2022 09:11:42 +0100 Subject: [PATCH] Set the default appointment color upon registration. --- application/controllers/Booking.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/controllers/Booking.php b/application/controllers/Booking.php index 22f81329..8f189d0a 100755 --- a/application/controllers/Booking.php +++ b/application/controllers/Booking.php @@ -426,6 +426,11 @@ class Booking extends EA_Controller { $appointment['location'] = $service['location']; } + if (empty($appointment['color']) && ! empty($service['color'])) + { + $appointment['color'] = $service['color']; + } + // Save customer language (the language which is used to render the booking page). $customer['language'] = session('language') ?? config('language'); $customer_id = $this->customers_model->save($customer);