From d4be65e4a4beeaa7129fe9689534f1de6e017299 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 18 Mar 2024 17:31:43 +0000 Subject: [PATCH] Automatically set the appointment color based on the service selection --- assets/js/components/appointments_modal.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/js/components/appointments_modal.js b/assets/js/components/appointments_modal.js index b7ed915f..b3043995 100755 --- a/assets/js/components/appointments_modal.js +++ b/assets/js/components/appointments_modal.js @@ -365,6 +365,10 @@ App.Components.AppointmentsModal = (function () { return Number(availableService.id) === Number(serviceId); }); + if (service?.color) { + App.Components.ColorSelection.getColor($appointmentColor, service.color); + } + const duration = service ? service.duration : 60; const startDateTimeObject = App.Utils.UI.getDateTimePickerValue($startDatetime);