Introduced ProfileStore

Corrected All Links to DataStore
This commit is contained in:
2024-12-21 22:33:42 +01:00
parent 813944fc23
commit b465f4a75a
64 changed files with 508 additions and 959 deletions

View File

@@ -1,13 +1,10 @@
<script setup>
import {useRole} from "~/composables/useRole.js";
const dataStore = useDataStore()
const profileStore = useProfileStore()
const route = useRoute()
const role = useRole()
console.log(role)
console.log(role.checkRight("projects"))
const links = computed(() => {
return [
{
@@ -26,17 +23,17 @@ const links = computed(() => {
to: "/tasks",
icon: "i-heroicons-rectangle-stack"
},
... dataStore.ownTenant.features.planningBoard ? [{
... profileStore.ownTenant.features.planningBoard ? [{
label: "Plantafel",
to: "/calendar/timeline",
icon: "i-heroicons-calendar-days"
}] : [],
... dataStore.ownTenant.features.calendar ? [{
... profileStore.ownTenant.features.calendar ? [{
label: "Kalender",
to: "/calendar/grid",
icon: "i-heroicons-calendar-days"
}] : [],
... dataStore.ownTenant.features.calendar ? [{
... profileStore.ownTenant.features.calendar ? [{
label: "Termine",
to: "/events",
icon: "i-heroicons-calendar-days"
@@ -68,7 +65,7 @@ const links = computed(() => {
}
]
},
... dataStore.ownTenant.features.contacts ? [{
... profileStore.ownTenant.features.contacts ? [{
label: "Kontakte",
defaultOpen: false,
icon: "i-heroicons-user-group",
@@ -95,12 +92,12 @@ const links = computed(() => {
defaultOpen:false,
icon: "i-heroicons-user-group",
children: [
... dataStore.ownTenant.features.timeTracking ? [{
... profileStore.ownTenant.features.timeTracking ? [{
label: "Zeiterfassung",
to: "/employees/timetracking",
icon: "i-heroicons-clock"
}] : [],
... dataStore.ownTenant.features.workingTimeTracking ? [{
... profileStore.ownTenant.features.workingTimeTracking ? [{
label: "Anwesenheiten",
to: "/workingtimes",
icon: "i-heroicons-clock"
@@ -112,7 +109,7 @@ const links = computed(() => {
},
]
},
... dataStore.ownTenant.features.accounting ? [{
... profileStore.ownTenant.features.accounting ? [{
label: "Buchhaltung",
defaultOpen: false,
icon: "i-heroicons-chart-bar-square",