diff --git a/spaces/layouts/default.vue b/spaces/layouts/default.vue index 03cb04c..050239b 100644 --- a/spaces/layouts/default.vue +++ b/spaces/layouts/default.vue @@ -176,7 +176,8 @@ const navLinks = [ //const activeFeatures = dataStore.tenants.find(dataStore.currentTenant).features -let links = [ +let links = computed(() => { + return [ { id: 'dashboard', label: "Dashboard", @@ -193,16 +194,16 @@ let links = [ to: "/tasks", icon: "i-heroicons-rectangle-stack" }, - { + ... dataStore.ownTenant.features.planningBoard ? [{ label: "Plantafel", to: "/calendar/timeline", icon: "i-heroicons-calendar-days" - }, - { + }] : [], + ... dataStore.ownTenant.features.calendar ? [{ label: "Kalender", to: "/calendar/grid", icon: "i-heroicons-calendar-days" - }, + }] : [], { label: "Dokumente", to: "/documents", @@ -242,16 +243,16 @@ let links = [ defaultOpen:false, icon: "i-heroicons-user-group", children: [ - { + ... dataStore.ownTenant.features.timeTracking ? [{ label: "Zeiterfassung", to: "/employees/timetracking", icon: "i-heroicons-clock" - }, - { + }] : [], + ... dataStore.ownTenant.features.workingTimeTracking ? [{ label: "Anwesenheiten", to: "/workingtimes", icon: "i-heroicons-clock" - }, + }] : [], { label: "Abwesenheiten", to: "/absenceRequests", @@ -294,11 +295,12 @@ let links = [ label: "Leistungsstamm", to: "/services", icon: "i-heroicons-puzzle-piece" - },{ + }, + ... dataStore.ownTenant.features.vehicles ? [{ label: "Fahrzeuge", to: "/vehicles", icon: "i-heroicons-truck" - }, + }] : [], ] }, { @@ -315,41 +317,42 @@ let links = [ to: "/projects", icon: "i-heroicons-clipboard-document-check" }, - { + ... dataStore.ownTenant.features.contracts ? [{ label: "Verträge", to: "/contracts", icon: "i-heroicons-clipboard-document" - }, + }] : [], { label: "Objekte", to: "/plants", icon: "i-heroicons-clipboard-document" }, - { - label: "Einstellungen", - defaultOpen: false, - icon: "i-heroicons-cog-8-tooth", - children: [ - { - label: "Nummernkreise", - to: "/settings/numberRanges", - icon: "i-heroicons-clipboard-document-list" - },{ - label: "Mitarbeiter", - to: "/profiles", - icon: "i-heroicons-clipboard-document-list" - },{ - label: "Bankkonten", - to: "/settings/banking", - icon: "i-heroicons-clipboard-document-list" - },{ - label: "Firmeneinstellungen", - to: "/settings/tenant", - icon: "i-heroicons-clipboard-document-list" - } - ] - }, + { + label: "Einstellungen", + defaultOpen: false, + icon: "i-heroicons-cog-8-tooth", + children: [ + { + label: "Nummernkreise", + to: "/settings/numberRanges", + icon: "i-heroicons-clipboard-document-list" + },{ + label: "Mitarbeiter", + to: "/profiles", + icon: "i-heroicons-clipboard-document-list" + },{ + label: "Bankkonten", + to: "/settings/banking", + icon: "i-heroicons-clipboard-document-list" + },{ + label: "Firmeneinstellungen", + to: "/settings/tenant", + icon: "i-heroicons-clipboard-document-list" + } + ] + }, ] +}) const actions = [ {