+
-
+
+
{/* Siehe Kommentar im Chargen-Formular: zwei benannte Slots statt
einer Liste, damit sich das zweite Bild auch ohne erstes setzen
laesst. Slot 1 erscheint zusaetzlich auf /ernten und der
Ernten-Detailseite. */}
-
-
-
- {t.adminHarvestEditPage.isPublishedLabel}
-
-
{t.adminHarvestEditPage.isPublishedHint}
-
-
+
+
+
+
+
+
+
+ {th.isPublishedHint}
+
+
);
}
diff --git a/src/app/admin/gutscheine/[id]/page.tsx b/src/app/admin/gutscheine/[id]/page.tsx
index 696ec4b..7ebb16b 100644
--- a/src/app/admin/gutscheine/[id]/page.tsx
+++ b/src/app/admin/gutscheine/[id]/page.tsx
@@ -1,6 +1,14 @@
import { notFound } from "next/navigation";
import { prisma } from "@/lib/prisma";
import { BackLink } from "@/components/back-link";
+import { Button } from "@/components/ui";
+import {
+ AdminField,
+ AdminFieldset,
+ AdminFormPanel,
+ AdminSelect,
+ AdminSwitch,
+} from "@/components/admin-form";
import { updateDiscountCodeAction } from "../../actions";
import { getLocale } from "@/i18n/locale";
import { getDictionary } from "@/i18n/get-dictionary";
@@ -12,108 +20,79 @@ function toDateInputValue(date: Date | null): string {
export default async function AdminGutscheinEditPage(props: PageProps<"/admin/gutscheine/[id]">) {
const t = getDictionary(await getLocale());
+ const tv = t.adminVoucherEditPage;
const { id } = await props.params;
const code = await prisma.discountCode.findUnique({ where: { id } });
if (!code) notFound();
return (
-