'use client' import { Menu, Search, Bell, ChevronRight } from 'lucide-react' import { useAos, type ViewId } from '@/store/aos' import { ThemeToggle } from '@/components/theme-toggle' import { LocaleSwitcher } from './locale-switcher' import { NotificationsBell } from './notifications-bell' import { Button } from '@/components/ui/button' import { Badge } from '@/components/ui/badge' import { Avatar, AvatarFallback } from '@/components/ui/avatar' import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu' const TITLES: Record = { dashboard: { title: 'Dashboard', crumb: 'Übersicht' }, calendar: { title: 'Fristen', crumb: 'Übersicht / Fristen' }, reporting: { title: 'Reporting', crumb: 'Übersicht / Reporting' }, crm: { title: 'CRM', crumb: 'Vertrieb / CRM' }, leads: { title: 'Leads Finder', crumb: 'Vertrieb / Leads' }, estimates: { title: 'Angebote', crumb: 'Vertrieb / Angebote' }, projects: { title: 'Projekte', crumb: 'Lieferung / Projekte' }, timesheet: { title: 'Zeiterfassung', crumb: 'Lieferung / Zeiterfassung' }, support: { title: 'Support', crumb: 'Lieferung / Tickets' }, licenses: { title: 'Lizenzen', crumb: 'Betrieb / Lizenzen' }, agency: { title: 'Reseller', crumb: 'Betrieb / Reseller' }, reseller_portal: { title: 'Reseller-Portal', crumb: 'Betrieb / Reseller-Portal' }, instances: { title: 'Instanzen', crumb: 'Betrieb / Instanzen' }, contracts: { title: 'Verträge', crumb: 'Betrieb / Verträge' }, expenses: { title: 'Ausgaben', crumb: 'Betrieb / Ausgaben' }, finance: { title: 'Finanzen', crumb: 'Betrieb / Finanzen' }, recurring: { title: 'Wiederkehrende Rechnungen', crumb: 'Betrieb / Wiederkehrend' }, accounting: { title: 'Buchhaltung', crumb: 'Betrieb / Buchhaltung' }, finanzamt: { title: 'Finanzamt', crumb: 'Betrieb / Finanzamt' }, audit: { title: 'Audit-Protokoll', crumb: 'Betrieb / Audit' }, data: { title: 'Datenverwaltung', crumb: 'Betrieb / Daten' }, kb: { title: 'Wissensdatenbank', crumb: 'Wissen / KB' }, api: { title: 'API & Webhooks', crumb: 'System / API' }, settings: { title: 'Erweiterungen', crumb: 'System / Module' }, settings_global: { title: 'Einstellungen', crumb: 'System / Einstellungen' }, setup: { title: 'Setup-Wizard', crumb: 'System / Setup' }, } export function TopBar() { const { view, setSidebarOpen, setCommandOpen } = useAos() const meta = TITLES[view] const crumbParts = meta.crumb.split(' / ') return (
{/* Breadcrumb */}
{crumbParts[0]} {crumbParts.length > 1 && ( <> {crumbParts[1]} )}
Max Brandt max@nordlicht.digital Rolle Owner Profil Sitzungen { e.preventDefault() await fetch('/api/auth/logout', { method: 'POST' }) window.location.href = '/login' }} > Abmelden
) }