From d45ae31d8c1e9ff8f6d939b21d9f09f687798093 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 3 Apr 2026 21:17:26 +0200 Subject: [PATCH] fix(gantt): preserve query parameters when closing task modal When closing a task modal opened from the Gantt view, the date range query parameters were lost because closeModal() reconstructed the route with only projectId and viewId. Now preserves query parameters from the backdrop view. --- frontend/src/composables/useRouteWithModal.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/composables/useRouteWithModal.ts b/frontend/src/composables/useRouteWithModal.ts index 4cfc6a441..bcca2b7dd 100644 --- a/frontend/src/composables/useRouteWithModal.ts +++ b/frontend/src/composables/useRouteWithModal.ts @@ -79,12 +79,15 @@ export function useRouteWithModal() { // Only navigate if we have a valid project and view if (baseStore.currentProject.id && viewId) { + // Preserve query parameters (e.g., date range) from the backdrop view + const backdropRoute = historyState.value?.backdropView && router.resolve(historyState.value.backdropView) const newRoute = { name: 'project.view', params: { projectId: baseStore.currentProject.id, viewId, }, + query: backdropRoute?.query || {}, } router.push(newRoute)