This commit is contained in:
@@ -18,14 +18,14 @@ function addNavItem(title, icon, route, navItems, key, testid) {
|
|||||||
// Initialize the app
|
// Initialize the app
|
||||||
// on change of authentication status
|
// on change of authentication status
|
||||||
export default function initialize() {
|
export default function initialize() {
|
||||||
var promise = new Promise(function(resolve) {
|
return new Promise(function(resolve) {
|
||||||
if (window.$gz.store.state.authenticated) {
|
if (window.$gz.store.state.authenticated) {
|
||||||
//Fetch the core translated text keys that will always be required by user
|
//Fetch the core translated text keys that will always be required by user
|
||||||
window.$gz.translation
|
window.$gz.translation
|
||||||
.fetch(window.$gz.translation.coreKeys)
|
.fetch(window.$gz.translation.coreKeys)
|
||||||
.then(function initializeNavPanel() {
|
.then(function initializeNavPanel() {
|
||||||
var key = 0;
|
let key = 0;
|
||||||
var sub = [];
|
let sub = [];
|
||||||
|
|
||||||
//****************** HOME
|
//****************** HOME
|
||||||
//Most users except ops and client logins
|
//Most users except ops and client logins
|
||||||
@@ -756,7 +756,7 @@ export default function initialize() {
|
|||||||
if (res.error != undefined) {
|
if (res.error != undefined) {
|
||||||
//In a form this would trigger a bunch of validation or error display code but for here and now:
|
//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
|
//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(
|
window.$gz.store.commit(
|
||||||
"logItem",
|
"logItem",
|
||||||
"Initialize::() fetch useroptions -> error" + msg
|
"Initialize::() fetch useroptions -> error" + msg
|
||||||
@@ -766,7 +766,7 @@ export default function initialize() {
|
|||||||
//Check if overrides and use them here
|
//Check if overrides and use them here
|
||||||
//or else use browser defaults
|
//or else use browser defaults
|
||||||
|
|
||||||
var l = {
|
let l = {
|
||||||
languageOverride: null,
|
languageOverride: null,
|
||||||
timeZoneOverride: null,
|
timeZoneOverride: null,
|
||||||
currencyName: null,
|
currencyName: null,
|
||||||
@@ -810,7 +810,7 @@ export default function initialize() {
|
|||||||
if (res.error != undefined) {
|
if (res.error != undefined) {
|
||||||
//In a form this would trigger a bunch of validation or error display code but for here and now:
|
//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
|
//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(
|
window.$gz.store.commit(
|
||||||
"logItem",
|
"logItem",
|
||||||
"Initialize::() fetch GlobalBizSettings/client -> error" + msg
|
"Initialize::() fetch GlobalBizSettings/client -> error" + msg
|
||||||
@@ -841,5 +841,4 @@ export default function initialize() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return promise;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user