Start for Dev Branch
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
<script setup>
|
||||
import {useRole} from "~/composables/useRole.js";
|
||||
|
||||
const dataStore = useDataStore()
|
||||
const route = useRoute()
|
||||
|
||||
const role = useRole()
|
||||
console.log(role)
|
||||
console.log(role.checkRight("projects"))
|
||||
|
||||
const links = computed(() => {
|
||||
return [
|
||||
{
|
||||
@@ -36,7 +42,7 @@ const links = computed(() => {
|
||||
icon: "i-heroicons-calendar-days"
|
||||
}] : [],
|
||||
{
|
||||
label: "Dokumente",
|
||||
label: "Dateien",
|
||||
to: "/documents",
|
||||
icon: "i-heroicons-document"
|
||||
},
|
||||
@@ -202,37 +208,22 @@ const links = computed(() => {
|
||||
},
|
||||
]
|
||||
},
|
||||
/*... dataStore.ownTenant.features.projects ? [{
|
||||
label: "Projekte",
|
||||
defaultOpen: false,
|
||||
icon: "i-heroicons-clipboard-document-check",
|
||||
children: [
|
||||
...dataStore.ownTenant.projecttypes.map(i => {
|
||||
return {
|
||||
label: i.label,
|
||||
to: `/projects?type=${i.label}`,
|
||||
icon: i.icon
|
||||
}
|
||||
})
|
||||
|
||||
]
|
||||
},] : [],*/
|
||||
{
|
||||
... role.checkRight("checks") ? [{
|
||||
label: "Überprüfungen",
|
||||
to: "/checks",
|
||||
icon: "i-heroicons-magnifying-glass"
|
||||
},
|
||||
... dataStore.ownTenant.features.projects ? [{
|
||||
},] : [],
|
||||
... (role.checkRight("projects") && dataStore.ownTenant.features.projects) ? [{
|
||||
label: "Projekte",
|
||||
to: "/projects",
|
||||
icon: "i-heroicons-clipboard-document-check"
|
||||
},] : [],
|
||||
... dataStore.ownTenant.features.contracts ? [{
|
||||
... (role.checkRight("contracts") && dataStore.ownTenant.features.contracts) ? [{
|
||||
label: "Verträge",
|
||||
to: "/contracts",
|
||||
icon: "i-heroicons-clipboard-document"
|
||||
}] : [],
|
||||
... dataStore.ownTenant.features.objects ? [{
|
||||
... (role.checkRight("objects") && dataStore.ownTenant.features.objects) ? [{
|
||||
label: "Objekte",
|
||||
to: "/plants",
|
||||
icon: "i-heroicons-clipboard-document"
|
||||
|
||||
Reference in New Issue
Block a user