This commit is contained in:
@@ -33,13 +33,9 @@ function initNavPanel() {
|
||||
Customer = 3,
|
||||
HeadOffice = 4,
|
||||
ServiceContractor = 5 */
|
||||
let isCustomerTypeUser =
|
||||
window.$gz.store.state.userType == 3 ||
|
||||
window.$gz.store.state.userType == 4;
|
||||
let isSubcontractorTypeUser = window.$gz.store.state.userType == 5;
|
||||
|
||||
//########## OUTSIDE USERS GROUP (CUSTOMER / HEADOFFICE) ###
|
||||
if (isCustomerTypeUser) {
|
||||
if (window.$gz.store.state.isCustomerUser == true) {
|
||||
//clear sublevel array
|
||||
sub = [];
|
||||
|
||||
@@ -57,6 +53,9 @@ function initNavPanel() {
|
||||
route: "/home-user-settings",
|
||||
key: key++
|
||||
});
|
||||
|
||||
window.$gz.store.commit("setHomePage", "/home-user-settings");
|
||||
CustomerHomePageSet = true;
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -71,6 +70,23 @@ function initNavPanel() {
|
||||
route: "/home-notify-subscriptions",
|
||||
key: key++
|
||||
});
|
||||
|
||||
window.$gz.store.commit("setHomePage", "/home-notify-subscriptions");
|
||||
CustomerHomePageSet = true;
|
||||
}
|
||||
|
||||
//WORKORDERS subitem
|
||||
if (window.$gz.store.state.customerRights.userSettings == true) {
|
||||
if (window.$gz.role.canOpen(window.$gz.type.WorkOrder)) {
|
||||
sub.push({
|
||||
title: "WorkOrderList",
|
||||
icon: "$ayiTools",
|
||||
route: "/customer-workorders",
|
||||
key: key++
|
||||
});
|
||||
window.$gz.store.commit("setHomePage", "/customer-workorders");
|
||||
CustomerHomePageSet = true;
|
||||
}
|
||||
}
|
||||
|
||||
//CSR LIST subitem
|
||||
@@ -89,25 +105,12 @@ function initNavPanel() {
|
||||
CustomerHomePageSet = true;
|
||||
}
|
||||
|
||||
//WORKORDERS subitem
|
||||
if (window.$gz.store.state.customerRights.userSettings == true) {
|
||||
if (window.$gz.role.canOpen(window.$gz.type.WorkOrder)) {
|
||||
sub.push({
|
||||
title: "WorkOrderList",
|
||||
icon: "$ayiTools",
|
||||
route: "/customer-workorders",
|
||||
key: key++
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//** CUSTOMER LOGIN HOME (TOP)
|
||||
addNavItem("Home", "$ayiHome", undefined, sub, key++, "homecustomer");
|
||||
|
||||
//last resort home page if user has no roles set
|
||||
//TODO: Needs to be no rights page, not user settings
|
||||
//last resort home page if nothing else kicked in
|
||||
if (!CustomerHomePageSet) {
|
||||
window.$gz.store.commit("setHomePage", "/no-rights");
|
||||
window.$gz.store.commit("setHomePage", "/no-features-available");
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -705,7 +708,10 @@ function initNavPanel() {
|
||||
|
||||
//*** EVALUATION active trial license should always go to evaluation as home page
|
||||
//as long as they are a normal User type and not a subcontractor type
|
||||
if ((licenseState == 1) & !isSubcontractorTypeUser) {
|
||||
if (
|
||||
(licenseState == 1) &
|
||||
(window.$gz.store.state.isSubContractorUser == false)
|
||||
) {
|
||||
addNavItem(
|
||||
"Evaluate",
|
||||
"$ayiRocket",
|
||||
|
||||
Reference in New Issue
Block a user