diff --git a/frontend/src/App.vue b/frontend/src/App.vue index f9531cb..c999482 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -15,7 +15,7 @@ :key="link.to" :to="link.to" class="px-3 py-1.5 text-sm rounded-lg transition-colors" - :class="$route.path === link.to ? 'bg-gray-800 text-white' : 'text-gray-400 hover:text-white hover:bg-gray-800'" + :class="estActif(link.to) ? 'bg-gray-800 text-white' : 'text-gray-400 hover:text-white hover:bg-gray-800'" > {{ link.label }} @@ -44,13 +44,21 @@ diff --git a/frontend/src/router.js b/frontend/src/router.js index 73bb1be..75e61a6 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -5,6 +5,7 @@ import AnalyticsPage from './pages/AnalyticsPage.vue' import RevenusPage from './pages/RevenusPage.vue' import DocumentsPage from './pages/DocumentsPage.vue' import LogementsPage from './pages/LogementsPage.vue' +import LotPage from './pages/LotPage.vue' import EditDocumentPage from './pages/EditDocumentPage.vue' import ReExtractionPage from './pages/ReExtractionPage.vue' import ConfigPage from './pages/ConfigPage.vue' @@ -61,6 +62,13 @@ const routes = [ name: 'logements', component: LogementsPage }, + // Le lot vit dans l'URL : une fiche se partage et survit au rechargement. + // `/lots` sans identifiant ouvre le premier lot plutôt qu'une page vide. + { + path: '/lots/:id?', + name: 'lot', + component: LotPage + }, { path: '/documents/:id/edit', name: 'edit-document',