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() {
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;
}
};

View File

@@ -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>