This commit is contained in:
2020-04-02 14:11:04 +00:00
parent 35c5ad56c2
commit fbe647a799

View File

@@ -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;
}