From e3fbd06e7185115eb8f94a6863c89bdf4c201760 Mon Sep 17 00:00:00 2001 From: Thomas Fransolet Date: Sat, 9 May 2026 00:22:28 +0200 Subject: [PATCH] Wip most of things, 95% done --- .gitignore | 2 + BUGS.md | 37 +- next.config.ts | 1 + package-lock.json | 384 +++++++++++++++++- package.json | 4 +- .../[configId]/sections/[sectionId]/page.tsx | 10 +- src/app/[slug]/page.tsx | 14 +- src/app/api/pdf/route.ts | 33 ++ src/components/ConfigurationGrid.tsx | 3 - src/components/FeaturedEvent.tsx | 79 ---- src/components/HomeHero.tsx | 117 ++++++ src/components/QRScannerButton.tsx | 27 +- src/components/SectionList.tsx | 11 +- src/components/sections/AgendaSection.tsx | 92 +++-- src/components/sections/ArticleSection.tsx | 6 +- src/components/sections/EventSection.tsx | 10 +- src/components/sections/GameSection.tsx | 8 +- src/components/sections/MapSection.tsx | 8 +- src/components/sections/MenuSection.tsx | 6 +- src/components/sections/PdfSection.tsx | 15 +- src/components/sections/QuizSection.tsx | 342 +++++++++++----- src/components/sections/SliderSection.tsx | 15 +- src/components/sections/VideoSection.tsx | 6 +- src/components/sections/WeatherSection.tsx | 8 +- src/components/sections/WebSection.tsx | 6 +- src/components/sections/game/PuzzleGame.tsx | 3 +- src/components/sections/map/LeafletMap.tsx | 2 +- src/components/sections/pdf/PdfViewer.tsx | 66 +++ src/components/ui/AppBar.tsx | 107 +---- src/components/ui/LanguageSelector.tsx | 93 +++++ src/hooks/useBack.ts | 20 + src/lib/api/client.ts | 24 +- src/lib/api/types.ts | 5 +- src/lib/i18n.ts | 21 +- 34 files changed, 1190 insertions(+), 395 deletions(-) create mode 100644 src/app/api/pdf/route.ts delete mode 100644 src/components/FeaturedEvent.tsx create mode 100644 src/components/HomeHero.tsx create mode 100644 src/components/sections/pdf/PdfViewer.tsx create mode 100644 src/components/ui/LanguageSelector.tsx create mode 100644 src/hooks/useBack.ts diff --git a/.gitignore b/.gitignore index 75692fe..a620e4b 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,5 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +certificates \ No newline at end of file diff --git a/BUGS.md b/BUGS.md index 5f43e16..e6f0b58 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,34 +1,17 @@ # Bugs & problèmes connus — visitapp-web -## Sections — données non récupérées +## Bugs fixés — suivi / actions restantes -> **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] **manager-app — Sauvegarde section Event (500)** — `StartDate`/`EndDate` stockés comme `DateTime.MinValue` (0001-01-01), renvoyés à Flutter qui les convertissait en UTC année 0000, rejeté par Newtonsoft.Json. Fix : dates rendues nullable dans `SectionEvent` + `SectionEventDTO`, désérialisation tolérante, sanitisation côté Flutter dans `event_config.dart`. + - **⚠️ Migration encore à faire** : `dotnet ef migrations add MakeEventDatesNullable` dans `manager-service` -- [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 +## À implémenter plus tard -## Affichage +- [ ] **Section Event** — page de détail à créer dans visitapp-web (type `SectionType.Event`). Dispatcher par type dans `sections/[sectionId]/page.tsx` à brancher. Voir l'équivalent Flutter dans `mymuseum-visitapp`. -- [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é `