From 480aaa24b26ea5ba2ca8db5741ff478c6884fcb9 Mon Sep 17 00:00:00 2001 From: Matthieu Date: Wed, 11 Feb 2026 16:48:40 +0100 Subject: [PATCH] feat(navigation) : preserve list state in URL and use browser history for back buttons Add useUrlState composable to sync page, search, sort and filter state with URL query params. Back/forward navigation now restores the exact list position. Replace hardcoded NuxtLink back buttons with router.back() across all create/edit pages. Fix documents attachment filter that checked non-existent ID fields instead of relation objects. Co-Authored-By: Claude Opus 4.6 --- app/components/model-types/ManagementView.vue | 30 ++++- app/composables/useUrlState.ts | 116 ++++++++++++++++++ app/pages/component-catalog.vue | 35 +++--- app/pages/component-category/[id]/edit.vue | 4 +- app/pages/component-category/new.vue | 4 +- app/pages/component/[id]/edit.vue | 8 +- app/pages/component/create.vue | 4 +- app/pages/documents.vue | 15 ++- app/pages/piece-category/[id]/edit.vue | 4 +- app/pages/piece-category/new.vue | 4 +- app/pages/pieces-catalog.vue | 35 +++--- app/pages/pieces/[id]/edit.vue | 8 +- app/pages/pieces/create.vue | 4 +- app/pages/product-catalog.vue | 14 +-- app/pages/product-category/[id]/edit.vue | 4 +- app/pages/product-category/new.vue | 4 +- app/pages/product/[id]/edit.vue | 8 +- app/pages/product/create.vue | 4 +- 18 files changed, 228 insertions(+), 77 deletions(-) create mode 100644 app/composables/useUrlState.ts diff --git a/app/components/model-types/ManagementView.vue b/app/components/model-types/ManagementView.vue index 9985c90..86f182a 100644 --- a/app/components/model-types/ManagementView.vue +++ b/app/components/model-types/ManagementView.vue @@ -92,11 +92,12 @@