From f4f494e4b413bbb3342c631ddac5972ca6017acf Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 17 Jan 2022 21:20:29 +0100 Subject: [PATCH] Minor business settings module improvements. --- assets/js/pages/business_settings.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/js/pages/business_settings.js b/assets/js/pages/business_settings.js index 65978b53..cf4a96cb 100644 --- a/assets/js/pages/business_settings.js +++ b/assets/js/pages/business_settings.js @@ -101,16 +101,16 @@ App.Pages.BusinessSettings = (function () { * Save the global working plan information. */ function onApplyGlobalWorkingPlan() { - var buttons = [ + const buttons = [ { text: App.Lang.cancel, - click: function () { + click: () => { $('#message-box').dialog('close'); } }, { text: 'OK', - click: function () { + click: () => { const workingPlan = workingPlanManager.get(); App.Http.BusinessSettings.applyGlobalWorkingPlan(workingPlan) @@ -137,9 +137,9 @@ App.Pages.BusinessSettings = (function () { let companyWorkingPlan = {}; - App.Vars.business_settings.forEach((generalSetting) => { - if (generalSetting.name === 'company_working_plan') { - companyWorkingPlan = JSON.parse(generalSetting.value); + App.Vars.business_settings.forEach((businessSetting) => { + if (businessSetting.name === 'company_working_plan') { + companyWorkingPlan = JSON.parse(businessSetting.value); } });