From 68032a4bf8c2607c20d9941c7257b434a7d9396c Mon Sep 17 00:00:00 2001 From: Martin Porwoll Date: Tue, 30 Dec 2025 12:26:10 +0000 Subject: [PATCH] feat(SiteSettings): add structured address fields and geo coordinates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace single textarea address field with structured address group (street, additionalLine, zip, city, state, country) and add geo coordinates group (lat, lng, zoom) for map integration. Also adds fax field to contact group. Matches structure of Locations collection. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/collections/SiteSettings.ts | 109 +++++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 3 deletions(-) diff --git a/src/collections/SiteSettings.ts b/src/collections/SiteSettings.ts index 43d22b9..ade704f 100644 --- a/src/collections/SiteSettings.ts +++ b/src/collections/SiteSettings.ts @@ -59,9 +59,112 @@ export const SiteSettings: CollectionConfig = { label: 'Telefon', }, { - name: 'address', - type: 'textarea', - label: 'Adresse', + name: 'fax', + type: 'text', + label: 'Fax', + }, + ], + }, + // Adresse + { + name: 'address', + type: 'group', + label: 'Adresse', + fields: [ + { + name: 'street', + type: 'text', + label: 'Straße & Hausnummer', + admin: { + description: 'z.B. "Hans-Böckler-Str. 19"', + }, + }, + { + name: 'additionalLine', + type: 'text', + label: 'Adresszusatz', + admin: { + description: 'z.B. "Gebäude B, 3. Stock"', + }, + }, + { + type: 'row', + fields: [ + { + name: 'zip', + type: 'text', + label: 'PLZ', + admin: { + width: '30%', + }, + }, + { + name: 'city', + type: 'text', + label: 'Stadt', + admin: { + width: '70%', + }, + }, + ], + }, + { + name: 'state', + type: 'text', + label: 'Bundesland/Region', + }, + { + name: 'country', + type: 'text', + defaultValue: 'Deutschland', + label: 'Land', + }, + ], + }, + // Geo-Koordinaten + { + name: 'geo', + type: 'group', + label: 'Geo-Koordinaten', + admin: { + description: 'Für Kartenanzeige (Google Maps, OpenStreetMap)', + }, + fields: [ + { + type: 'row', + fields: [ + { + name: 'lat', + type: 'number', + label: 'Breitengrad (Latitude)', + admin: { + step: 0.000001, + description: 'z.B. 51.521732', + width: '50%', + }, + }, + { + name: 'lng', + type: 'number', + label: 'Längengrad (Longitude)', + admin: { + step: 0.000001, + description: 'z.B. 6.928850', + width: '50%', + }, + }, + ], + }, + { + name: 'zoom', + type: 'number', + defaultValue: 15, + min: 1, + max: 20, + label: 'Zoom-Level', + admin: { + description: '1 = Weltkarte, 20 = Straßenebene', + }, }, ], },