388 lines
15 KiB
Python
388 lines
15 KiB
Python
# Copyright (c) 2025 Patrick Motsch
|
|
# All rights reserved.
|
|
"""
|
|
Navigation structure data (Layer L1 - datamodels).
|
|
Single source of truth for UI navigation sections used by RBAC and frontend.
|
|
"""
|
|
|
|
from modules.shared.i18nRegistry import t
|
|
|
|
# =============================================================================
|
|
# Navigation Structure (Single Source of Truth)
|
|
# =============================================================================
|
|
#
|
|
# Block Order (gemaess Navigation-API-Konzept):
|
|
# - System: 10
|
|
# - <dynamic/features>: 15 (wird in routeSystem.py eingefuegt)
|
|
# - Basisdaten: 30
|
|
# - Administration: 200
|
|
#
|
|
# NOTE: Workflows and Migrate sections removed - now handled as features
|
|
#
|
|
# Item Order: Default-Abstand 10 pro Item
|
|
# uiComponent: Abgeleitet von objectKey (ui.system.home -> page.system.home)
|
|
# icon: Wird intern gehalten aber NICHT in der API Response zurueckgegeben
|
|
|
|
NAVIGATION_SECTIONS = [
|
|
# --- Meine Sicht (with top-level item + subgroups) ---
|
|
{
|
|
"id": "system",
|
|
"title": t("Meine Sicht"),
|
|
"order": 10,
|
|
"items": [
|
|
{
|
|
"id": "home",
|
|
"objectKey": "ui.system.home",
|
|
"label": t("Start"),
|
|
"icon": "FaHome",
|
|
"path": "/",
|
|
"order": 10,
|
|
"public": True,
|
|
},
|
|
],
|
|
"subgroups": [
|
|
{
|
|
"id": "system-overviews",
|
|
"title": t("Übersichten"),
|
|
"order": 15,
|
|
"items": [
|
|
{
|
|
"id": "integrations",
|
|
"objectKey": "ui.system.integrations",
|
|
"label": t("Integrationen"),
|
|
"icon": "FaProjectDiagram",
|
|
"path": "/integrations",
|
|
"order": 10,
|
|
"public": True,
|
|
},
|
|
{
|
|
"id": "compliance-audit",
|
|
"objectKey": "ui.system.complianceAudit",
|
|
"label": t("Compliance & Audit"),
|
|
"icon": "FaShieldAlt",
|
|
"path": "/compliance-audit",
|
|
"order": 20,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
"id": "system-basedata",
|
|
"title": t("Basisdaten"),
|
|
"order": 20,
|
|
"items": [
|
|
{
|
|
"id": "connections",
|
|
"objectKey": "ui.system.connections",
|
|
"label": t("Verbindungen"),
|
|
"icon": "FaLink",
|
|
"path": "/basedata/connections",
|
|
"order": 10,
|
|
"public": True,
|
|
},
|
|
{
|
|
"id": "files",
|
|
"objectKey": "ui.system.files",
|
|
"label": t("Dateien"),
|
|
"icon": "FaRegFileAlt",
|
|
"path": "/basedata/files",
|
|
"order": 20,
|
|
"public": True,
|
|
},
|
|
{
|
|
"id": "prompts",
|
|
"objectKey": "ui.system.prompts",
|
|
"label": t("Prompts"),
|
|
"icon": "FaLightbulb",
|
|
"path": "/basedata/prompts",
|
|
"order": 30,
|
|
"public": True,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
"id": "system-usage",
|
|
"title": t("Nutzung"),
|
|
"order": 30,
|
|
"items": [
|
|
{
|
|
"id": "billing-admin",
|
|
"objectKey": "ui.system.billingAdmin",
|
|
"label": t("Abrechnung"),
|
|
"icon": "FaMoneyBillAlt",
|
|
"path": "/billing/admin",
|
|
"order": 10,
|
|
},
|
|
{
|
|
"id": "statistics",
|
|
"objectKey": "ui.system.statistics",
|
|
"label": t("Statistiken"),
|
|
"icon": "FaChartBar",
|
|
"path": "/billing/transactions",
|
|
"order": 20,
|
|
},
|
|
{
|
|
"id": "rag-inventory",
|
|
"objectKey": "ui.system.ragInventory",
|
|
"label": t("RAG-Inventar"),
|
|
"icon": "FaDatabase",
|
|
"path": "/rag-inventory",
|
|
"order": 35,
|
|
},
|
|
{
|
|
"id": "store",
|
|
"objectKey": "ui.system.store",
|
|
"label": t("Store"),
|
|
"icon": "FaStore",
|
|
"path": "/store",
|
|
"order": 40,
|
|
"public": True,
|
|
},
|
|
{
|
|
"id": "settings",
|
|
"objectKey": "ui.system.settings",
|
|
"label": t("Einstellungen"),
|
|
"icon": "FaCog",
|
|
"path": "/settings",
|
|
"order": 50,
|
|
"public": True,
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
# --- Workflow-Automation (System-Komponente, cross-mandate) ---
|
|
{
|
|
"id": "workflowAutomation",
|
|
"title": t("Workflow-Automation"),
|
|
"order": 25,
|
|
"items": [
|
|
{
|
|
"id": "wa-workflows",
|
|
"objectKey": "ui.system.workflowAutomation.workflows",
|
|
"label": t("Workflows"),
|
|
"icon": "FaSitemap",
|
|
"path": "/workflow-automation?tab=workflows",
|
|
"order": 10,
|
|
},
|
|
{
|
|
"id": "wa-editor",
|
|
"objectKey": "ui.system.workflowAutomation.editor",
|
|
"label": t("Editor"),
|
|
"icon": "FaProjectDiagram",
|
|
"path": "/workflow-automation?tab=editor",
|
|
"order": 20,
|
|
},
|
|
{
|
|
"id": "wa-templates",
|
|
"objectKey": "ui.system.workflowAutomation.templates",
|
|
"label": t("Vorlagen"),
|
|
"icon": "FaCopy",
|
|
"path": "/workflow-automation?tab=templates",
|
|
"order": 30,
|
|
},
|
|
{
|
|
"id": "wa-runs",
|
|
"objectKey": "ui.system.workflowAutomation.runs",
|
|
"label": t("Läufe"),
|
|
"icon": "FaPlay",
|
|
"path": "/workflow-automation?tab=runs",
|
|
"order": 40,
|
|
},
|
|
{
|
|
"id": "wa-tasks",
|
|
"objectKey": "ui.system.workflowAutomation.tasks",
|
|
"label": t("Tasks"),
|
|
"icon": "FaTasks",
|
|
"path": "/workflow-automation?tab=tasks",
|
|
"order": 50,
|
|
},
|
|
],
|
|
},
|
|
# --- Administration (with subgroups) ---
|
|
{
|
|
"id": "admin",
|
|
"title": t("Administration"),
|
|
"order": 200,
|
|
"subgroups": [
|
|
{
|
|
"id": "admin-wizards",
|
|
"title": t("Wizards"),
|
|
"order": 10,
|
|
"items": [
|
|
{
|
|
"id": "admin-mandate-wizard",
|
|
"objectKey": "ui.admin.mandateWizard",
|
|
"label": t("Mandanten-Wizard"),
|
|
"icon": "FaMagic",
|
|
"path": "/admin/mandate-wizard",
|
|
"order": 10,
|
|
"adminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-invitation-wizard",
|
|
"objectKey": "ui.admin.invitationWizard",
|
|
"label": t("Einladungs-Wizard"),
|
|
"icon": "FaEnvelopeOpenText",
|
|
"path": "/admin/invitation-wizard",
|
|
"order": 20,
|
|
"adminOnly": True,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
"id": "admin-users-group",
|
|
"title": t("Benutzer"),
|
|
"order": 20,
|
|
"items": [
|
|
{
|
|
"id": "admin-users",
|
|
"objectKey": "ui.admin.users",
|
|
"label": t("Benutzer"),
|
|
"icon": "FaUsers",
|
|
"path": "/admin/users",
|
|
"order": 10,
|
|
"adminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-invitations",
|
|
"objectKey": "ui.admin.invitations",
|
|
"label": t("Benutzer-Einladungen"),
|
|
"icon": "FaEnvelopeOpenText",
|
|
"path": "/admin/invitations",
|
|
"order": 20,
|
|
"adminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-user-access-overview",
|
|
"objectKey": "ui.admin.userAccessOverview",
|
|
"label": t("Benutzer-Zugriffsübersicht"),
|
|
"icon": "FaClipboardList",
|
|
"path": "/admin/user-access-overview",
|
|
"order": 30,
|
|
"adminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-subscriptions",
|
|
"objectKey": "ui.admin.subscriptions",
|
|
"label": t("Abonnements"),
|
|
"icon": "FaFileContract",
|
|
"path": "/admin/subscriptions",
|
|
"order": 40,
|
|
"adminOnly": True,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
"id": "admin-system-group",
|
|
"title": t("System"),
|
|
"order": 30,
|
|
"items": [
|
|
{
|
|
"id": "admin-roles",
|
|
"objectKey": "ui.admin.roles",
|
|
"label": t("Rollen"),
|
|
"icon": "FaUserTag",
|
|
"path": "/admin/mandate-roles",
|
|
"order": 10,
|
|
"adminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-mandate-role-permissions",
|
|
"objectKey": "ui.admin.mandateRolePermissions",
|
|
"label": t("Rollen-Berechtigungen"),
|
|
"icon": "FaKey",
|
|
"path": "/admin/mandate-role-permissions",
|
|
"order": 20,
|
|
"adminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-mandates",
|
|
"objectKey": "ui.admin.mandates",
|
|
"label": t("Mandanten"),
|
|
"icon": "FaBuilding",
|
|
"path": "/admin/mandates",
|
|
"order": 30,
|
|
"adminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-user-mandates",
|
|
"objectKey": "ui.admin.userMandates",
|
|
"label": t("Mandanten-Mitglieder"),
|
|
"icon": "FaUserFriends",
|
|
"path": "/admin/user-mandates",
|
|
"order": 40,
|
|
"adminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-access",
|
|
"objectKey": "ui.admin.access",
|
|
"label": t("Zugriffsverwaltung"),
|
|
"icon": "FaBuilding",
|
|
"path": "/admin/access",
|
|
"order": 50,
|
|
"adminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-feature-instances",
|
|
"objectKey": "ui.admin.featureInstances",
|
|
"label": t("Feature-Instanzen"),
|
|
"icon": "FaCubes",
|
|
"path": "/admin/feature-instances",
|
|
"order": 60,
|
|
"adminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-feature-roles",
|
|
"objectKey": "ui.admin.featureRoles",
|
|
"label": t("Features Rollen-Vorlagen"),
|
|
"icon": "FaShieldAlt",
|
|
"path": "/admin/feature-roles",
|
|
"order": 70,
|
|
"adminOnly": True,
|
|
"sysAdminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-logs",
|
|
"objectKey": "ui.admin.logs",
|
|
"label": t("Logs"),
|
|
"icon": "FaFileAlt",
|
|
"path": "/admin/logs",
|
|
"order": 90,
|
|
"adminOnly": True,
|
|
"sysAdminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-languages",
|
|
"objectKey": "ui.admin.languages",
|
|
"label": t("UI-Sprachen"),
|
|
"icon": "FaGlobe",
|
|
"path": "/admin/languages",
|
|
"order": 95,
|
|
"adminOnly": True,
|
|
"sysAdminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-database-health",
|
|
"objectKey": "ui.admin.databaseHealth",
|
|
"label": t("Datenbank-Gesundheit"),
|
|
"icon": "FaDatabase",
|
|
"path": "/admin/database-health",
|
|
"order": 98,
|
|
"adminOnly": True,
|
|
"sysAdminOnly": True,
|
|
},
|
|
{
|
|
"id": "admin-demo-config",
|
|
"objectKey": "ui.admin.demoConfig",
|
|
"label": t("Demo Config"),
|
|
"icon": "FaCubes",
|
|
"path": "/admin/demo-config",
|
|
"order": 100,
|
|
"adminOnly": True,
|
|
"sysAdminOnly": True,
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
]
|