From 7f9ed7262fe9df765d130945b2141ec80c80c8b5 Mon Sep 17 00:00:00 2001 From: Nick Szaunig Date: Sun, 20 Sep 2026 02:16:06 +0200 Subject: [PATCH] refactor: Liefergebiet bekommt einen eigenen Abschnitt "Versand" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die Einstellung lag unter "Firmendaten" — zwischen Firmenname, Slogan und Anschrift. Dort sucht sie niemand: eine Versandregel ist keine Stammdatenangabe. Genau das ist beim ersten Suchen auch passiert. Jetzt ein eigener Abschnitt "Versand" (englisch "Shipping") unter Admin → Inhalte → Texte, direkt hinter den Firmendaten. Der Feldtyp-Vertrag der Registry bekommt dafuer die Gruppe "shipping". Rein organisatorisch — Schluessel, Wert und Verhalten bleiben gleich, ein bereits gepflegter Wert wandert einfach mit. tsc: 0 Fehler. vitest: 359/359 gruen. eslint: 0 Warnungen. Co-Authored-By: Claude Opus 5 (1M context) --- src/app/admin/inhalte/page.tsx | 1 + src/i18n/dictionaries/de.ts | 1 + src/i18n/dictionaries/en.ts | 1 + src/i18n/dictionary-type.ts | 1 + src/lib/content-registry.ts | 4 ++-- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/admin/inhalte/page.tsx b/src/app/admin/inhalte/page.tsx index c81257b..b4a946b 100644 --- a/src/app/admin/inhalte/page.tsx +++ b/src/app/admin/inhalte/page.tsx @@ -205,6 +205,7 @@ export default async function AdminInhaltePage(props: PageProps<"/admin/inhalte" const groups: { key: ContentFieldDef["group"]; heading: string }[] = [ { key: "company", heading: t.adminContentPage.groupCompany }, + { key: "shipping", heading: t.adminContentPage.groupShipping }, { key: "home", heading: t.adminContentPage.groupHome }, { key: "pages", heading: t.adminContentPage.groupPages }, { key: "social", heading: t.adminContentPage.groupSocial }, diff --git a/src/i18n/dictionaries/de.ts b/src/i18n/dictionaries/de.ts index f11ebf0..34912f9 100644 --- a/src/i18n/dictionaries/de.ts +++ b/src/i18n/dictionaries/de.ts @@ -1164,6 +1164,7 @@ export const de: Dictionary = { sectionText: "Texte", sectionTextIntro: "Alle Textinhalte, sortiert nach Bereich.", groupCompany: "Firmendaten", + groupShipping: "Versand", groupHome: "Homepage", groupPages: "Weitere Seiten", groupLegal: "Rechtstexte", diff --git a/src/i18n/dictionaries/en.ts b/src/i18n/dictionaries/en.ts index f4dbc27..ddca30f 100644 --- a/src/i18n/dictionaries/en.ts +++ b/src/i18n/dictionaries/en.ts @@ -1163,6 +1163,7 @@ export const en: Dictionary = { sectionText: "Text", sectionTextIntro: "Every text field, grouped by section.", groupCompany: "Company details", + groupShipping: "Shipping", groupHome: "Homepage", groupPages: "Other pages", groupLegal: "Legal pages", diff --git a/src/i18n/dictionary-type.ts b/src/i18n/dictionary-type.ts index 2b77f7f..cf7a0be 100644 --- a/src/i18n/dictionary-type.ts +++ b/src/i18n/dictionary-type.ts @@ -856,6 +856,7 @@ export interface Dictionary { sectionText: string; sectionTextIntro: string; groupCompany: string; + groupShipping: string; groupHome: string; groupPages: string; groupLegal: string; diff --git a/src/lib/content-registry.ts b/src/lib/content-registry.ts index 205bdbf..09fcd92 100644 --- a/src/lib/content-registry.ts +++ b/src/lib/content-registry.ts @@ -18,7 +18,7 @@ export type ContentFieldType = export interface ContentFieldDef { key: string; - group: "company" | "home" | "pages" | "legal" | "social"; + group: "company" | "shipping" | "home" | "pages" | "legal" | "social"; labelDe: string; labelEn: string; type: ContentFieldType; @@ -73,7 +73,7 @@ export const CONTENT_REGISTRY: ContentFieldDef[] = [ // Auswahl und kein Freitext — siehe "options" oben. { key: "shipping.region", - group: "company", + group: "shipping", labelDe: "Liefergebiet", labelEn: "Shipping region", type: "select",