From b10301e0d054c1f0a64d53b5614ef7757972aaa6 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 8 Dec 2020 00:11:02 +0000 Subject: [PATCH] --- ayanova/src/api/initialize.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ayanova/src/api/initialize.js b/ayanova/src/api/initialize.js index 0fba3467..17adbb5b 100644 --- a/ayanova/src/api/initialize.js +++ b/ayanova/src/api/initialize.js @@ -43,8 +43,7 @@ function initNavPanel() { sub = []; //Set homePage in store to customer csr for this user type - - window.$gz.store.commit("setHomePage", "/customer-csr-list"); + let CustomerHomePageSet = false; //USER SETTINGS sub.push({ @@ -69,6 +68,9 @@ function initNavPanel() { route: "/customer-csr-list", key: key++ }); + + window.$gz.store.commit("setHomePage", "/customer-csr-list"); + CustomerHomePageSet = true; } //WORKORDERS subitem @@ -82,9 +84,13 @@ function initNavPanel() { } //** CUSTOMER LOGIN HOME (TOP) - addNavItem("Home", "$ayiHome", undefined, sub, key++, "homecustomer"); + //last resort home page if user has no roles set + if (!CustomerHomePageSet) { + window.$gz.store.commit("setHomePage", "/home-user-settings"); + } + return; }