feat(windkarte): slugPrefix enforcement, name→gebiets_nr, name field removed
Deploy / verify (push) Successful in 48s
Deploy / deploy (push) Successful in 59s

- RustyCMS: SchemaDefinition.slug_prefix + auto-prepend in create_entry
- wind_area/wind_map schemas: slugPrefix config, name field removed
- wind_area entries: name→gebiets_nr (faktische Gebietsnummer, GeoJSON-Join-Key)
- WindkarteMap/WindAreaPanel: Join + Anzeige auf gebiets_nr

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Peter Meier
2026-05-13 09:35:28 +02:00
parent 067e847524
commit c66899fa9b
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -36,7 +36,7 @@
<div class="flex items-start justify-between gap-3 border-b border-stein-200 px-5 py-4">
<div class="min-w-0">
<div class="flex items-center gap-2 flex-wrap">
<span class="text-xl font-semibold text-stein-800">{area.name}</span>
<span class="text-xl font-semibold text-stein-800">{area.gebiets_nr}</span>
{#if area.status}
<span class="rounded-full px-2 py-0.5 text-xs font-medium {STATUS_CLASS[area.status] ?? 'bg-stein-100 text-stein-600'}">
{STATUS_LABEL[area.status] ?? area.status}
+2 -2
View File
@@ -73,7 +73,7 @@
maxZoom: 16,
}).addTo(map);
const byName = Object.fromEntries(areas.map((a) => [a.name, a]));
const byNr = Object.fromEntries(areas.map((a) => [a.gebiets_nr, a]));
try {
const geoRes = await fetch(geojsonUrl);
@@ -85,7 +85,7 @@
return style(s, false);
},
onEachFeature: (feature, layer) => {
const cmsArea = byName[feature.properties?.name] ?? null;
const cmsArea = byNr[feature.properties?.name] ?? null;
if (cmsArea) feature.properties.cms = cmsArea;
layer.on("click", async () => {
+1 -1
View File
@@ -1,6 +1,6 @@
export type WindArea = {
_slug: string;
name: string;
gebiets_nr: string;
bezeichnung?: string;
status?: "rechtskraeftig" | "entwurf_2" | "entwurf_3";
flaeche_ha?: number;