This commit is contained in:
2019-04-29 23:05:52 +00:00
parent 6ffbbc11de
commit 88776817cb
6 changed files with 2 additions and 38 deletions

View File

@@ -17,17 +17,11 @@ function addNavItem(title, icon, route) {
// on change of authentication status
export default function initialize() {
var promise = new Promise(function(resolve) {
/* eslint-disable-next-line */
console.log("STEP 3 - INITIALIZE TOP");
if (store.state.authenticated) {
/* eslint-disable-next-line */
console.log("STEP 4 - INITIALIZE FETCHING LOCALE KEYS");
//Fetch the core localized text keys that will always be required by user
locale
.fetch(locale.coreKeys)
.then(function putFetchedNavItemsInStore() {
/* eslint-disable-next-line */
console.log("STEP 5 - DONE FETCHING LOCALE KEYS CREATING NAV ITEMS");
//put nav items into store
//Everyone has a home
addNavItem(locale.get("Home"), "home", "/");
@@ -83,10 +77,6 @@ export default function initialize() {
// addNavItem(locale.get("Logout"), "sign-out-alt", "/login");
})
.then(() => {
/* eslint-disable-next-line */
console.log(
"STEP 6 - INIT DONE WITH NAV, NOW FETCHING USEROPTIONS SETTINGS"
);
//CACHE LOCALE SETTINGS
api
.get("UserOptions/" + store.state.userId)
@@ -116,8 +106,7 @@ export default function initialize() {
//Store offset in locale data
locale.timeZoneOffset = res.data.timeZoneOffset;
/* eslint-disable-next-line */
console.log("STEP 7 - DONE FETCHING LOCALE SETTINGS");
resolve();
}
})