This commit is contained in:
2020-10-29 21:45:46 +00:00
parent e2427dea3f
commit b9f2f95440
2 changed files with 9 additions and 13 deletions

View File

@@ -41,11 +41,13 @@ export default {
}, },
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)}`); // console.log(`key: ${key}, value: ${JSON.stringify(value)}`);
if (authorizationroles.hasRole(value.roles)) { if (authorizationroles.hasRole(value.roles)) {
ret.push(); ret.push();
} }
} }
return ret;
} }
}; };

View File

@@ -1,7 +1,7 @@
<template> <template>
<v-row> <v-row>
<v-col <v-col
v-for="(item, i) in dashItems()" v-for="(item, i) in availableItems"
:key="i" :key="i"
class="d-flex child-flex" class="d-flex child-flex"
cols="12" cols="12"
@@ -48,7 +48,9 @@ export default {
title: "Dashboard", title: "Dashboard",
helpUrl: "form-home-dashboard" helpUrl: "form-home-dashboard"
}); });
DashRegistry.availableItems(); },
created() {
this.availableItems = DashRegistry.availableItems();
}, },
methods: { methods: {
dashItems: function() { dashItems: function() {
@@ -81,17 +83,9 @@ export default {
} }
}, },
data() { data() {
return {}; return {
// items: [ availableItems: []
// { };
// color: "#1F7087",
// title: "Supermodel"
// },
// {
// color: "#952175",
// title: "Halcyon Days"
// }
// ];
} }
}; };
</script> </script>