feat(SiteSettings): add structured address fields and geo coordinates

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 <noreply@anthropic.com>
This commit is contained in:
Martin Porwoll 2025-12-30 12:26:10 +00:00
parent 16498a7650
commit 68032a4bf8

View file

@ -59,9 +59,112 @@ export const SiteSettings: CollectionConfig = {
label: 'Telefon', label: 'Telefon',
}, },
{ {
name: 'address', name: 'fax',
type: 'textarea', type: 'text',
label: 'Adresse', 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',
},
}, },
], ],
}, },