Neues SwarmControlCheck-Modul: strukturierte Weiselzellenkontrollen pro Volk mit Zahl/Verdeckelungsstatus der Zellen, Schwarmstimmung, ergriffener Maßnahme und optionalem naechsten Kontrolltermin. Frontend: neue Karte auf der Volk-Detailseite, Erfassungsformular unter /swarm-control/new sowie Quick-Add-Eintrag.
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
"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: "Schwarmkontrolle", href: "/swarm-control/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 (
|
|
<DropdownMenu>
|
|
<DropdownMenuTrigger
|
|
render={
|
|
<Button
|
|
size="icon-lg"
|
|
className="fixed right-4 bottom-20 z-40 rounded-full shadow-lg sm:hidden"
|
|
aria-label="Neu"
|
|
/>
|
|
}
|
|
>
|
|
<Plus className="size-6" />
|
|
</DropdownMenuTrigger>
|
|
<DropdownMenuContent align="end" side="top">
|
|
{QUICK_ACTIONS.map((action) => (
|
|
<DropdownMenuItem key={action.href} render={<Link href={action.href} />}>
|
|
{action.label}
|
|
</DropdownMenuItem>
|
|
))}
|
|
</DropdownMenuContent>
|
|
</DropdownMenu>
|
|
);
|
|
}
|