This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
/* eslint-disable */
|
||||
import store from "../store";
|
||||
import roles from "./roles";
|
||||
import lt from "../api/locale";
|
||||
/* eslint-disable */
|
||||
|
||||
function addNavItem(title, icon, route) {
|
||||
store.state.navItems.push({
|
||||
title,
|
||||
@@ -19,9 +20,8 @@ export default function initialize() {
|
||||
//clear the locale text cache
|
||||
lt.ClearCache();
|
||||
if (store.state.authenticated) {
|
||||
//prefetch the always required localized text keys into the cache
|
||||
|
||||
lt.PreFetch([
|
||||
//fetch the required localized text keys into the cache
|
||||
lt.Fetch([
|
||||
"Service",
|
||||
"Dispatch",
|
||||
"Inventory",
|
||||
@@ -33,7 +33,6 @@ export default function initialize() {
|
||||
])
|
||||
.then(() => {
|
||||
debugger;
|
||||
//do success
|
||||
//put nav items into store
|
||||
//Everyone has a home
|
||||
addNavItem(lt.Get("Home"), "home", "/");
|
||||
@@ -88,7 +87,6 @@ export default function initialize() {
|
||||
addNavItem(lt.Get("Logout"), "sign-out-alt", "/login");
|
||||
})
|
||||
.catch(function(error) {
|
||||
debugger;
|
||||
alert("initialize::LT->Prefetch failed: " + error);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user