From 85083333cfd99b9b9ad660423e5e3b8247c9609d Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sat, 17 Dec 2022 23:05:34 +0000 Subject: [PATCH] Got it building on new laptop --- client/package-lock.json | 4 +- client/src/api/initialize.js | 85 ++++++++++-------------------------- 2 files changed, 26 insertions(+), 63 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index cb542fe..df4cb44 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "sockeye", - "version": "8.0.0", + "version": "8.0.28", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sockeye", - "version": "8.0.0", + "version": "8.0.28", "dependencies": { "@fortawesome/fontawesome-svg-core": "^1.3.0", "@fortawesome/free-regular-svg-icons": "^5.15.4", diff --git a/client/src/api/initialize.js b/client/src/api/initialize.js index 4bd0086..132387e 100644 --- a/client/src/api/initialize.js +++ b/client/src/api/initialize.js @@ -28,10 +28,10 @@ function initNavPanel() { let sub = []; /*Service = 1, - NotService = 2, - Customer = 3, - HeadOffice = 4, - ServiceContractor = 5 */ +NotService = 2, +Customer = 3, +HeadOffice = 4, +ServiceContractor = 5 */ //########## OUTSIDE USERS GROUP (CUSTOMER / HEADOFFICE) ### if (window.$gz.store.getters.isCustomerUser == true) { @@ -42,17 +42,17 @@ function initNavPanel() { let CustomerHomePageSet = false; //USER SETTINGS - if (window.$gz.store.state.customerRights.userSettings == true) { - sub.push({ - title: "UserSettings", - icon: "$sockiUserCog", - route: "/home-user-settings", - key: key++ - }); + //if (window.$gz.store.state.customerRights.userSettings == true) { + sub.push({ + title: "UserSettings", + icon: "$sockiUserCog", + route: "/home-user-settings", + key: key++ + }); - window.$gz.store.commit("setHomePage", "/home-user-settings"); - CustomerHomePageSet = true; - } + window.$gz.store.commit("setHomePage", "/home-user-settings"); + CustomerHomePageSet = true; + // } if (window.$gz.store.getters.canSubscribeToNotifications) { sub.push({ @@ -211,25 +211,20 @@ function initNavPanel() { ); } - //####### SERVICE GROUP + //####### SHARED GROUP sub = []; - //SCHEDULE (service) - if ( - window.$gz.role.canOpen(window.$gz.type.WorkOrder) || - window.$gz.role.canOpen(window.$gz.type.Quote) || - window.$gz.role.canOpen(window.$gz.type.PM) - ) { - sub.push({ - title: "Schedule", - icon: "$sockiCalendarAlt", - route: "/svc-schedule", - key: key++ - }); - } + //SCHEDULE (shared) - //**** Service (TOP GROUP) + sub.push({ + title: "Schedule", + icon: "$sockiCalendarAlt", + route: "/svc-schedule", + key: key++ + }); + + //**** SHARED (TOP GROUP) if ( sub.length > 0 && !window.$gz.role.hasRole([ @@ -239,38 +234,6 @@ function initNavPanel() { addNavItem("Service", "$sockiToolbox", undefined, sub, key++, "service"); } - //######### INVENTORY GROUP - - //clear sublevel array - sub = []; - - //PARTS (part list) - if (window.$gz.role.canOpen(window.$gz.type.Part)) { - sub.push({ - title: "PartList", - icon: "$sockiBoxes", - route: "/inv-parts", - key: key++ - }); - } - - //PURCHASE ORDERS / PART REQUESTS - if (window.$gz.role.canOpen(window.$gz.type.PurchaseOrder)) { - sub.push({ - title: "InventoryPurchaseOrders", - icon: "$sockiTruckLoading", - route: "/inv-purchase-orders", - key: key++ - }); - - sub.push({ - title: "WorkOrderItemPartRequestList", - icon: "$sockiParachuteBox", - route: "/inv-part-requests", - key: key++ - }); - } - //****************** ACCOUNTING //SOCKEYE Keeping this for very likely future accounting functionality