This commit is contained in:
2020-01-03 20:31:26 +00:00
parent d08ff54187
commit 5088549672

View File

@@ -133,273 +133,324 @@ export default function initialize() {
); );
//****************** SERVICE //****************** SERVICE
//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.AccountingFull,
window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
window.$gz.role.AUTHORIZATION_ROLES.InventoryFull,
window.$gz.role.AUTHORIZATION_ROLES.InventoryLimitedKF
])
) {
//clear sublevel array
sub = [];
//SCHEDULE (combined) //SCHEDULE (combined)
sub.push({ sub.push({
title: window.$gz.locale.get("Schedule"), title: window.$gz.locale.get("Schedule"),
icon: "calendar-alt", icon: "calendar-alt",
route: "/svc-schedule", route: "/svc-schedule",
key: key++ key: key++
}); });
//WORKORDERS LIST (was service workorders) //WORKORDERS LIST (was service workorders)
sub.push({ sub.push({
title: window.$gz.locale.get("WorkorderServiceList"), title: window.$gz.locale.get("WorkorderServiceList"),
icon: "tools", icon: "tools",
route: "/svc-workorders", route: "/svc-workorders",
key: key++ 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
//there used to be an array for 3rd level shit but that's whack yo! ;) //there used to be an array for 3rd level shit but that's whack yo! ;)
// subSub.push({ // subSub.push({
// title: window.$gz.locale.get("WorkorderServiceTemplate"), // title: window.$gz.locale.get("WorkorderServiceTemplate"),
// icon: "stamp", // icon: "stamp",
// route: "/svc-workorder-templates", // route: "/svc-workorder-templates",
// key: key++ // key: key++
// }); // });
//QUOTE LIST //QUOTE LIST
sub.push({ sub.push({
title: window.$gz.locale.get("WorkorderQuoteList"), title: window.$gz.locale.get("WorkorderQuoteList"),
icon: "edit", icon: "edit",
route: "/svc-quotes", route: "/svc-quotes",
key: key++ key: key++
}); });
//PM LIST //PM LIST
sub.push({ sub.push({
title: window.$gz.locale.get("WorkorderPreventiveMaintenanceList"), title: window.$gz.locale.get(
icon: "business-time", "WorkorderPreventiveMaintenanceList"
route: "/svc-pm-list", ),
key: key++ icon: "business-time",
}); route: "/svc-pm-list",
key: key++
});
//UNITS subitem //UNITS subitem
sub.push({ sub.push({
title: window.$gz.locale.get("UnitList"), title: window.$gz.locale.get("UnitList"),
icon: "fan", icon: "fan",
route: "/svc-units", route: "/svc-units",
key: key++ key: key++
}); });
//UNIT MODELS subitem //UNIT MODELS subitem
sub.push({ sub.push({
title: window.$gz.locale.get("UnitModels"), title: window.$gz.locale.get("UnitModels"),
icon: "dice-d20", icon: "dice-d20",
route: "/svc-unit-models", route: "/svc-unit-models",
key: key++ key: key++
}); });
//LOANERS subitem //LOANERS subitem
sub.push({ sub.push({
title: window.$gz.locale.get("LoanItemList"), title: window.$gz.locale.get("LoanItemList"),
icon: "plug", icon: "plug",
route: "/svc-loaners", route: "/svc-loaners",
key: key++ key: key++
}); });
//CONTRACTS subitem //CONTRACTS subitem
sub.push({ sub.push({
title: window.$gz.locale.get("ContractList"), title: window.$gz.locale.get("ContractList"),
icon: "file-contract", icon: "file-contract",
route: "/svc-contracts", route: "/svc-contracts",
key: key++ key: key++
}); });
//CUSTOMER SERVICE REQUESTS subitem //CUSTOMER SERVICE REQUESTS subitem
sub.push({ sub.push({
title: window.$gz.locale.get("ClientServiceRequestList"), title: window.$gz.locale.get("ClientServiceRequestList"),
icon: "child", icon: "child",
route: "/svc-csr-list", route: "/svc-csr-list",
key: key++ key: key++
}); });
//**** Service (TOP GROUP) //**** Service (TOP GROUP)
addNavItem( addNavItem(
window.$gz.locale.get("Service"), window.$gz.locale.get("Service"),
"toolbox", "toolbox",
undefined, undefined,
sub, sub,
key++ key++
); );
}
//****************** INVENTORY //****************** INVENTORY
//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.InventoryFull,
window.$gz.role.AUTHORIZATION_ROLES.InventoryLimited
])
) {
//clear sublevel array
sub = [];
//PARTS (part list) //PARTS (part list)
sub.push({ sub.push({
title: window.$gz.locale.get("PartList"), title: window.$gz.locale.get("PartList"),
icon: "boxes", icon: "boxes",
route: "/inv-parts", route: "/inv-parts",
key: key++ key: key++
}); });
//INVENTORY //INVENTORY
sub.push({ sub.push({
title: window.$gz.locale.get("PartByWarehouseInventoryList"), title: window.$gz.locale.get("PartByWarehouseInventoryList"),
icon: "pallet", icon: "pallet",
route: "/inv-part-inventory", route: "/inv-part-inventory",
key: key++ key: key++
}); });
//PART REQUESTS //PART REQUESTS
sub.push({ sub.push({
title: window.$gz.locale.get("WorkorderItemPartRequestList"), title: window.$gz.locale.get("WorkorderItemPartRequestList"),
icon: "paper-plane", icon: "paper-plane",
route: "/inv-part-requests", route: "/inv-part-requests",
key: key++ key: key++
}); });
//PURCHASE ORDERS //PURCHASE ORDERS
sub.push({ sub.push({
title: window.$gz.locale.get("InventoryPurchaseOrders"), title: window.$gz.locale.get("InventoryPurchaseOrders"),
icon: "shipping-fast", icon: "shipping-fast",
route: "/inv-purchase-orders", route: "/inv-purchase-orders",
key: key++ key: key++
}); });
//NOTE: V7 HAD POITEMS, THAT MAY BE AN ANACHRONISM NOW SO NOT PUTTING HERE //NOTE: V7 HAD POITEMS, THAT MAY BE AN ANACHRONISM NOW SO NOT PUTTING HERE
//PURCHASE ORDER RECEIPTS //PURCHASE ORDER RECEIPTS
sub.push({ sub.push({
title: window.$gz.locale.get("InventoryPurchaseOrderReceipts"), title: window.$gz.locale.get("InventoryPurchaseOrderReceipts"),
icon: "dolly-flatbed", icon: "dolly-flatbed",
route: "/inv-purchase-order-receipts", route: "/inv-purchase-order-receipts",
key: key++ key: key++
}); });
//NOTE: V7 HAD PORECEIPTITEMS, THAT MAY BE AN ANACHRONISM NOW SO NOT PUTTING HERE //NOTE: V7 HAD PORECEIPTITEMS, THAT MAY BE AN ANACHRONISM NOW SO NOT PUTTING HERE
//ADJUSTMENTS //NOTE: Warehouses? Shouldn't they be here as well??
sub.push({
title: window.$gz.locale.get("InventoryPartInventoryAdjustments"),
icon: "dolly",
route: "/inv-adjustments",
key: key++
});
//**** INVENTORY (TOP GROUP) //ADJUSTMENTS
addNavItem( sub.push({
window.$gz.locale.get("Inventory"), title: window.$gz.locale.get("InventoryPartInventoryAdjustments"),
"box", icon: "dolly",
undefined, route: "/inv-adjustments",
sub, key: key++
key++ });
);
//**** INVENTORY (TOP GROUP)
addNavItem(
window.$gz.locale.get("Inventory"),
"box",
undefined,
sub,
key++
);
}
//**** VENDORS (TOP GROUP) //**** VENDORS (TOP GROUP)
addNavItem( if (
window.$gz.locale.get("VendorList"), window.$gz.role.hasRole([
"store", window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
"/vendors", window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited,
[], window.$gz.role.AUTHORIZATION_ROLES.AccountingFull,
key++ window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
); window.$gz.role.AUTHORIZATION_ROLES.DispatchLimited,
window.$gz.role.AUTHORIZATION_ROLES.InventoryFull,
window.$gz.role.AUTHORIZATION_ROLES.InventoryLimitedKF
])
) {
addNavItem(
window.$gz.locale.get("VendorList"),
"store",
"/vendors",
[],
key++
);
}
//****************** ACCOUNTING //****************** ACCOUNTING
if (
window.$gz.role.hasRole([
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
window.$gz.role.AUTHORIZATION_ROLES.AccountingFull,
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited
])
) {
sub = [];
sub = []; //FAKE subitem as is still TBD
sub.push({
title: window.$gz.locale.get("Accounting"),
icon: "calculator",
route: "/acc-accounting",
key: key++
});
//FAKE subitem as is still TBD // ** ACCOUNTING (TOP)
sub.push({ addNavItem(
title: window.$gz.locale.get("Accounting"), window.$gz.locale.get("Accounting"),
icon: "calculator", "calculator",
route: "/acc-accounting", undefined,
key: key++ sub,
}); key++
);
// ** CUSTOMER (TOP) }
addNavItem(
window.$gz.locale.get("Accounting"),
"calculator",
undefined,
sub,
key++
);
//****************** ADMINISTRATION //****************** ADMINISTRATION
//clear sublevel array if (
sub = []; window.$gz.role.hasRole([
window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited
])
) {
//clear sublevel array
sub = [];
// GLOBAL SETTINGS // GLOBAL SETTINGS
sub.push({ sub.push({
title: window.$gz.locale.get("AdministrationGlobalSettings"), title: window.$gz.locale.get("AdministrationGlobalSettings"),
icon: "cogs", icon: "cogs",
route: "/adm-global-settings", route: "/adm-global-settings",
key: key++ key: key++
}); });
// LICENSE // LICENSE
sub.push({ sub.push({
title: window.$gz.locale.get("HelpLicense"), title: window.$gz.locale.get("HelpLicense"),
icon: "ticket-alt", icon: "ticket-alt",
route: "/adm-license", route: "/adm-license",
key: key++ key: key++
}); });
// USERS // USERS
sub.push({ sub.push({
title: window.$gz.locale.get("UserList"), title: window.$gz.locale.get("UserList"),
icon: "users", icon: "users",
route: "/adm-users", route: "/adm-users",
key: key++ key: key++
}); });
// CUSTOM FIELD DESIGNER NOT REQUIRED, OPENS FROM INDIVIDUAL FORMS // CUSTOM FIELD DESIGNER NOT REQUIRED, OPENS FROM INDIVIDUAL FORMS
//LOCALIZED TEXT DESIGNER //LOCALIZED TEXT DESIGNER
sub.push({ sub.push({
title: window.$gz.locale.get("LocalizedTextDesign"), title: window.$gz.locale.get("LocalizedTextDesign"),
icon: "language", icon: "language",
route: "/adm-localized-text", route: "/adm-localized-text",
key: key++ key: key++
}); });
//REPORT TEMPLATES //REPORT TEMPLATES
sub.push({ sub.push({
title: window.$gz.locale.get("ReportList"), title: window.$gz.locale.get("ReportList"),
icon: "th-list", icon: "th-list",
route: "/adm-report-templates", route: "/adm-report-templates",
key: key++ key: key++
}); });
//FILES IN DATABASE //FILES IN DATABASE
sub.push({ sub.push({
title: window.$gz.locale.get("Attachments"), title: window.$gz.locale.get("Attachments"),
icon: "folder", icon: "folder",
route: "/adm-attachments", route: "/adm-attachments",
key: key++ key: key++
}); });
//EVENT LOG / HISTORY //EVENT LOG / HISTORY
sub.push({ sub.push({
title: window.$gz.locale.get("History"), title: window.$gz.locale.get("History"),
icon: "history", icon: "history",
route: "/adm-history", route: "/adm-history",
key: key++ key: key++
}); });
//KPI / METRICS / CHARTS AND STUFF //KPI / METRICS / CHARTS AND STUFF
sub.push({ sub.push({
title: window.$gz.locale.get("Statistics"), title: window.$gz.locale.get("Statistics"),
icon: "chart-line", icon: "chart-line",
route: "/adm-statistics", route: "/adm-statistics",
key: key++ key: key++
}); });
// ** ADMINISTRATION (TOP) // ** ADMINISTRATION (TOP)
addNavItem( addNavItem(
window.$gz.locale.get("Administration"), window.$gz.locale.get("Administration"),
"user-tie", "user-tie",
undefined, undefined,
sub, sub,
key++ key++
); );
}
//****************** OPERATIONS //****************** OPERATIONS
if ( if (