HifiPlanet-Website/hifi/api/src/Support
Maaxxs 5f1d4e1092 Add CMS v1: editable business identity and legal pages
Phase 5 of the dashboard roadmap. Business-facing data that was
previously hard-coded (and, for address/hours, duplicated three
independent ways across Footer.jsx, ContactPage.jsx, and the i18n
strings) is now stored in app_settings and editable under Website
settings: logo (light/dark variants, falling back to the bundled
defaults until set), street/zip/city, and a day-by-day business_hours
editor. Footer.jsx and ContactPage.jsx now share one open/closed and
hours-formatting implementation (new utils/businessHours.js) instead
of three separate hard-coded representations of the same thing.

New legal_pages table (impressum/datenschutz/agb) + PageContentController
replaces the three fully hard-coded React pages with fetched, admin-
editable HTML - built-in defaults matching the original page content
kick in until an admin saves anything, so a fresh install isn't blank.
Reuses the Phase 4 RichTextEditor (extended with a heading toggle and
inline-code toggle, since the legal text needs both) via a new
"Rechtstexte" tab in Settings. Legal content lives only in DB and is
authored exclusively by logged-in admins, so dangerouslySetInnerHTML
here doesn't take untrusted input.

IMAGE_COLUMNS in SettingsController (export/import) is now table =>
array of columns instead of table => one column, since app_settings
has three image columns (hero/logo/logo_dark) - this also retroactively
fixes hero_image_path never having been wired into export/import at
all. app_settings and legal_pages both got TABLE_COLUMNS/IMPORT_SECTIONS
entries so they round-trip through a hoster-migration export like
everything else.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 02:03:59 +02:00
..
Base32.php Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
GoogleAnalyticsReporting.php Add Google Analytics dashboard widget (GA4 Data API integration) 2026-07-07 01:57:32 +02:00
Http.php Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
Mailer.php Add rich-text formatting and font choice for email templates 2026-09-09 01:49:13 +02:00
Permissions.php Move FAQ management into the admin panel and cover it plus the gallery in export/import 2026-07-07 19:25:06 +02:00
RecoveryCodes.php Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
Schema.php Add CMS v1: editable business identity and legal pages 2026-09-09 02:03:59 +02:00
Slug.php Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
Totp.php Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
Uploads.php Add remove-image button and actually delete orphaned upload files 2026-09-09 01:32:40 +02:00