From 0884f02e15e7efba2caacf661df3c18fd7571f88 Mon Sep 17 00:00:00 2001 From: neodk2004 Date: Sat, 18 Jul 2026 11:26:57 +0200 Subject: [PATCH] Responsive/warme Neugestaltung + Abo-Zahlungsgeruest (4,99EUR/Monat) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Responsive & Design: - Sidebar wird unter 900px zum Off-Canvas-Menue (Hamburger-Button, Backdrop, Auto-Close bei Navigation) statt fix 228px breit zu bleiben - Formular-/Statistik-Grids brechen bei 900px/560px auf weniger Spalten um, Modals gehen unter 560px auf Vollbild, iOS-Zoom-Bug bei Formularfeldern durch font-size:16px auf Mobile vermieden - Wärmere Optik ausschliesslich über CSS-Variablen (:root): Creme- Hintergrund, weichere Akzentfarbe, groessere Radien, neuer --shadow-Token auf Card/Modal - kein Redesign pro Seite noetig, da die App durchgehend über diese Variablen themt Abo-/Zahlungsgeruest (Anbieter voraussichtlich PayPal, noch nicht angebunden): - nutzer.abo_bis / abo_typ + globaler Schalter einstellungen.abo_pflicht (Default AUS) - solange PayPal nicht wirklich läuft, sperrt das Gate niemanden aus - _hat_aktiven_zugang() zentral in global_auth_check(): blockiert bei aktiver Zahlungspflicht ohne gueltiges Abo mit 402 Payment Required, laesst /api/abo/* und /api/auth/logout immer durch - POST /api/abo/aktivieren ist bewusst ein 501-Stub bis PayPal echt angebunden ist - kein vorgetaeuschter Erfolg - Admin-Dashboard: "Freischalten"-Aktion pro Konto (1-12 Monate, Pflicht-Begruendung, audit-geloggt) - deckt die geforderte Moeglichkeit ab, Konten kostenlos freizuschalten (POST /api/admin/nutzer//abo-freischalten) - Backend-Einstellungen: neue Karte "Abo & Zahlung" fuer Preis und den abo_pflicht-Schalter - Frontend: neue Seite "Mein Abo" (pgMeinAbo), aboBlockiert-Flag in initApp() leitet jede Navigation dorthin um, wenn kein Zugang besteht Verifiziert: JS-Syntax-Check, Playwright-Screenshots auf Desktop/ Tablet/Mobile (Sidebar-Slide-in, Grid-Umbruch, Interview-Wizard auf Handy), API-Tests fuer das komplette Abo-Gate (Toggle an/aus, 402, Freischaltung, Stub-Endpoint, Restore auf sicheren Default). --- CLAUDE.md | 22 ++- pflegepilot_alpha_v2/pflegepilot/app.py | 125 ++++++++++++- .../pflegepilot/templates/index.html | 167 ++++++++++++++++-- 3 files changed, 291 insertions(+), 23 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index d1b6055..cf31851 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,7 +12,7 @@ This is not a single project but a working directory with one active app plus re - **`Anleitung.md`, `Leistungen.md`, `Leistungen2.md`, `Pflegegrad.md`, `Musterbrief.md`** — German-language domain reference notes (care-benefits catalog research, sample letters, project rationale) used as source material for `katalog.py` and the letter generators. Not code. - **`refactoring.md`** — the current architecture-change brief from the product owner (see "Planned architecture pivot" below). Read this before any structural work. -No git repository is initialized in this directory. +A git repository is initialized at the root (`Pflegepilot/.git`). `.gitignore` excludes the SQLite DB, patient-generated files (`static/briefe`, `static/dokumente`, `static/fotos`), `__pycache__`, and `graphify-out/` — never commit real patient data. ## Commands @@ -62,6 +62,26 @@ The product owner specified a pivot away from the original **central multi-patie All three refactoring.md pivot pieces are now implemented. Verified end-to-end (API tests for every guard/happy-path + audit-log content, and a Playwright screenshot pass of the dashboard UI and the confirmation modal). +## Responsive design & visual style + +The frontend was originally desktop-only (zero `@media` queries, fixed 228px sidebar, fixed-column form grids) and visually "clinical" per user feedback. Both were addressed together in `templates/index.html`: + +- **Mobile/tablet layout**: below 900px the `.sb` sidebar becomes a fixed off-canvas panel (`transform:translateX(-100%)`, slides in via `.sb.open`), toggled by a hamburger button (`#sb-toggle`, only visible in that breakpoint) and a `#sb-backdrop` overlay that closes it on tap. `toggleSidebar()`/`closeSidebar()` in the `