Update the business setting page module according to the new working plan utility changes

This commit is contained in:
Alex Tselegidis 2022-01-11 10:53:32 +01:00
parent 7b7698f689
commit eeb0a8445d

View file

@ -133,16 +133,16 @@ App.Pages.BusinessSettings = (function () {
deserialize(businessSettings); deserialize(businessSettings);
let workingPlan = {}; let companyWorkingPlan = {};
App.Vars.business_settings.forEach((generalSetting) => { App.Vars.business_settings.forEach((generalSetting) => {
if (generalSetting.name === 'company_working_plan') { if (generalSetting.name === 'company_working_plan') {
workingPlan = JSON.parse(generalSetting.value); companyWorkingPlan = JSON.parse(generalSetting.value);
} }
}); });
workingPlanManager = new WorkingPlan(); workingPlanManager = new App.Utils.WorkingPlan();
workingPlanManager.setup(workingPlan); workingPlanManager.setup(companyWorkingPlan);
workingPlanManager.timepickers(false); workingPlanManager.timepickers(false);
workingPlanManager.bindEventHandlers(); workingPlanManager.bindEventHandlers();