From 57ee68e72b34d1d0eded0faeb36c0c500ff1e7c0 Mon Sep 17 00:00:00 2001 From: Thomas Fransolet Date: Thu, 7 May 2026 15:28:48 +0200 Subject: [PATCH] Wip working version --- BUGS.md | 34 +++ src/app/[slug]/[configId]/page.tsx | 22 +- .../[configId]/sections/[sectionId]/page.tsx | 5 +- src/components/QRScannerButton.tsx | 6 +- src/components/sections/AgendaSection.tsx | 102 ++++--- src/components/sections/ArticleSection.tsx | 29 +- src/components/sections/GameSection.tsx | 28 +- src/components/sections/MapSection.tsx | 2 +- src/components/sections/MenuSection.tsx | 13 +- src/components/sections/PdfSection.tsx | 13 +- src/components/sections/SliderSection.tsx | 47 ++- src/components/sections/WeatherSection.tsx | 279 ++++++++++++++---- src/components/ui/AppBar.tsx | 32 +- src/lib/api/client.ts | 121 +++++++- src/lib/api/types.ts | 31 +- src/lib/theme.ts | 5 +- todo-features.md | 9 +- 17 files changed, 582 insertions(+), 196 deletions(-) create mode 100644 BUGS.md diff --git a/BUGS.md b/BUGS.md new file mode 100644 index 0000000..5f43e16 --- /dev/null +++ b/BUGS.md @@ -0,0 +1,34 @@ +# Bugs & problèmes connus — visitapp-web + +## Sections — données non récupérées + +> **Fix appliqué** : le backend retourne un JSON plat (toutes les DTOs héritent de SectionDTO), +> mais le TypeScript attendait une structure imbriquée (`section.map.points` etc.). +> `normalizeSectionDTO()` dans `client.ts` restructure la réponse. À valider en prod. + +- [x] **Section Carte** — fix normalization + `CategorieDTO.label` (était `name`) +- [x] **Section Slider** — fix normalization +- [x] **Section Menu** — fix normalization (récursif pour les sous-sections) +- [x] **Section Quiz** — fix normalization +- [x] **Section Agenda** — fix normalization +- [x] **Section Météo** — fix normalization + +## Affichage + +- [x] **Section Agenda — visuel des cartes** — liste horizontale minimaliste remplacée par une grille 2 colonnes avec image pleine largeur + badge date (calquée sur Flutter `event_list_item.dart`) +- [x] **Section PDF** — remplacé `