This commit is contained in:
2018-11-12 21:32:51 +00:00
parent c9de558a06
commit c276d395fb
2 changed files with 19 additions and 14 deletions

View File

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