This commit is contained in:
2020-01-03 21:00:27 +00:00
parent 999cb2be29
commit 94e894f5fc

View File

@@ -25,11 +25,24 @@ export default function initialize() {
var sub = []; var sub = [];
//****************** HOME //****************** HOME
//Most users except ops and client logins
//Everyone has a home if (
window.$gz.role.hasRole([
//create array of sub items under the home menu item window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited,
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
window.$gz.role.AUTHORIZATION_ROLES.InventoryLimited,
window.$gz.role.AUTHORIZATION_ROLES.InventoryFull,
window.$gz.role.AUTHORIZATION_ROLES.AccountingFull,
window.$gz.role.AUTHORIZATION_ROLES.TechLimited,
window.$gz.role.AUTHORIZATION_ROLES.TechFull,
window.$gz.role.AUTHORIZATION_ROLES.SubContractorLimited,
window.$gz.role.AUTHORIZATION_ROLES.SubContractorFull,
window.$gz.role.AUTHORIZATION_ROLES.SalesFull,
window.$gz.role.AUTHORIZATION_ROLES.SalesLimited
])
) {
//DASHBOARD //DASHBOARD
sub.push({ sub.push({
title: window.$gz.locale.get("Dashboard"), title: window.$gz.locale.get("Dashboard"),
@@ -39,12 +52,28 @@ export default function initialize() {
}); });
//SEARCH //SEARCH
if (
window.$gz.role.hasRole([
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited,
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
window.$gz.role.AUTHORIZATION_ROLES.InventoryLimited,
window.$gz.role.AUTHORIZATION_ROLES.InventoryFull,
window.$gz.role.AUTHORIZATION_ROLES.AccountingFull,
window.$gz.role.AUTHORIZATION_ROLES.TechLimited,
window.$gz.role.AUTHORIZATION_ROLES.TechFull,
window.$gz.role.AUTHORIZATION_ROLES.SalesFull,
window.$gz.role.AUTHORIZATION_ROLES.SalesLimited
])
) {
sub.push({ sub.push({
title: window.$gz.locale.get("Search"), title: window.$gz.locale.get("Search"),
icon: "search", icon: "search",
route: "/home-search", route: "/home-search",
key: key++ key: key++
}); });
}
//SCHEDULE (personal) //SCHEDULE (personal)
sub.push({ sub.push({
@@ -87,12 +116,29 @@ export default function initialize() {
}); });
//USER NOTIFICATION SUBSCRIPTIONS //USER NOTIFICATION SUBSCRIPTIONS
if (
//all but subcontractors (arbitrary decision without any facts ;)
window.$gz.role.hasRole([
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited,
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
window.$gz.role.AUTHORIZATION_ROLES.InventoryLimited,
window.$gz.role.AUTHORIZATION_ROLES.InventoryFull,
window.$gz.role.AUTHORIZATION_ROLES.AccountingFull,
window.$gz.role.AUTHORIZATION_ROLES.TechLimited,
window.$gz.role.AUTHORIZATION_ROLES.TechFull,
window.$gz.role.AUTHORIZATION_ROLES.SalesFull,
window.$gz.role.AUTHORIZATION_ROLES.SalesLimited
])
) {
sub.push({ sub.push({
title: window.$gz.locale.get("NotifySubscriptionList"), title: window.$gz.locale.get("NotifySubscriptionList"),
icon: "bullhorn", icon: "bullhorn",
route: "/home-notify-subscriptions", route: "/home-notify-subscriptions",
key: key++ key: key++
}); });
}
//HOME //HOME
addNavItem( addNavItem(
@@ -102,6 +148,7 @@ export default function initialize() {
sub, sub,
key++ key++
); );
}
//****************** CUSTOMERS //****************** CUSTOMERS
if ( if (