Removed non available Entries
This commit is contained in:
@@ -18,6 +18,7 @@ const showMemberRelationsNav = computed(() => {
|
|||||||
const isAdmin = computed(() => Boolean(auth.user?.is_admin))
|
const isAdmin = computed(() => Boolean(auth.user?.is_admin))
|
||||||
const tenantFeatures = computed(() => auth.activeTenantData?.features || {})
|
const tenantFeatures = computed(() => auth.activeTenantData?.features || {})
|
||||||
const featureEnabled = (key) => tenantFeatures.value?.[key] !== false
|
const featureEnabled = (key) => tenantFeatures.value?.[key] !== false
|
||||||
|
const visibleItems = (items) => items.filter(item => item && !item.disabled)
|
||||||
|
|
||||||
const links = computed(() => {
|
const links = computed(() => {
|
||||||
const organisationChildren = [
|
const organisationChildren = [
|
||||||
@@ -36,7 +37,7 @@ const links = computed(() => {
|
|||||||
to: "/wiki",
|
to: "/wiki",
|
||||||
icon: "i-heroicons-book-open"
|
icon: "i-heroicons-book-open"
|
||||||
} : null,
|
} : null,
|
||||||
].filter(Boolean)
|
]
|
||||||
|
|
||||||
const documentChildren = [
|
const documentChildren = [
|
||||||
featureEnabled("files") ? {
|
featureEnabled("files") ? {
|
||||||
@@ -56,7 +57,7 @@ const links = computed(() => {
|
|||||||
icon: "i-heroicons-archive-box",
|
icon: "i-heroicons-archive-box",
|
||||||
disabled: true
|
disabled: true
|
||||||
} : null,
|
} : null,
|
||||||
].filter(Boolean)
|
]
|
||||||
|
|
||||||
const communicationChildren = [
|
const communicationChildren = [
|
||||||
featureEnabled("helpdesk") ? {
|
featureEnabled("helpdesk") ? {
|
||||||
@@ -71,7 +72,7 @@ const links = computed(() => {
|
|||||||
icon: "i-heroicons-envelope",
|
icon: "i-heroicons-envelope",
|
||||||
disabled: true
|
disabled: true
|
||||||
} : null,
|
} : null,
|
||||||
].filter(Boolean)
|
]
|
||||||
|
|
||||||
const contactsChildren = [
|
const contactsChildren = [
|
||||||
showMembersNav.value && featureEnabled("members") ? {
|
showMembersNav.value && featureEnabled("members") ? {
|
||||||
@@ -94,7 +95,7 @@ const links = computed(() => {
|
|||||||
to: "/standardEntity/contacts",
|
to: "/standardEntity/contacts",
|
||||||
icon: "i-heroicons-user-group"
|
icon: "i-heroicons-user-group"
|
||||||
} : null,
|
} : null,
|
||||||
].filter(Boolean)
|
]
|
||||||
|
|
||||||
const staffChildren = [
|
const staffChildren = [
|
||||||
featureEnabled("staffTime") ? {
|
featureEnabled("staffTime") ? {
|
||||||
@@ -102,7 +103,7 @@ const links = computed(() => {
|
|||||||
to: "/staff/time",
|
to: "/staff/time",
|
||||||
icon: "i-heroicons-clock",
|
icon: "i-heroicons-clock",
|
||||||
} : null,
|
} : null,
|
||||||
].filter(Boolean)
|
]
|
||||||
|
|
||||||
const accountingChildren = [
|
const accountingChildren = [
|
||||||
featureEnabled("createDocument") ? {
|
featureEnabled("createDocument") ? {
|
||||||
@@ -120,6 +121,11 @@ const links = computed(() => {
|
|||||||
to: "/incomingInvoices",
|
to: "/incomingInvoices",
|
||||||
icon: "i-heroicons-document-text",
|
icon: "i-heroicons-document-text",
|
||||||
} : null,
|
} : null,
|
||||||
|
(featureEnabled("createDocument") || featureEnabled("incomingInvoices")) ? {
|
||||||
|
label: "USt-Auswertung",
|
||||||
|
to: "/accounting/tax",
|
||||||
|
icon: "i-heroicons-calculator",
|
||||||
|
} : null,
|
||||||
featureEnabled("costcentres") ? {
|
featureEnabled("costcentres") ? {
|
||||||
label: "Kostenstellen",
|
label: "Kostenstellen",
|
||||||
to: "/standardEntity/costcentres",
|
to: "/standardEntity/costcentres",
|
||||||
@@ -140,7 +146,7 @@ const links = computed(() => {
|
|||||||
to: "/banking",
|
to: "/banking",
|
||||||
icon: "i-heroicons-document-text",
|
icon: "i-heroicons-document-text",
|
||||||
} : null,
|
} : null,
|
||||||
].filter(Boolean)
|
]
|
||||||
|
|
||||||
const inventoryChildren = [
|
const inventoryChildren = [
|
||||||
has("spaces") && featureEnabled("spaces") ? {
|
has("spaces") && featureEnabled("spaces") ? {
|
||||||
@@ -168,7 +174,7 @@ const links = computed(() => {
|
|||||||
to: "/standardEntity/inventoryitemgroups",
|
to: "/standardEntity/inventoryitemgroups",
|
||||||
icon: "i-heroicons-puzzle-piece"
|
icon: "i-heroicons-puzzle-piece"
|
||||||
} : null,
|
} : null,
|
||||||
].filter(Boolean)
|
]
|
||||||
|
|
||||||
const masterDataChildren = [
|
const masterDataChildren = [
|
||||||
has("products") && featureEnabled("products") ? {
|
has("products") && featureEnabled("products") ? {
|
||||||
@@ -221,7 +227,7 @@ const links = computed(() => {
|
|||||||
to: "/standardEntity/vehicles",
|
to: "/standardEntity/vehicles",
|
||||||
icon: "i-heroicons-truck"
|
icon: "i-heroicons-truck"
|
||||||
} : null,
|
} : null,
|
||||||
].filter(Boolean)
|
]
|
||||||
|
|
||||||
const settingsChildren = [
|
const settingsChildren = [
|
||||||
featureEnabled("settingsNumberRanges") ? {
|
featureEnabled("settingsNumberRanges") ? {
|
||||||
@@ -259,9 +265,19 @@ const links = computed(() => {
|
|||||||
to: "/export",
|
to: "/export",
|
||||||
icon: "i-heroicons-clipboard-document-list"
|
icon: "i-heroicons-clipboard-document-list"
|
||||||
} : null,
|
} : null,
|
||||||
].filter(Boolean)
|
]
|
||||||
|
|
||||||
return [
|
const visibleOrganisationChildren = visibleItems(organisationChildren)
|
||||||
|
const visibleDocumentChildren = visibleItems(documentChildren)
|
||||||
|
const visibleCommunicationChildren = visibleItems(communicationChildren)
|
||||||
|
const visibleContactsChildren = visibleItems(contactsChildren)
|
||||||
|
const visibleStaffChildren = visibleItems(staffChildren)
|
||||||
|
const visibleAccountingChildren = visibleItems(accountingChildren)
|
||||||
|
const visibleInventoryChildren = visibleItems(inventoryChildren)
|
||||||
|
const visibleMasterDataChildren = visibleItems(masterDataChildren)
|
||||||
|
const visibleSettingsChildren = visibleItems(settingsChildren)
|
||||||
|
|
||||||
|
return visibleItems([
|
||||||
...(auth.profile?.pinned_on_navigation || []).map(pin => {
|
...(auth.profile?.pinned_on_navigation || []).map(pin => {
|
||||||
if (pin.type === "external") {
|
if (pin.type === "external") {
|
||||||
return {
|
return {
|
||||||
@@ -293,53 +309,53 @@ const links = computed(() => {
|
|||||||
to: "/historyitems",
|
to: "/historyitems",
|
||||||
icon: "i-heroicons-book-open"
|
icon: "i-heroicons-book-open"
|
||||||
} : null,
|
} : null,
|
||||||
...(organisationChildren.length > 0 ? [{
|
...(visibleOrganisationChildren.length > 0 ? [{
|
||||||
label: "Organisation",
|
label: "Organisation",
|
||||||
icon: "i-heroicons-rectangle-stack",
|
icon: "i-heroicons-rectangle-stack",
|
||||||
defaultOpen: false,
|
defaultOpen: false,
|
||||||
children: organisationChildren
|
children: visibleOrganisationChildren
|
||||||
}] : []),
|
}] : []),
|
||||||
...(documentChildren.length > 0 ? [{
|
...(visibleDocumentChildren.length > 0 ? [{
|
||||||
label: "Dokumente",
|
label: "Dokumente",
|
||||||
icon: "i-heroicons-rectangle-stack",
|
icon: "i-heroicons-rectangle-stack",
|
||||||
defaultOpen: false,
|
defaultOpen: false,
|
||||||
children: documentChildren
|
children: visibleDocumentChildren
|
||||||
}] : []),
|
}] : []),
|
||||||
...(communicationChildren.length > 0 ? [{
|
...(visibleCommunicationChildren.length > 0 ? [{
|
||||||
label: "Kommunikation",
|
label: "Kommunikation",
|
||||||
icon: "i-heroicons-megaphone",
|
icon: "i-heroicons-megaphone",
|
||||||
defaultOpen: false,
|
defaultOpen: false,
|
||||||
children: communicationChildren
|
children: visibleCommunicationChildren
|
||||||
}] : []),
|
}] : []),
|
||||||
...(contactsChildren.length > 0 ? [{
|
...(visibleContactsChildren.length > 0 ? [{
|
||||||
label: "Kontakte",
|
label: "Kontakte",
|
||||||
defaultOpen: false,
|
defaultOpen: false,
|
||||||
icon: "i-heroicons-user-group",
|
icon: "i-heroicons-user-group",
|
||||||
children: contactsChildren
|
children: visibleContactsChildren
|
||||||
}] : []),
|
}] : []),
|
||||||
...(staffChildren.length > 0 ? [{
|
...(visibleStaffChildren.length > 0 ? [{
|
||||||
label: "Mitarbeiter",
|
label: "Mitarbeiter",
|
||||||
defaultOpen: false,
|
defaultOpen: false,
|
||||||
icon: "i-heroicons-user-group",
|
icon: "i-heroicons-user-group",
|
||||||
children: staffChildren
|
children: visibleStaffChildren
|
||||||
}] : []),
|
}] : []),
|
||||||
...(accountingChildren.length > 0 ? [{
|
...(visibleAccountingChildren.length > 0 ? [{
|
||||||
label: "Buchhaltung",
|
label: "Buchhaltung",
|
||||||
defaultOpen: false,
|
defaultOpen: false,
|
||||||
icon: "i-heroicons-chart-bar-square",
|
icon: "i-heroicons-chart-bar-square",
|
||||||
children: accountingChildren
|
children: visibleAccountingChildren
|
||||||
}] : []),
|
}] : []),
|
||||||
...(inventoryChildren.length > 0 ? [{
|
...(visibleInventoryChildren.length > 0 ? [{
|
||||||
label: "Lager",
|
label: "Lager",
|
||||||
icon: "i-heroicons-puzzle-piece",
|
icon: "i-heroicons-puzzle-piece",
|
||||||
defaultOpen: false,
|
defaultOpen: false,
|
||||||
children: inventoryChildren
|
children: visibleInventoryChildren
|
||||||
}] : []),
|
}] : []),
|
||||||
...(masterDataChildren.length > 0 ? [{
|
...(visibleMasterDataChildren.length > 0 ? [{
|
||||||
label: "Stammdaten",
|
label: "Stammdaten",
|
||||||
defaultOpen: false,
|
defaultOpen: false,
|
||||||
icon: "i-heroicons-clipboard-document",
|
icon: "i-heroicons-clipboard-document",
|
||||||
children: masterDataChildren
|
children: visibleMasterDataChildren
|
||||||
}] : []),
|
}] : []),
|
||||||
|
|
||||||
...(has("projects") && featureEnabled("projects")) ? [{
|
...(has("projects") && featureEnabled("projects")) ? [{
|
||||||
@@ -357,13 +373,13 @@ const links = computed(() => {
|
|||||||
to: "/standardEntity/plants",
|
to: "/standardEntity/plants",
|
||||||
icon: "i-heroicons-clipboard-document"
|
icon: "i-heroicons-clipboard-document"
|
||||||
}] : [],
|
}] : [],
|
||||||
...(settingsChildren.length > 0 ? [{
|
...(visibleSettingsChildren.length > 0 ? [{
|
||||||
label: "Einstellungen",
|
label: "Einstellungen",
|
||||||
defaultOpen: false,
|
defaultOpen: false,
|
||||||
icon: "i-heroicons-cog-8-tooth",
|
icon: "i-heroicons-cog-8-tooth",
|
||||||
children: settingsChildren
|
children: visibleSettingsChildren
|
||||||
}] : []),
|
}] : []),
|
||||||
].filter(Boolean)
|
])
|
||||||
})
|
})
|
||||||
|
|
||||||
const accordionItems = computed(() =>
|
const accordionItems = computed(() =>
|
||||||
|
|||||||
Reference in New Issue
Block a user