This commit is contained in:
@@ -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";
|
import authorizationroles from "./authorizationroles";
|
||||||
let role = authorizationroles.AUTHORIZATION_ROLES;
|
let role = authorizationroles.AUTHORIZATION_ROLES;
|
||||||
export default {
|
export default {
|
||||||
registry: {
|
registry: {
|
||||||
dashBizOnlyTest: {
|
dashBizOnlyTest: {
|
||||||
roles: [role.BizAdminFull, role.BizAdminLimited],
|
roles: [role.BizAdminFull, role.BizAdminLimited],
|
||||||
title: "Biz only dash item"
|
title: "Biz only test item"
|
||||||
},
|
},
|
||||||
dashTechOnlyTest: {
|
dashTechOnlyTest: {
|
||||||
roles: [role.TechFull, role.TechLimited],
|
roles: [role.TechFull, role.TechLimited],
|
||||||
title: "Tech only dash item"
|
title: "Tech only test item"
|
||||||
},
|
},
|
||||||
dashSalesOnlyTest: {
|
dashSalesOnlyTest: {
|
||||||
roles: [role.SalesFull, role.SalesLimited],
|
roles: [role.SalesFull, role.SalesLimited],
|
||||||
title: "Sales only dash item"
|
title: "Sales only test item"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
availableItems() {
|
availableItems() {
|
||||||
let ret = [];
|
let ret = [];
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(this.registry)) {
|
for (const [key, value] of Object.entries(this.registry)) {
|
||||||
// console.log(`key: ${key}, value: ${JSON.stringify(value)}`);
|
|
||||||
if (authorizationroles.hasRole(value.roles)) {
|
if (authorizationroles.hasRole(value.roles)) {
|
||||||
ret.push({ id: key, title: value.title });
|
ret.push({ id: key, title: value.title });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-sheet color="white" elevation="4" height="300">
|
<v-sheet color="white" elevation="4" height="300" style="overflow: hidden;">
|
||||||
<slot name="dash-title">
|
<slot name="dash-title">
|
||||||
<v-toolbar flat dense>
|
<v-toolbar flat dense>
|
||||||
<v-toolbar-title> {{ title }}</v-toolbar-title>
|
<v-toolbar-title> {{ title }}</v-toolbar-title>
|
||||||
@@ -64,9 +64,18 @@
|
|||||||
</v-toolbar>
|
</v-toolbar>
|
||||||
</slot>
|
</slot>
|
||||||
<slot name="main"
|
<slot name="main"
|
||||||
><div class="ml-4 mt-1 d-flex justify-center align-center">
|
><div class="ml-4 mt-1 d-flex align-center">
|
||||||
<div>
|
<div>
|
||||||
CONTENT HERE
|
<span class="orange--text"
|
||||||
|
>CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT<br />CONTENT
|
||||||
|
CONTENT CONTENT CONTENT CONTENT CONTENT<br />CONTENT CONTENT CONTENT
|
||||||
|
CONTENT CONTENT CONTENT<br />CONTENT CONTENT CONTENT CONTENT CONTENT
|
||||||
|
CONTENT<br />CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT<br />CONTENT
|
||||||
|
CONTENT CONTENT CONTENT CONTENT CONTENT<br />CONTENT CONTENT CONTENT
|
||||||
|
CONTENT CONTENT CONTENT<br />CONTENT CONTENT CONTENT CONTENT CONTENT
|
||||||
|
CONTENT<br />CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT<br />CONTENT
|
||||||
|
CONTENT CONTENT CONTENT CONTENT CONTENT</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div></slot
|
</div></slot
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log(DashRegistry.availableItems());
|
|
||||||
this.availableItems = DashRegistry.availableItems();
|
this.availableItems = DashRegistry.availableItems();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Reference in New Issue
Block a user