From 053e53dbaa0a08edd30ef30ede01edd6719f6a76 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 29 Oct 2020 22:05:30 +0000 Subject: [PATCH] --- ayanova/src/api/dash-registry.js | 32 +++------------------------- ayanova/src/components/dash-base.vue | 15 ++++++++++--- ayanova/src/views/home-dashboard.vue | 1 - 3 files changed, 15 insertions(+), 33 deletions(-) diff --git a/ayanova/src/api/dash-registry.js b/ayanova/src/api/dash-registry.js index 6c702d64..759bbaaf 100644 --- a/ayanova/src/api/dash-registry.js +++ b/ayanova/src/api/dash-registry.js @@ -1,49 +1,23 @@ -/** - if ( - window.$gz.role.hasRole([ - 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: "Search", - icon: "$ayiSearch", - route: "/home-search", - key: key++ - }); - } - */ import authorizationroles from "./authorizationroles"; let role = authorizationroles.AUTHORIZATION_ROLES; export default { registry: { dashBizOnlyTest: { roles: [role.BizAdminFull, role.BizAdminLimited], - title: "Biz only dash item" + title: "Biz only test item" }, dashTechOnlyTest: { roles: [role.TechFull, role.TechLimited], - title: "Tech only dash item" + title: "Tech only test item" }, dashSalesOnlyTest: { roles: [role.SalesFull, role.SalesLimited], - title: "Sales only dash item" + title: "Sales only test item" } }, availableItems() { let ret = []; - for (const [key, value] of Object.entries(this.registry)) { - // console.log(`key: ${key}, value: ${JSON.stringify(value)}`); if (authorizationroles.hasRole(value.roles)) { ret.push({ id: key, title: value.title }); } diff --git a/ayanova/src/components/dash-base.vue b/ayanova/src/components/dash-base.vue index 1444efb8..2ddeb963 100644 --- a/ayanova/src/components/dash-base.vue +++ b/ayanova/src/components/dash-base.vue @@ -1,5 +1,5 @@