diff --git a/ApiCore-Frontend/src/app/(app)/bottom-nav.tsx b/ApiCore-Frontend/src/app/(app)/bottom-nav.tsx new file mode 100644 index 0000000..56483ce --- /dev/null +++ b/ApiCore-Frontend/src/app/(app)/bottom-nav.tsx @@ -0,0 +1,39 @@ +"use client"; + +import Link from "next/link"; +import { usePathname } from "next/navigation"; +import { LayoutDashboard, Layers, ListTodo, Search } from "lucide-react"; +import { cn } from "@/lib/utils"; + +const ITEMS = [ + { label: "Start", href: "/dashboard", icon: LayoutDashboard }, + { label: "Völker", href: "/colonies", icon: Layers }, + { label: "Aufgaben", href: "/tasks", icon: ListTodo }, + { label: "Suche", href: "/search", icon: Search }, +]; + +export function BottomNav() { + const pathname = usePathname(); + + return ( + + ); +} diff --git a/ApiCore-Frontend/src/app/(app)/layout.tsx b/ApiCore-Frontend/src/app/(app)/layout.tsx index 1afd84c..f96422a 100644 --- a/ApiCore-Frontend/src/app/(app)/layout.tsx +++ b/ApiCore-Frontend/src/app/(app)/layout.tsx @@ -5,6 +5,8 @@ import Link from "next/link"; import { useRouter } from "next/navigation"; import { useAuth } from "@/lib/auth/auth-context"; import { Button } from "@/components/ui/button"; +import { BottomNav } from "./bottom-nav"; +import { QuickAddMenu } from "./quick-add-menu"; export default function AppLayout({ children }: { children: ReactNode }) { const router = useRouter(); @@ -22,9 +24,10 @@ export default function AppLayout({ children }: { children: ReactNode }) { return (
-
-
); } diff --git a/ApiCore-Frontend/src/app/(app)/quick-add-menu.tsx b/ApiCore-Frontend/src/app/(app)/quick-add-menu.tsx new file mode 100644 index 0000000..11362ba --- /dev/null +++ b/ApiCore-Frontend/src/app/(app)/quick-add-menu.tsx @@ -0,0 +1,45 @@ +"use client"; + +import Link from "next/link"; +import { Plus } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu"; + +const QUICK_ACTIONS = [ + { label: "Durchsicht", href: "/inspections/new" }, + { label: "Varroa-Messung", href: "/varroa/new" }, + { label: "Behandlung", href: "/treatments/new" }, + { label: "Fütterung", href: "/feedings/new" }, + { label: "Aufgabe", href: "/tasks/new" }, + { label: "Ernte", href: "/harvests/new" }, +]; + +export function QuickAddMenu() { + return ( + + + } + > + + + + {QUICK_ACTIONS.map((action) => ( + }> + {action.label} + + ))} + + + ); +} diff --git a/TASKS.md b/TASKS.md index bb50bf1..d476fcd 100644 --- a/TASKS.md +++ b/TASKS.md @@ -127,7 +127,7 @@ Abgeleitet aus [`docs/lastenheft.md`](docs/lastenheft.md) Abschnitt 26. Reihenfo ### 15. Responsive Smartphone-Oberfläche - Frontend: Mobile-first-Layout für alle o.g. Views verifiziert (Touch-Targets, Bottom-Nav, "+ Neu"-Schnellaktion permanent erreichbar) -- [ ] Manuell auf simulierter Smartphone-Breite (< 480px) und Tablet-Breite geprüft +- [x] Manuell auf simulierter Smartphone-Breite (< 480px) und Tablet-Breite geprüft ### 16–18. API, API-Dokumentation, Rollen/Berechtigungen