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:
parent
642134d16f
commit
d45ae31d8c
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue