diff --git a/ayanova/src/api/initialize.js b/ayanova/src/api/initialize.js index 59f469b0..78e020f6 100644 --- a/ayanova/src/api/initialize.js +++ b/ayanova/src/api/initialize.js @@ -27,28 +27,30 @@ export default function initialize() { let key = 0; let sub = []; + let t = window.$gz.translation.get; + let role = window.$gz.role.AUTHORIZATION_ROLES; //****************** HOME //Most users except ops and client logins 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.SubContractorLimited, - window.$gz.role.AUTHORIZATION_ROLES.SubContractorFull, - window.$gz.role.AUTHORIZATION_ROLES.SalesFull, - window.$gz.role.AUTHORIZATION_ROLES.SalesLimited + role.BizAdminFull, + role.BizAdminLimited, + role.DispatchFull, + role.DispatchLimited, + role.InventoryLimited, + role.InventoryFull, + role.AccountingFull, + role.TechLimited, + role.TechFull, + role.SubContractorLimited, + role.SubContractorFull, + role.SalesFull, + role.SalesLimited ]) ) { //DASHBOARD sub.push({ - title: window.$gz.translation.get("Dashboard"), + title: t("Dashboard"), icon: "fa-tachometer-alt", route: "/home-dashboard", key: key++ @@ -60,21 +62,21 @@ export default function initialize() { //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 + role.BizAdminFull, + role.BizAdminLimited, + role.DispatchFull, + role.DispatchLimited, + role.InventoryLimited, + role.InventoryFull, + role.AccountingFull, + role.TechLimited, + role.TechFull, + role.SalesFull, + role.SalesLimited ]) ) { sub.push({ - title: window.$gz.translation.get("Search"), + title: t("Search"), icon: "fa-search", route: "/home-search", key: key++ @@ -83,7 +85,7 @@ export default function initialize() { //SCHEDULE (personal) sub.push({ - title: window.$gz.translation.get("Schedule"), + title: t("Schedule"), icon: "fa-calendar-day", route: "/home-schedule", key: key++ @@ -91,7 +93,7 @@ export default function initialize() { //MEMOS sub.push({ - title: window.$gz.translation.get("MemoList"), + title: t("MemoList"), icon: "fa-inbox", route: "/home-memos", key: key++ @@ -99,7 +101,7 @@ export default function initialize() { //REMINDERS (SCHEDULE MARKERS) sub.push({ - title: window.$gz.translation.get("ReminderList"), + title: t("ReminderList"), icon: "fa-sticky-note", route: "/home-reminders", key: key++ @@ -107,7 +109,7 @@ export default function initialize() { //USER SETTINGS sub.push({ - title: window.$gz.translation.get("UserSettings"), + title: t("UserSettings"), icon: "fa-user-cog", route: "/home-user-settings", key: key++ @@ -116,7 +118,7 @@ export default function initialize() { //Moved these two into user settings // //USER TRANSLATE // sub.push({ - // title: window.$gz.translation.get("Translation"), + // title: t("Translation"), // icon: "fa-language", // route: "/home-translation", // key: key++ @@ -124,7 +126,7 @@ export default function initialize() { // //SET LOGIN // sub.push({ - // title: window.$gz.translation.get("SetLoginPassword"), + // title: t("SetLoginPassword"), // icon: "fa-key", // route: "/home-password", // key: key++ @@ -134,21 +136,21 @@ export default function initialize() { 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 + role.BizAdminFull, + role.BizAdminLimited, + role.DispatchFull, + role.DispatchLimited, + role.InventoryLimited, + role.InventoryFull, + role.AccountingFull, + role.TechLimited, + role.TechFull, + role.SalesFull, + role.SalesLimited ]) ) { sub.push({ - title: window.$gz.translation.get("NotifySubscriptionList"), + title: t("NotifySubscriptionList"), icon: "fa-bullhorn", route: "/home-notify-subscriptions", key: key++ @@ -156,28 +158,21 @@ export default function initialize() { } //HOME - addNavItem( - window.$gz.translation.get("Home"), - "fa-home", - undefined, - sub, - key++, - "home" - ); + addNavItem(t("Home"), "fa-home", undefined, sub, key++, "home"); } //****************** CUSTOMERS 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.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 + role.BizAdminFull, + role.BizAdminLimited, + role.DispatchFull, + role.DispatchLimited, + role.TechFull, + role.TechLimited, + role.AccountingFull, + role.SalesFull, + role.SalesLimited ]) ) { //clear sublevel array @@ -185,7 +180,7 @@ export default function initialize() { //CUSTOMERS subitem sub.push({ - title: window.$gz.translation.get("ClientList"), + title: t("ClientList"), icon: "fa-address-card", route: "/cust-customers", key: key++ @@ -193,7 +188,7 @@ export default function initialize() { //HEAD OFFICES subitem sub.push({ - title: window.$gz.translation.get("HeadOfficeList"), + title: t("HeadOfficeList"), icon: "fa-sitemap", route: "/cust-headoffices", key: key++ @@ -201,7 +196,7 @@ export default function initialize() { // ** CUSTOMER (TOP) addNavItem( - window.$gz.translation.get("ClientList"), + t("ClientList"), "fa-address-book", undefined, sub, @@ -213,14 +208,14 @@ export default function initialize() { //****************** SERVICE 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.TechFull, - window.$gz.role.AUTHORIZATION_ROLES.TechLimited, - window.$gz.role.AUTHORIZATION_ROLES.SalesFull, - window.$gz.role.AUTHORIZATION_ROLES.SalesLimited + role.BizAdminFull, + role.BizAdminLimited, + role.DispatchFull, + role.DispatchLimited, + role.TechFull, + role.TechLimited, + role.SalesFull, + role.SalesLimited ]) ) { //clear sublevel array @@ -228,16 +223,16 @@ export default function initialize() { //SCHEDULE (combined) 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.TechFull, - window.$gz.role.AUTHORIZATION_ROLES.TechLimited + role.BizAdminFull, + role.BizAdminLimited, + role.DispatchFull, + role.DispatchLimited, + role.TechFull, + role.TechLimited ]) ) { sub.push({ - title: window.$gz.translation.get("Schedule"), + title: t("Schedule"), icon: "fa-calendar-alt", route: "/svc-schedule", key: key++ @@ -247,16 +242,16 @@ export default function initialize() { //WORKORDERS LIST (was service workorders) 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.TechFull, - window.$gz.role.AUTHORIZATION_ROLES.TechLimited + role.BizAdminFull, + role.BizAdminLimited, + role.DispatchFull, + role.DispatchLimited, + role.TechFull, + role.TechLimited ]) ) { sub.push({ - title: window.$gz.translation.get("WorkorderServiceList"), + title: t("WorkorderServiceList"), icon: "fa-tools", route: "/svc-workorders", key: key++ @@ -267,7 +262,7 @@ export default function initialize() { //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! ;) // subSub.push({ - // title: window.$gz.translation.get("WorkorderServiceTemplate"), + // title: t("WorkorderServiceTemplate"), // icon: "fa-stamp", // route: "/svc-workorder-templates", // key: key++ @@ -277,7 +272,7 @@ export default function initialize() { //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({ - title: window.$gz.translation.get("WorkorderQuoteList"), + title: t("WorkorderQuoteList"), icon: "fa-edit", route: "/svc-quotes", key: key++ @@ -286,18 +281,16 @@ export default function initialize() { //PM LIST 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.TechFull, - window.$gz.role.AUTHORIZATION_ROLES.TechLimited + role.BizAdminFull, + role.BizAdminLimited, + role.DispatchFull, + role.DispatchLimited, + role.TechFull, + role.TechLimited ]) ) { sub.push({ - title: window.$gz.translation.get( - "WorkorderPreventiveMaintenanceList" - ), + title: t("WorkorderPreventiveMaintenanceList"), icon: "fa-business-time", route: "/svc-pm-list", key: key++ @@ -307,16 +300,16 @@ export default function initialize() { //UNITS subitem 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.TechFull, - window.$gz.role.AUTHORIZATION_ROLES.TechLimited + role.BizAdminFull, + role.BizAdminLimited, + role.DispatchFull, + role.DispatchLimited, + role.TechFull, + role.TechLimited ]) ) { sub.push({ - title: window.$gz.translation.get("UnitList"), + title: t("UnitList"), icon: "fa-fan", route: "/svc-units", key: key++ @@ -324,7 +317,7 @@ export default function initialize() { //UNIT MODELS subitem sub.push({ - title: window.$gz.translation.get("UnitModels"), + title: t("UnitModels"), icon: "fa-dice-d20", route: "/svc-unit-models", key: key++ @@ -333,16 +326,16 @@ export default function initialize() { //LOANERS subitem 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.TechFull, - window.$gz.role.AUTHORIZATION_ROLES.TechLimited + role.BizAdminFull, + role.BizAdminLimited, + role.DispatchFull, + role.DispatchLimited, + role.TechFull, + role.TechLimited ]) ) { sub.push({ - title: window.$gz.translation.get("LoanItemList"), + title: t("LoanItemList"), icon: "fa-plug", route: "/svc-loaners", key: key++ @@ -352,16 +345,16 @@ export default function initialize() { //CONTRACTS subitem 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.TechFull, - window.$gz.role.AUTHORIZATION_ROLES.TechLimited + role.BizAdminFull, + role.BizAdminLimited, + role.DispatchFull, + role.DispatchLimited, + role.TechFull, + role.TechLimited ]) ) { sub.push({ - title: window.$gz.translation.get("ContractList"), + title: t("ContractList"), icon: "fa-file-contract", route: "/svc-contracts", key: key++ @@ -371,16 +364,16 @@ export default function initialize() { //CUSTOMER SERVICE REQUESTS subitem 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.TechFull, - window.$gz.role.AUTHORIZATION_ROLES.TechLimited + role.BizAdminFull, + role.BizAdminLimited, + role.DispatchFull, + role.DispatchLimited, + role.TechFull, + role.TechLimited ]) ) { sub.push({ - title: window.$gz.translation.get("ClientServiceRequestList"), + title: t("ClientServiceRequestList"), icon: "fa-child", route: "/svc-csr-list", key: key++ @@ -389,7 +382,7 @@ export default function initialize() { //**** Service (TOP GROUP) addNavItem( - window.$gz.translation.get("Service"), + t("Service"), "fa-toolbox", undefined, sub, @@ -401,10 +394,10 @@ export default function initialize() { //****************** INVENTORY if ( 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 + role.BizAdminFull, + role.BizAdminLimited, + role.InventoryFull, + role.InventoryLimited ]) ) { //clear sublevel array @@ -412,7 +405,7 @@ export default function initialize() { //PARTS (part list) sub.push({ - title: window.$gz.translation.get("PartList"), + title: t("PartList"), icon: "fa-boxes", route: "/inv-parts", key: key++ @@ -420,7 +413,7 @@ export default function initialize() { //INVENTORY sub.push({ - title: window.$gz.translation.get("PartByWarehouseInventoryList"), + title: t("PartByWarehouseInventoryList"), icon: "fa-pallet", route: "/inv-part-inventory", key: key++ @@ -428,7 +421,7 @@ export default function initialize() { //PART REQUESTS sub.push({ - title: window.$gz.translation.get("WorkorderItemPartRequestList"), + title: t("WorkorderItemPartRequestList"), icon: "fa-paper-plane", route: "/inv-part-requests", key: key++ @@ -436,7 +429,7 @@ export default function initialize() { //PURCHASE ORDERS sub.push({ - title: window.$gz.translation.get("InventoryPurchaseOrders"), + title: t("InventoryPurchaseOrders"), icon: "fa-shipping-fast", route: "/inv-purchase-orders", key: key++ @@ -446,9 +439,7 @@ export default function initialize() { //PURCHASE ORDER RECEIPTS sub.push({ - title: window.$gz.translation.get( - "InventoryPurchaseOrderReceipts" - ), + title: t("InventoryPurchaseOrderReceipts"), icon: "fa-dolly-flatbed", route: "/inv-purchase-order-receipts", key: key++ @@ -460,9 +451,7 @@ export default function initialize() { //ADJUSTMENTS sub.push({ - title: window.$gz.translation.get( - "InventoryPartInventoryAdjustments" - ), + title: t("InventoryPartInventoryAdjustments"), icon: "fa-dolly", route: "/inv-adjustments", key: key++ @@ -470,7 +459,7 @@ export default function initialize() { //**** INVENTORY (TOP GROUP) addNavItem( - window.$gz.translation.get("Inventory"), + t("Inventory"), "fa-box", undefined, sub, @@ -482,17 +471,17 @@ export default function initialize() { //**** VENDORS (TOP GROUP) if ( 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.InventoryLimited + role.BizAdminFull, + role.BizAdminLimited, + role.AccountingFull, + role.DispatchFull, + role.DispatchLimited, + role.InventoryFull, + role.InventoryLimited ]) ) { addNavItem( - window.$gz.translation.get("VendorList"), + t("VendorList"), "fa-store", "/vendors", [], @@ -504,16 +493,16 @@ export default function initialize() { //****************** ACCOUNTING if ( window.$gz.role.hasRole([ - window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull, - window.$gz.role.AUTHORIZATION_ROLES.AccountingFull, - window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited + role.BizAdminFull, + role.AccountingFull, + role.BizAdminLimited ]) ) { sub = []; //FAKE subitem as is still TBD sub.push({ - title: window.$gz.translation.get("Accounting"), + title: t("Accounting"), icon: "fa-calculator", route: "/acc-accounting", key: key++ @@ -521,7 +510,7 @@ export default function initialize() { // ** ACCOUNTING (TOP) addNavItem( - window.$gz.translation.get("Accounting"), + t("Accounting"), "fa-calculator", undefined, sub, @@ -532,17 +521,14 @@ export default function initialize() { //****************** ADMINISTRATION if ( - window.$gz.role.hasRole([ - window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull, - window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited - ]) + window.$gz.role.hasRole([role.BizAdminFull, role.BizAdminLimited]) ) { //clear sublevel array sub = []; // GLOBAL SETTINGS sub.push({ - title: window.$gz.translation.get("AdministrationGlobalSettings"), + title: t("AdministrationGlobalSettings"), icon: "fa-cogs", route: "/adm-global-settings", key: key++ @@ -550,7 +536,7 @@ export default function initialize() { // LICENSE sub.push({ - title: window.$gz.translation.get("HelpLicense"), + title: t("HelpLicense"), icon: "fa-ticket-alt", route: "/adm-license", key: key++ @@ -558,7 +544,7 @@ export default function initialize() { // USERS sub.push({ - title: window.$gz.translation.get("UserList"), + title: t("UserList"), icon: "fa-users", route: "/adm-users", key: key++ @@ -568,7 +554,7 @@ export default function initialize() { //TRANSLATION sub.push({ - title: window.$gz.translation.get("Translation"), + title: t("Translation"), icon: "fa-language", route: "/adm-translation", key: key++ @@ -576,7 +562,7 @@ export default function initialize() { //REPORT TEMPLATES sub.push({ - title: window.$gz.translation.get("ReportList"), + title: t("ReportList"), icon: "fa-th-list", route: "/adm-report-templates", key: key++ @@ -584,7 +570,7 @@ export default function initialize() { //FILES IN DATABASE sub.push({ - title: window.$gz.translation.get("Attachments"), + title: t("Attachments"), icon: "fa-folder", route: "/adm-attachments", key: key++ @@ -592,7 +578,7 @@ export default function initialize() { //EVENT LOG / HISTORY sub.push({ - title: window.$gz.translation.get("History"), + title: t("History"), icon: "fa-history", route: "/adm-history", key: key++ @@ -600,7 +586,7 @@ export default function initialize() { //KPI / METRICS / CHARTS AND STUFF sub.push({ - title: window.$gz.translation.get("Statistics"), + title: t("Statistics"), icon: "fa-chart-line", route: "/adm-statistics", key: key++ @@ -608,7 +594,7 @@ export default function initialize() { // ** ADMINISTRATION (TOP) addNavItem( - window.$gz.translation.get("Administration"), + t("Administration"), "fa-user-tie", undefined, sub, @@ -619,17 +605,14 @@ export default function initialize() { //****************** OPERATIONS if ( - window.$gz.role.hasRole([ - window.$gz.role.AUTHORIZATION_ROLES.OpsAdminFull, - window.$gz.role.AUTHORIZATION_ROLES.OpsAdminLimited - ]) + window.$gz.role.hasRole([role.OpsAdminFull, role.OpsAdminLimited]) ) { //clear sublevel array sub = []; // ARCHIVE sub.push({ - title: window.$gz.translation.get("Backup"), + title: t("Backup"), icon: "fa-file-archive", route: "/ops-backup", key: key++ @@ -643,7 +626,7 @@ export default function initialize() { // JOBS sub.push({ - title: window.$gz.translation.get("ServerJobs"), + title: t("ServerJobs"), icon: "fa-robot", route: "/ops-jobs", key: key++ @@ -651,7 +634,7 @@ export default function initialize() { // LOGS sub.push({ - title: window.$gz.translation.get("ServerLog"), + title: t("ServerLog"), icon: "fa-history", route: "/ops-log", key: key++ @@ -659,7 +642,7 @@ export default function initialize() { //METRICS sub.push({ - title: window.$gz.translation.get("ServerMetrics"), + title: t("ServerMetrics"), icon: "fa-file-medical-alt", route: "/ops-metrics", key: key++ @@ -667,7 +650,7 @@ export default function initialize() { //NOTIFICATION CONFIG AND HISTORY sub.push({ - title: window.$gz.translation.get("NotificationSettings"), + title: t("NotificationSettings"), icon: "fa-bullhorn", route: "/ops-notification-settings", key: key++ @@ -675,7 +658,7 @@ export default function initialize() { // ** OPERATIONS (TOP) addNavItem( - window.$gz.translation.get("Operations"), + t("Operations"), "fa-server", undefined, sub, @@ -687,14 +670,14 @@ export default function initialize() { //**** WIDGETS (TOP GROUP) if ( 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 + role.BizAdminFull, + role.BizAdminLimited, + role.InventoryFull, + role.InventoryLimited ]) ) { addNavItem( - window.$gz.translation.get("WidgetList"), + t("WidgetList"), "fa-vial", "/widgets", [], @@ -706,8 +689,8 @@ export default function initialize() { //****************** CUSTOMER USER / HEAD OFFICE USER UI if ( window.$gz.role.hasRole([ - window.$gz.role.AUTHORIZATION_ROLES.CustomerFull, - window.$gz.role.AUTHORIZATION_ROLES.CustomerLimited + role.CustomerFull, + role.CustomerLimited ]) && (window.$gz.store.state.userType == 4 || window.$gz.store.state.userType == 5) @@ -721,7 +704,7 @@ export default function initialize() { //CSR LIST subitem sub.push({ - title: window.$gz.translation.get("ClientServiceRequestList"), + title: t("ClientServiceRequestList"), icon: "fa-child", route: "/customer-csr-list", key: key++ @@ -729,7 +712,7 @@ export default function initialize() { //WORKORDERS subitem sub.push({ - title: window.$gz.translation.get("WorkorderServiceList"), + title: t("WorkorderServiceList"), icon: "fa-tools", route: "/customer-workorders", key: key++ @@ -738,7 +721,7 @@ export default function initialize() { //** CUSTOMER LOGIN HOME (TOP) addNavItem( - window.$gz.translation.get("Home"), + t("Home"), "fa-home", undefined, sub, @@ -751,7 +734,8 @@ export default function initialize() { //GET USER OPTIONS window.$gz.api .get("UserOptions/" + window.$gz.store.state.userId) - .then(res => { + // eslint-disable-next-line + .then((res) => { if (res.error != undefined) { //In a form this would trigger a bunch of validation or error display code but for here and now: //convert error to human readable string for display and popup a notification to user @@ -805,7 +789,8 @@ export default function initialize() { //GET GLOBAL SETTINGS window.$gz.api .get("GlobalBizSettings/client") - .then(res => { + // eslint-disable-next-line + .then((res) => { if (res.error != undefined) { //In a form this would trigger a bunch of validation or error display code but for here and now: //convert error to human readable string for display and popup a notification to user diff --git a/ayanova/src/main.js b/ayanova/src/main.js index 8ac3a581..3920c6d7 100644 --- a/ayanova/src/main.js +++ b/ayanova/src/main.js @@ -193,5 +193,6 @@ new Vue({ vuetify: Vuetify, router, store, - render: h => h(App) + // eslint-disable-next-line + render: (h) => h(App) }).$mount("#app");