This commit is contained in:
@@ -41,11 +41,13 @@ export default {
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<v-row>
|
||||
<v-col
|
||||
v-for="(item, i) in dashItems()"
|
||||
v-for="(item, i) in availableItems"
|
||||
:key="i"
|
||||
class="d-flex child-flex"
|
||||
cols="12"
|
||||
@@ -48,7 +48,9 @@ export default {
|
||||
title: "Dashboard",
|
||||
helpUrl: "form-home-dashboard"
|
||||
});
|
||||
DashRegistry.availableItems();
|
||||
},
|
||||
created() {
|
||||
this.availableItems = DashRegistry.availableItems();
|
||||
},
|
||||
methods: {
|
||||
dashItems: function() {
|
||||
@@ -81,17 +83,9 @@ export default {
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
// items: [
|
||||
// {
|
||||
// color: "#1F7087",
|
||||
// title: "Supermodel"
|
||||
// },
|
||||
// {
|
||||
// color: "#952175",
|
||||
// title: "Halcyon Days"
|
||||
// }
|
||||
// ];
|
||||
return {
|
||||
availableItems: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user