Added Feature disabling for some Features

This commit is contained in:
2024-04-07 12:21:06 +02:00
parent e4b02af524
commit 7c162f157a

View File

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