From ce40aa342bf6e0a9a97e4fab891bf30bd6b7cf6e Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sat, 12 Dec 2020 14:54:41 +0200 Subject: [PATCH] Automatically update the non working plan when changed in backend calendar. --- assets/js/backend_calendar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/backend_calendar.js b/assets/js/backend_calendar.js index 4441e2fc..452172df 100755 --- a/assets/js/backend_calendar.js +++ b/assets/js/backend_calendar.js @@ -82,7 +82,7 @@ window.BackendCalendar = window.BackendCalendar || {}; var successCallback = function () { Backend.displayNotification(EALang.working_plan_exception_saved); - var workingPlanExceptions = jQuery.parseJSON(provider.settings.working_plan_exceptions) || {}; + var workingPlanExceptions = JSON.parse(provider.settings.working_plan_exceptions) || {}; workingPlanExceptions[date] = workingPlanException; @@ -90,7 +90,7 @@ window.BackendCalendar = window.BackendCalendar || {}; var availableProvider = GlobalVariables.availableProviders[index]; if (Number(availableProvider.id) === Number(providerId)) { - availableProvider.settings.working_plan_exceptions = JSON.stringify(workingPlanExceptions); + GlobalVariables.availableProviders[index].settings.working_plan_exceptions = JSON.stringify(workingPlanExceptions); break; } }