feat(stellungnahme): Einwendungs-Assistent für Windvorranggebiete
Deploy / verify (push) Successful in 59s
Deploy / deploy (push) Successful in 2m37s

5-Schritt-Wizard: Gebietskontext → Argumente wählen → Ausgabeform →
persönliche Betroffenheit → Absender + Ausgabe. Alle Eingaben bleiben
lokal im Browser (kein Server-Transfer). Fertigtext- und Leitfaden-Modus.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Peter Meier
2026-05-27 14:41:00 +02:00
parent d781b3140e
commit 6d0861bb0a
7 changed files with 771 additions and 1 deletions
+26
View File
@@ -749,6 +749,32 @@ export async function getTextFragmentBySlug(
});
}
/** Alle Text-Fragmente, die einen bestimmten Tag (Slug) tragen. */
export async function getTextFragmentsByTag(
tagSlug: string,
options?: { locale?: string },
): Promise<TextFragmentEntry[]> {
const key = `text_fragment:tag:${tagSlug}:${options?.locale ?? ""}`;
return cached("text_fragment", key, async () => {
const base = getBaseUrl();
const url = new URL(`${base}/api/content/text_fragment`);
url.searchParams.set("_per_page", "500");
url.searchParams.set("_resolve", "tags");
if (options?.locale) url.searchParams.set("_locale", options.locale);
const res = await cmsFetch(url.toString());
if (!res.ok) return [];
const data = (await res.json()) as { items?: TextFragmentEntry[] };
const items = data.items ?? [];
return items.filter((f) => {
const tags = (f as unknown as { tags?: unknown[] }).tags ?? [];
return tags.some((t) => {
if (typeof t === "string") return t === tagSlug;
return (t as { _slug?: string })?._slug === tagSlug;
});
});
});
}
/** Fullwidth-Banner (z. B. für Top-Banner mit Bild). */
export type TopBannerEntry = components["schemas"]["top_banner"];