From fbe647a799e7f33ea4e521c4237e9c319e643f1e Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 2 Apr 2020 14:11:04 +0000 Subject: [PATCH] --- ayanova/src/api/initialize.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ayanova/src/api/initialize.js b/ayanova/src/api/initialize.js index 6556d86e..165b5ef6 100644 --- a/ayanova/src/api/initialize.js +++ b/ayanova/src/api/initialize.js @@ -18,14 +18,14 @@ function addNavItem(title, icon, route, navItems, key, testid) { // Initialize the app // on change of authentication status export default function initialize() { - var promise = new Promise(function(resolve) { + return new Promise(function(resolve) { if (window.$gz.store.state.authenticated) { //Fetch the core translated text keys that will always be required by user window.$gz.translation .fetch(window.$gz.translation.coreKeys) .then(function initializeNavPanel() { - var key = 0; - var sub = []; + let key = 0; + let sub = []; //****************** HOME //Most users except ops and client logins @@ -756,7 +756,7 @@ export default function initialize() { if (res.error != undefined) { //In a form this would trigger a bunch of validation or error display code but for here and now: //convert error to human readable string for display and popup a notification to user - var msg = window.$gz.api.apiErrorToHumanString(res.error); + let msg = window.$gz.api.apiErrorToHumanString(res.error); window.$gz.store.commit( "logItem", "Initialize::() fetch useroptions -> error" + msg @@ -766,7 +766,7 @@ export default function initialize() { //Check if overrides and use them here //or else use browser defaults - var l = { + let l = { languageOverride: null, timeZoneOverride: null, currencyName: null, @@ -810,7 +810,7 @@ export default function initialize() { if (res.error != undefined) { //In a form this would trigger a bunch of validation or error display code but for here and now: //convert error to human readable string for display and popup a notification to user - var msg = window.$gz.api.apiErrorToHumanString(res.error); + let msg = window.$gz.api.apiErrorToHumanString(res.error); window.$gz.store.commit( "logItem", "Initialize::() fetch GlobalBizSettings/client -> error" + msg @@ -841,5 +841,4 @@ export default function initialize() { }); } }); - return promise; }