Publish Role

This commit is contained in:
saeid_01
2019-05-13 06:41:02 +04:30
parent fc9dfeaf00
commit 76e18cca1d
77 changed files with 705 additions and 131638 deletions
+8 -4
View File
@@ -42,8 +42,9 @@
color="purple"
/>
</v-list-tile>
<template v-for="(link, i) in links" >
<v-list-tile
v-for="(link, i) in links"
v-if="!link.role || $hasRole(link.role)"
:key="i"
:to="link.to"
:active-class="color"
@@ -57,6 +58,7 @@
v-text="link.text"
/>
</v-list-tile>
</template>
<!-- <v-list-tile
disabled
active-class="primary"
@@ -104,12 +106,14 @@ export default {
{
to: {name: 'ManageUsers'},
icon: 'far fa-address-book',
text: 'Manage Users'
text: 'Manage Users',
role: 'Admin|Supervisor',
},
{
to: {name: 'ListTestType'},
icon: 'fas fa-vial',
text: 'List Test Type'
text: 'List Test Type',
role: 'Admin'
},
{
to: {name: 'SubmitTestResult'},
@@ -119,7 +123,7 @@ export default {
{
to: {name: 'Statistics'},
icon: 'fas fa-chart-bar',
text: 'Statistics'
text: 'Statistics',
},
],
responsive: false