This commit is contained in:
2021-01-25 18:10:08 +00:00
parent 5bde2688a7
commit 4c8e30cd11

View File

@@ -24,9 +24,10 @@ function initNavPanel() {
let key = 0; let key = 0;
let sub = []; let sub = [];
let t = window.$gz.translation.get; // let t = window.$gz.translation.get;
let role = window.$gz.role.AUTHORIZATION_ROLES; // let role = window.$gz.role.AUTHORIZATION_ROLES;
let licenseState = window.$gz.store.state.globalSettings.licenseStatus; let licenseState = window.$gz.store.state.globalSettings.licenseStatus;
let useInventory = window.$gz.store.state.globalSettings.useInventory;
/*Service = 1, /*Service = 1,
NotService = 2, NotService = 2,
Customer = 3, Customer = 3,
@@ -385,7 +386,7 @@ function initNavPanel() {
} }
//INVENTORY //INVENTORY
if (window.$gz.role.canOpen(window.$gz.type.Part)) { if (useInventory && window.$gz.role.canOpen(window.$gz.type.PartInventory)) {
sub.push({ sub.push({
title: "PartInventoryList", title: "PartInventoryList",
icon: "$ayiPallet", icon: "$ayiPallet",
@@ -395,7 +396,10 @@ function initNavPanel() {
} }
//PART REQUESTS //PART REQUESTS
if (window.$gz.role.canOpen(window.$gz.type.WorkOrderItemPartRequest)) { if (
useInventory &&
window.$gz.role.canOpen(window.$gz.type.WorkOrderItemPartRequest)
) {
sub.push({ sub.push({
title: "WorkOrderItemPartRequestList", title: "WorkOrderItemPartRequestList",
icon: "$ayiPaperPlane", icon: "$ayiPaperPlane",
@@ -405,7 +409,7 @@ function initNavPanel() {
} }
//PURCHASE ORDERS //PURCHASE ORDERS
if (window.$gz.role.canOpen(window.$gz.type.PurchaseOrder)) { if (useInventory && window.$gz.role.canOpen(window.$gz.type.PurchaseOrder)) {
sub.push({ sub.push({
title: "InventoryPurchaseOrders", title: "InventoryPurchaseOrders",
icon: "$ayiShippingFast", icon: "$ayiShippingFast",
@@ -415,31 +419,43 @@ function initNavPanel() {
//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 -- DEPRECATED, just haven't removed yet until get to PO's
sub.push({ if (useInventory) {
title: "InventoryPurchaseOrderReceipts", sub.push({
icon: "$ayiDollyFlatbed", title: "InventoryPurchaseOrderReceipts",
route: "/inv-purchase-order-receipts", icon: "$ayiDollyFlatbed",
key: key++ route: "/inv-purchase-order-receipts",
}); 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 //ADJUSTMENTS
sub.push({ if (
title: "PartInventoryTransactionList", useInventory &&
icon: "$ayiDolly", window.$gz.role.canOpen(window.$gz.type.PartInventory)
route: "/inv-part-inventory-transactions", ) {
key: key++ sub.push({
}); title: "PartInventoryTransactionList",
icon: "$ayiDolly",
route: "/inv-part-inventory-transactions",
key: key++
});
}
//WAREHOUSES //WAREHOUSES
sub.push({ if (
title: "PartWarehouseList", useInventory &&
icon: "$ayiWarehouse", window.$gz.role.canOpen(window.$gz.type.PartWarehouse)
route: "/inv-part-warehouses", ) {
key: key++ sub.push({
}); title: "PartWarehouseList",
icon: "$ayiWarehouse",
route: "/inv-part-warehouses",
key: key++
});
}
} }
//**** INVENTORY (TOP GROUP) //**** INVENTORY (TOP GROUP)