From 1a58ec91de720378defbdf401fe452dd0322d61c Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Tue, 4 Aug 2026 01:20:59 +0200 Subject: [PATCH] yxcyxc --- Internal/de/PROJECT_CONTEXT.md | 1 + Internal/de/PROJECT_STRUCTURE.md | 1 + Internal/de/README.md | 1 + Internal/en/PROJECT_CONTEXT.md | 1 + Internal/en/PROJECT_STRUCTURE.md | 1 + Internal/en/README.md | 1 + README.md | 1 + partials/landing/account/dashboard.php | 194 ++++++++++++++++--- src/App/AccountPages.php | 157 +++++++++------ src/App/ListingCatalog.php | 254 +++++++++++++++++++++++++ 10 files changed, 525 insertions(+), 87 deletions(-) diff --git a/Internal/de/PROJECT_CONTEXT.md b/Internal/de/PROJECT_CONTEXT.md index 3c979e1..a62f7c0 100644 --- a/Internal/de/PROJECT_CONTEXT.md +++ b/Internal/de/PROJECT_CONTEXT.md @@ -21,6 +21,7 @@ Papa-Kind-Treff ist eine PHP-basierte Plattform für Väter. Kernbereiche sind l - Wenn ein Geburtsdatum gesetzt ist, wird das Alter automatisch berechnet und später bei Bedarf aktualisiert. - Die Konto-E-Mail wird app-seitig verschlüsselt gespeichert und über einen separaten HMAC-Lookup-Hash adressiert. - Profiladresse kann per Suche oder Browser-Standort übernommen werden. +- Im Bereich `Events` gibt es jetzt zunächst drei Eintragstypen: eigenes Event, Ort und sonstige Veranstaltung. ## Technischer Rahmen - eigener Front-Controller in `public/index.php` diff --git a/Internal/de/PROJECT_STRUCTURE.md b/Internal/de/PROJECT_STRUCTURE.md index 68319fd..fe3aa54 100644 --- a/Internal/de/PROJECT_STRUCTURE.md +++ b/Internal/de/PROJECT_STRUCTURE.md @@ -18,6 +18,7 @@ Stand: 2026-08-03 - Consent- und rechtliche Texte: `public/page/datenschutz.php` - System-Einstellungen: `src/App/SystemSettings.php` - neue Listing-/Ort-Basis: `src/App/ListingCatalog.php` +- UI für Eintragstyp-Auswahl im Mitgliederbereich: `partials/landing/account/dashboard.php` ## Dokumentationsregel Kanonische interne Dokumentation: diff --git a/Internal/de/README.md b/Internal/de/README.md index dfa6f80..8bf4ec2 100644 --- a/Internal/de/README.md +++ b/Internal/de/README.md @@ -22,6 +22,7 @@ Papa-Kind-Treff ist eine PHP-basierte Plattform für Väter mit Fokus auf lokale - Profiladresse mit verschlüsselter Straße/Hausnummer, Adresssuche, Browser-Übernahme und Validierung - System-Sektion für Seiten-Admins mit Wartungs- und Diensteschaltern - neue Datenbasis für ein späteres Termin-, Ort- und Veranstaltungssystem angelegt +- Mitgliederbereich `Events` unterstützt jetzt drei Anlagetypen: `Eigenes Event`, `Ort`, `Sonstige Veranstaltung` ## Wording-Regel - Primärbegriff im Produkt: `Events` diff --git a/Internal/en/PROJECT_CONTEXT.md b/Internal/en/PROJECT_CONTEXT.md index 695954f..2695834 100644 --- a/Internal/en/PROJECT_CONTEXT.md +++ b/Internal/en/PROJECT_CONTEXT.md @@ -21,6 +21,7 @@ Papa-Kind-Treff is a PHP-based platform for fathers. Core areas are local events - If a birth date is set, age is calculated automatically and updated later when needed. - Account email is encrypted application-side and addressed through a separate HMAC lookup hash. - Profile address can be completed via address search or browser-based location import. +- The `Events` area now distinguishes between own events, places, and other time-limited event entries. ## Technical Frame - custom front controller in `public/index.php` diff --git a/Internal/en/PROJECT_STRUCTURE.md b/Internal/en/PROJECT_STRUCTURE.md index dedd74e..7faeacb 100644 --- a/Internal/en/PROJECT_STRUCTURE.md +++ b/Internal/en/PROJECT_STRUCTURE.md @@ -18,6 +18,7 @@ Updated: 2026-08-03 - consent and legal texts: `public/page/datenschutz.php` - system settings: `src/App/SystemSettings.php` - new listing/place base: `src/App/ListingCatalog.php` +- entry type selector UI in member area: `partials/landing/account/dashboard.php` ## Documentation Rule - canonical internal documentation lives in `Internal/de/` and `Internal/en/` diff --git a/Internal/en/README.md b/Internal/en/README.md index 1d4ed5f..8c09c0f 100644 --- a/Internal/en/README.md +++ b/Internal/en/README.md @@ -22,6 +22,7 @@ Papa-Kind-Treff is a PHP-based platform for fathers focused on local events, app - profile address supports encrypted street/house number, address search, browser import, and validation - system section for site admins with maintenance and service toggles - new data foundation prepared for a broader event, place, and listing system +- member area `Events` now supports three creation types: `Own Event`, `Place`, and `Other Event` ## Core Wording Rule - Primary product term: `Events` diff --git a/README.md b/README.md index 8dc95d1..823ac8a 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ Papa-Kind-Treff ist eine PHP-basierte Plattform für Väter mit Fokus auf: - Profil-Menü aktuell: `Profil`, `Kinder`, `Events`, `Community`, `Einstellungen`, `Abmelden` - neue interne Grundstruktur: `listing_places`, `listings`, `listing_occurrences`, `listing_prices`, `listing_benefits` - Seiten-Admins haben zusätzlich eine System-Sektion für globale Wartungs- und Diensteschalter +- Im Mitgliederbereich unter `Events` können Nutzer jetzt zwischen `Eigenes Event`, `Ort` und `sonstiger Veranstaltung` unterscheiden ## Datenschutz und Sicherheit - sensible Profilfelder werden app-seitig verschlüsselt gespeichert diff --git a/partials/landing/account/dashboard.php b/partials/landing/account/dashboard.php index 80adee6..db48044 100755 --- a/partials/landing/account/dashboard.php +++ b/partials/landing/account/dashboard.php @@ -6,10 +6,32 @@ $avatarPlaceholder = 'data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/ $avatarStyleKeys = array_keys($avatarBuilder ?? []); $currentAvatarStyle = (string)($profile['avatar_style'] ?? ($avatarStyleKeys[0] ?? 'lorelei')); $dashboardUserId = (int)($_SESSION['user_id'] ?? 0); -$editing = isset($editEvent) && $editEvent !== null; +$editingEvent = isset($editEvent) && $editEvent !== null; +$editingListing = isset($editListing) && $editListing !== null; +$editing = $editingEvent || $editingListing; +$currentEntryKind = $editingListing ? (string)($editListing['listing_type'] ?? 'editorial_event') : 'event'; $actionEvent = $editing ? 'event_update' : 'event_add'; -$startVal = $editEvent ? date('Y-m-d\TH:i', strtotime((string)$editEvent['starts_at'])) : ''; -$allowNoKidsChecked = $editEvent ? ((int)$editEvent['allow_kids'] === 0) : false; +$startVal = ''; +if ($editingEvent && !empty($editEvent['starts_at'])) { + $startVal = date('Y-m-d\TH:i', strtotime((string)$editEvent['starts_at'])); +} elseif ($editingListing && !empty($editListing['starts_at'])) { + $startVal = date('Y-m-d\TH:i', strtotime((string)$editListing['starts_at'])); +} +$allowNoKidsChecked = $editingEvent ? ((int)$editEvent['allow_kids'] === 0) : false; +$eventTitle = $editingEvent ? 'Event bearbeiten' : ($editingListing ? ($currentEntryKind === 'place' ? 'Ort bearbeiten' : 'Veranstaltung bearbeiten') : 'Neuen Eintrag anlegen'); +$submitLabel = $editingEvent ? 'Event speichern' : ($editingListing ? ($currentEntryKind === 'place' ? 'Ort speichern' : 'Veranstaltung speichern') : 'Eintrag anlegen'); +$titleValue = $editingEvent ? (string)($editEvent['title'] ?? '') : (string)($editListing['title'] ?? ''); +$teaserValue = $editingEvent ? (string)($editEvent['teaser_public'] ?? '') : (string)($editListing['teaser_public'] ?? ''); +$descriptionValue = $editingEvent ? (string)($editEvent['description'] ?? '') : (string)($editListing['description'] ?? ''); +$locationLabelValue = $editingEvent ? (string)($editEvent['location_label'] ?? '') : ''; +$streetValue = $editingEvent ? (string)($editEvent['street'] ?? '') : (string)($editListing['street'] ?? ''); +$zipValue = $editingEvent ? (string)($editEvent['zip'] ?? '') : (string)($editListing['zip'] ?? ''); +$cityValue = $editingEvent ? (string)($editEvent['city'] ?? '') : (string)($editListing['city'] ?? ''); +$regionValue = $editingEvent ? (string)($editEvent['region'] ?? '') : (string)($editListing['region'] ?? ''); +$latValue = $editingEvent ? (string)($editEvent['lat'] ?? '') : (string)($editListing['lat'] ?? ''); +$lngValue = $editingEvent ? (string)($editEvent['lng'] ?? '') : (string)($editListing['lng'] ?? ''); +$visibilityValue = $editingEvent ? (string)($editEvent['visibility'] ?? 'public') : (string)($editListing['visibility'] ?? 'public'); +$categorySlugValue = $editingListing ? (string)($editListing['category_slug'] ?? '') : ''; $editingChild = isset($editChild) && $editChild !== null; $childAction = $editingChild ? 'child_update' : 'child_add'; $childModalTitle = $editingChild ? 'Kind bearbeiten' : 'Kind hinzufügen'; @@ -205,15 +227,19 @@ if (!empty($canManageSystemSettings)) {
@@ -780,65 +845,99 @@ if (!empty($canManageSystemSettings)) {