From 4c3b68fda53d78ea24edc36364b60abc39387d27 Mon Sep 17 00:00:00 2001 From: Manus Date: Fri, 13 Feb 2026 04:49:46 -0500 Subject: [PATCH] =?UTF-8?q?Checkpoint:=20Correction=20du=20bug=20o=C3=B9?= =?UTF-8?q?=20l'accord=C3=A9on=20se=20refermait=20apr=C3=A8s=20avoir=20cli?= =?UTF-8?q?qu=C3=A9=20sur=20un=20sous-menu.=20Maintenant,=20la=20section?= =?UTF-8?q?=20parent=20reste=20ouverte=20automatiquement=20quand=20on=20na?= =?UTF-8?q?vigue=20vers=20une=20page=20enfant.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/DashboardLayout.tsx | 13 +++++++++++++ todo.md | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/client/src/components/DashboardLayout.tsx b/client/src/components/DashboardLayout.tsx index 1f753eb..89d9941 100644 --- a/client/src/components/DashboardLayout.tsx +++ b/client/src/components/DashboardLayout.tsx @@ -182,6 +182,19 @@ function DashboardLayoutContent({ setOpenSection(prev => prev === label ? null : label); }; + // Ouvrir automatiquement la section parent quand on navigue vers une page enfant + useEffect(() => { + for (const section of menuStructure) { + if (section.children) { + const hasActiveChild = section.children.some(child => child.path === location); + if (hasActiveChild && openSection !== section.label) { + setOpenSection(section.label); + break; + } + } + } + }, [location]); + useEffect(() => { if (isCollapsed) { setIsResizing(false); diff --git a/todo.md b/todo.md index 4f8bc68..3b31848 100644 --- a/todo.md +++ b/todo.md @@ -425,5 +425,10 @@ - [x] Ajouter des animations fluides pour l'ouverture/fermeture - [x] Améliorer les effets hover et les transitions - [x] Optimiser les espacements et la typographie -- [ ] Tester le comportement exclusif +- [x] Tester le comportement exclusif +- [x] Déployer sur le VPS + +## Correction bug accordéon +- [x] Empêcher la fermeture de l'accordéon lors du clic sur un sous-menu +- [ ] Tester le comportement après correction - [ ] Déployer sur le VPS