Minor business settings module improvements.

This commit is contained in:
Alex Tselegidis 2022-01-17 21:20:29 +01:00
parent 79c9566257
commit f4f494e4b4

View file

@ -101,16 +101,16 @@ App.Pages.BusinessSettings = (function () {
* Save the global working plan information. * Save the global working plan information.
*/ */
function onApplyGlobalWorkingPlan() { function onApplyGlobalWorkingPlan() {
var buttons = [ const buttons = [
{ {
text: App.Lang.cancel, text: App.Lang.cancel,
click: function () { click: () => {
$('#message-box').dialog('close'); $('#message-box').dialog('close');
} }
}, },
{ {
text: 'OK', text: 'OK',
click: function () { click: () => {
const workingPlan = workingPlanManager.get(); const workingPlan = workingPlanManager.get();
App.Http.BusinessSettings.applyGlobalWorkingPlan(workingPlan) App.Http.BusinessSettings.applyGlobalWorkingPlan(workingPlan)
@ -137,9 +137,9 @@ App.Pages.BusinessSettings = (function () {
let companyWorkingPlan = {}; let companyWorkingPlan = {};
App.Vars.business_settings.forEach((generalSetting) => { App.Vars.business_settings.forEach((businessSetting) => {
if (generalSetting.name === 'company_working_plan') { if (businessSetting.name === 'company_working_plan') {
companyWorkingPlan = JSON.parse(generalSetting.value); companyWorkingPlan = JSON.parse(businessSetting.value);
} }
}); });