This commit is contained in:
@@ -52,6 +52,13 @@ SHELL / NAV / MENUS / LAYOUT
|
|||||||
|
|
||||||
TODO: Enforce role rights for menu items once it's stubbed out
|
TODO: Enforce role rights for menu items once it's stubbed out
|
||||||
|
|
||||||
|
TODO: Client login UI
|
||||||
|
- Maybe under HOME or maybe easier to control if there is no home?
|
||||||
|
- though dashboard is the default go to location..have to think on it
|
||||||
|
- Client CSRS
|
||||||
|
- Client Units
|
||||||
|
- Client workorders
|
||||||
|
|
||||||
TODO: Errors - make sure all user displayed errors have an error number if they might be something tech support needs to know (case 1854)
|
TODO: Errors - make sure all user displayed errors have an error number if they might be something tech support needs to know (case 1854)
|
||||||
- I guess this is a LT feature really
|
- I guess this is a LT feature really
|
||||||
- Once start then make sure documented in manual
|
- Once start then make sure documented in manual
|
||||||
|
|||||||
@@ -104,64 +104,100 @@ export default function initialize() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
//****************** CUSTOMERS
|
//****************** CUSTOMERS
|
||||||
//clear sublevel array
|
if (
|
||||||
sub = [];
|
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.TechFull,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.TechLimited,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.AccountingFull,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.SalesFull,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.SalesLimited
|
||||||
|
])
|
||||||
|
) {
|
||||||
|
//clear sublevel array
|
||||||
|
sub = [];
|
||||||
|
|
||||||
//CUSTOMERS subitem
|
//CUSTOMERS subitem
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("ClientList"),
|
title: window.$gz.locale.get("ClientList"),
|
||||||
icon: "address-card",
|
icon: "address-card",
|
||||||
route: "/cust-customers",
|
route: "/cust-customers",
|
||||||
key: key++
|
key: key++
|
||||||
});
|
});
|
||||||
|
|
||||||
//HEAD OFFICES subitem
|
//HEAD OFFICES subitem
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("HeadOfficeList"),
|
title: window.$gz.locale.get("HeadOfficeList"),
|
||||||
icon: "sitemap",
|
icon: "sitemap",
|
||||||
route: "/cust-headoffices",
|
route: "/cust-headoffices",
|
||||||
key: key++
|
key: key++
|
||||||
});
|
});
|
||||||
|
|
||||||
// ** CUSTOMER (TOP)
|
// ** CUSTOMER (TOP)
|
||||||
addNavItem(
|
addNavItem(
|
||||||
window.$gz.locale.get("ClientList"),
|
window.$gz.locale.get("ClientList"),
|
||||||
"address-book",
|
"address-book",
|
||||||
undefined,
|
undefined,
|
||||||
sub,
|
sub,
|
||||||
key++
|
key++
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//****************** SERVICE
|
//****************** SERVICE
|
||||||
if (
|
if (
|
||||||
window.$gz.role.hasRole([
|
window.$gz.role.hasRole([
|
||||||
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
|
||||||
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited,
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited,
|
||||||
window.$gz.role.AUTHORIZATION_ROLES.AccountingFull,
|
|
||||||
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
|
||||||
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
|
||||||
window.$gz.role.AUTHORIZATION_ROLES.InventoryFull,
|
window.$gz.role.AUTHORIZATION_ROLES.TechFull,
|
||||||
window.$gz.role.AUTHORIZATION_ROLES.InventoryLimitedKF
|
window.$gz.role.AUTHORIZATION_ROLES.TechLimited,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.SalesFull,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.SalesLimited
|
||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
//clear sublevel array
|
//clear sublevel array
|
||||||
sub = [];
|
sub = [];
|
||||||
|
|
||||||
//SCHEDULE (combined)
|
//SCHEDULE (combined)
|
||||||
sub.push({
|
if (
|
||||||
title: window.$gz.locale.get("Schedule"),
|
window.$gz.role.hasRole([
|
||||||
icon: "calendar-alt",
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
|
||||||
route: "/svc-schedule",
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited,
|
||||||
key: key++
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
|
||||||
});
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.TechFull,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.TechLimited
|
||||||
|
])
|
||||||
|
) {
|
||||||
|
sub.push({
|
||||||
|
title: window.$gz.locale.get("Schedule"),
|
||||||
|
icon: "calendar-alt",
|
||||||
|
route: "/svc-schedule",
|
||||||
|
key: key++
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//WORKORDERS LIST (was service workorders)
|
//WORKORDERS LIST (was service workorders)
|
||||||
sub.push({
|
if (
|
||||||
title: window.$gz.locale.get("WorkorderServiceList"),
|
window.$gz.role.hasRole([
|
||||||
icon: "tools",
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
|
||||||
route: "/svc-workorders",
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited,
|
||||||
key: key++
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
|
||||||
});
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.TechFull,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.TechLimited
|
||||||
|
])
|
||||||
|
) {
|
||||||
|
sub.push({
|
||||||
|
title: window.$gz.locale.get("WorkorderServiceList"),
|
||||||
|
icon: "tools",
|
||||||
|
route: "/svc-workorders",
|
||||||
|
key: key++
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// //WORKORDER TEMPLATES LIST
|
// //WORKORDER TEMPLATES LIST
|
||||||
//this will be an item inside the workorders NEW menu or grid or wherever but it's not top level worthy
|
//this will be an item inside the workorders NEW menu or grid or wherever but it's not top level worthy
|
||||||
@@ -174,6 +210,8 @@ export default function initialize() {
|
|||||||
// });
|
// });
|
||||||
|
|
||||||
//QUOTE LIST
|
//QUOTE LIST
|
||||||
|
//NOTE: this is the only item in this service level area that is visible to Sales
|
||||||
|
//so there is no separate role check here as the service group role check supersedes this
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("WorkorderQuoteList"),
|
title: window.$gz.locale.get("WorkorderQuoteList"),
|
||||||
icon: "edit",
|
icon: "edit",
|
||||||
@@ -182,54 +220,108 @@ export default function initialize() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//PM LIST
|
//PM LIST
|
||||||
sub.push({
|
if (
|
||||||
title: window.$gz.locale.get(
|
window.$gz.role.hasRole([
|
||||||
"WorkorderPreventiveMaintenanceList"
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
|
||||||
),
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited,
|
||||||
icon: "business-time",
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
|
||||||
route: "/svc-pm-list",
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
|
||||||
key: key++
|
window.$gz.role.AUTHORIZATION_ROLES.TechFull,
|
||||||
});
|
window.$gz.role.AUTHORIZATION_ROLES.TechLimited
|
||||||
|
])
|
||||||
|
) {
|
||||||
|
sub.push({
|
||||||
|
title: window.$gz.locale.get(
|
||||||
|
"WorkorderPreventiveMaintenanceList"
|
||||||
|
),
|
||||||
|
icon: "business-time",
|
||||||
|
route: "/svc-pm-list",
|
||||||
|
key: key++
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//UNITS subitem
|
//UNITS subitem
|
||||||
sub.push({
|
if (
|
||||||
title: window.$gz.locale.get("UnitList"),
|
window.$gz.role.hasRole([
|
||||||
icon: "fan",
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
|
||||||
route: "/svc-units",
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited,
|
||||||
key: key++
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
|
||||||
});
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.TechFull,
|
||||||
//UNIT MODELS subitem
|
window.$gz.role.AUTHORIZATION_ROLES.TechLimited
|
||||||
sub.push({
|
])
|
||||||
title: window.$gz.locale.get("UnitModels"),
|
) {
|
||||||
icon: "dice-d20",
|
sub.push({
|
||||||
route: "/svc-unit-models",
|
title: window.$gz.locale.get("UnitList"),
|
||||||
key: key++
|
icon: "fan",
|
||||||
});
|
route: "/svc-units",
|
||||||
|
key: key++
|
||||||
|
});
|
||||||
|
|
||||||
|
//UNIT MODELS subitem
|
||||||
|
sub.push({
|
||||||
|
title: window.$gz.locale.get("UnitModels"),
|
||||||
|
icon: "dice-d20",
|
||||||
|
route: "/svc-unit-models",
|
||||||
|
key: key++
|
||||||
|
});
|
||||||
|
}
|
||||||
//LOANERS subitem
|
//LOANERS subitem
|
||||||
sub.push({
|
if (
|
||||||
title: window.$gz.locale.get("LoanItemList"),
|
window.$gz.role.hasRole([
|
||||||
icon: "plug",
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
|
||||||
route: "/svc-loaners",
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited,
|
||||||
key: key++
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
|
||||||
});
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.TechFull,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.TechLimited
|
||||||
|
])
|
||||||
|
) {
|
||||||
|
sub.push({
|
||||||
|
title: window.$gz.locale.get("LoanItemList"),
|
||||||
|
icon: "plug",
|
||||||
|
route: "/svc-loaners",
|
||||||
|
key: key++
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//CONTRACTS subitem
|
//CONTRACTS subitem
|
||||||
sub.push({
|
if (
|
||||||
title: window.$gz.locale.get("ContractList"),
|
window.$gz.role.hasRole([
|
||||||
icon: "file-contract",
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
|
||||||
route: "/svc-contracts",
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited,
|
||||||
key: key++
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
|
||||||
});
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.TechFull,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.TechLimited
|
||||||
|
])
|
||||||
|
) {
|
||||||
|
sub.push({
|
||||||
|
title: window.$gz.locale.get("ContractList"),
|
||||||
|
icon: "file-contract",
|
||||||
|
route: "/svc-contracts",
|
||||||
|
key: key++
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//CUSTOMER SERVICE REQUESTS subitem
|
//CUSTOMER SERVICE REQUESTS subitem
|
||||||
sub.push({
|
if (
|
||||||
title: window.$gz.locale.get("ClientServiceRequestList"),
|
window.$gz.role.hasRole([
|
||||||
icon: "child",
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
|
||||||
route: "/svc-csr-list",
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited,
|
||||||
key: key++
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
|
||||||
});
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.TechFull,
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.TechLimited
|
||||||
|
])
|
||||||
|
) {
|
||||||
|
sub.push({
|
||||||
|
title: window.$gz.locale.get("ClientServiceRequestList"),
|
||||||
|
icon: "child",
|
||||||
|
route: "/svc-csr-list",
|
||||||
|
key: key++
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//**** Service (TOP GROUP)
|
//**** Service (TOP GROUP)
|
||||||
addNavItem(
|
addNavItem(
|
||||||
@@ -326,7 +418,7 @@ export default function initialize() {
|
|||||||
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
|
||||||
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
|
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
|
||||||
window.$gz.role.AUTHORIZATION_ROLES.InventoryFull,
|
window.$gz.role.AUTHORIZATION_ROLES.InventoryFull,
|
||||||
window.$gz.role.AUTHORIZATION_ROLES.InventoryLimitedKF
|
window.$gz.role.AUTHORIZATION_ROLES.InventoryLimited
|
||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
addNavItem(
|
addNavItem(
|
||||||
|
|||||||
Reference in New Issue
Block a user