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.
This commit is contained in:
kolaente 2026-04-03 21:17:26 +02:00 committed by kolaente
parent 642134d16f
commit d45ae31d8c
1 changed files with 3 additions and 0 deletions

View File

@ -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)