2025-10-20 08:57:51 +02:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import NavFooter from '@/components/NavFooter.vue';
|
|
|
|
|
import NavMain from '@/components/NavMain.vue';
|
2025-10-22 11:58:58 +02:00
|
|
|
import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarTrigger } from '@/components/ui/sidebar';
|
2025-10-22 16:52:16 +02:00
|
|
|
import { dashboard, crm, offers, invoices, newInvoice, timesheets, customers, leads, achievements } from '@/routes';
|
2025-10-22 11:58:58 +02:00
|
|
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
|
2025-10-23 08:26:38 +02:00
|
|
|
import { Kbd, KbdGroup } from '@/components/ui/kbd'
|
2025-10-20 08:57:51 +02:00
|
|
|
import { edit } from '@/routes/profile';
|
|
|
|
|
import { type NavItem, type NavGroup } from '@/types';
|
|
|
|
|
import { Link } from '@inertiajs/vue3';
|
2025-10-22 12:35:40 +02:00
|
|
|
import { Kanban, Euro, Contact, Trophy, Calculator, Settings, Target, BookUser, Timer, Headset, IdCard, Plus } from 'lucide-vue-next';
|
2025-10-20 08:57:51 +02:00
|
|
|
import AppLogo from './AppLogo.vue';
|
|
|
|
|
|
|
|
|
|
const mainNavGroups: NavGroup[] = [
|
|
|
|
|
{
|
|
|
|
|
title: 'CRM',
|
|
|
|
|
items: [
|
|
|
|
|
{
|
|
|
|
|
title: 'Pipeline',
|
|
|
|
|
href: crm(),
|
|
|
|
|
icon: Kanban,
|
|
|
|
|
color: 'text-pink-500',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'Akquise',
|
|
|
|
|
href: leads(),
|
|
|
|
|
icon: Headset,
|
|
|
|
|
color: 'text-blue-500',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'Kunden',
|
|
|
|
|
href: customers(),
|
|
|
|
|
icon: BookUser,
|
|
|
|
|
color: 'text-lime-500',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'Erfolge',
|
|
|
|
|
href: achievements(),
|
|
|
|
|
icon: Trophy,
|
2025-10-22 11:58:58 +02:00
|
|
|
color: 'text-amber-500',
|
2025-10-20 08:57:51 +02:00
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'Finanzvorgänge',
|
|
|
|
|
items: [
|
|
|
|
|
{
|
|
|
|
|
title: 'Angebote',
|
|
|
|
|
href: offers(),
|
|
|
|
|
icon: Calculator,
|
2025-10-22 11:58:58 +02:00
|
|
|
color: 'text-cyan-600',
|
2025-10-20 08:57:51 +02:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'Rechnungen',
|
|
|
|
|
href: invoices(),
|
|
|
|
|
icon: Euro,
|
|
|
|
|
color: 'text-pink-700',
|
2025-10-22 12:35:40 +02:00
|
|
|
action: {
|
|
|
|
|
title: "Neue Rechnung",
|
|
|
|
|
icon: Plus,
|
|
|
|
|
color: 'text-foreground',
|
2025-10-22 16:52:16 +02:00
|
|
|
href: newInvoice()
|
2025-10-22 12:35:40 +02:00
|
|
|
}
|
2025-10-20 08:57:51 +02:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'Zeiterfassung',
|
|
|
|
|
href: timesheets(),
|
|
|
|
|
icon: Timer,
|
2025-10-22 11:58:58 +02:00
|
|
|
color: 'text-lime-600',
|
2025-10-20 08:57:51 +02:00
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const footerNavItems: NavItem[] = [
|
|
|
|
|
{
|
|
|
|
|
title: 'Einstellungen',
|
|
|
|
|
href: edit(),
|
|
|
|
|
icon: Settings,
|
2025-10-22 11:58:58 +02:00
|
|
|
color: 'text-gray-500',
|
2025-10-20 08:57:51 +02:00
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-11-11 11:49:38 +01:00
|
|
|
<Sidebar collapsible="icon" variant="sidebar">
|
2025-10-20 08:57:51 +02:00
|
|
|
|
|
|
|
|
<SidebarHeader>
|
2025-11-14 11:56:19 +01:00
|
|
|
<Link :href="dashboard()" class="flex row items-center mt-3">
|
2025-10-29 14:20:03 +01:00
|
|
|
<AppLogo />
|
2025-10-20 08:57:51 +02:00
|
|
|
</Link>
|
2025-10-22 11:58:58 +02:00
|
|
|
|
|
|
|
|
<TooltipProvider>
|
2025-10-29 14:20:03 +01:00
|
|
|
<Tooltip>
|
2025-11-14 11:56:19 +01:00
|
|
|
<TooltipTrigger class="w-fit absolute top-9 right-[.666rem]">
|
2025-10-22 11:58:58 +02:00
|
|
|
<SidebarTrigger class="hidden md:flex text-primary-foreground" />
|
|
|
|
|
</TooltipTrigger>
|
|
|
|
|
<TooltipContent>
|
2025-10-29 14:20:03 +01:00
|
|
|
<span>Seitenleiste schließen</span>
|
|
|
|
|
<KbdGroup class="ml-2">
|
|
|
|
|
<Kbd class="visible-mac">⌘</Kbd>
|
|
|
|
|
<Kbd class="visible-pc">Ctrl</Kbd>
|
|
|
|
|
<Kbd>B</Kbd>
|
|
|
|
|
</KbdGroup>
|
2025-10-22 11:58:58 +02:00
|
|
|
</TooltipContent>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</TooltipProvider>
|
2025-10-20 08:57:51 +02:00
|
|
|
</SidebarHeader>
|
|
|
|
|
|
|
|
|
|
<SidebarContent>
|
|
|
|
|
<NavMain :groups="mainNavGroups" />
|
|
|
|
|
</SidebarContent>
|
|
|
|
|
|
|
|
|
|
<SidebarFooter>
|
|
|
|
|
<NavFooter :items="footerNavItems" />
|
|
|
|
|
</SidebarFooter>
|
|
|
|
|
</Sidebar>
|
|
|
|
|
<slot />
|
|
|
|
|
</template>
|