1
0

feat(views): fetch tasks via view context when accessing them through views

This commit is contained in:
kolaente
2024-03-15 22:18:44 +01:00
parent ee6ea03506
commit cf15cc6f12
16 changed files with 210 additions and 108 deletions

View File

@ -37,6 +37,7 @@ const MigrationHandlerComponent = () => import('@/views/migrate/MigrationHandler
const ProjectList = () => import('@/views/project/ProjectList.vue')
const ProjectGantt = () => import('@/views/project/ProjectGantt.vue')
const ProjectTable = () => import('@/views/project/ProjectTable.vue')
const ProjectView = () => import('@/views/project/ProjectView.vue')
// If we load the component async, using it as a backdrop view will not work. Instead, everything explodes
// with an error from the core saying "Cannot read properties of undefined (reading 'parentNode')"
// Of course, with no clear indicator of where the problem comes from.
@ -359,6 +360,16 @@ const router = createRouter({
}
},
},
{
path: '/projects/:projectId/:viewId',
name: 'project.view',
component: ProjectView,
beforeEnter: (to) => saveProjectView(parseInt(to.params.projectId as string), parseInt(to.params.viewId as string)),
props: route => ({
projectId: Number(route.params.projectId as string),
viewId: Number(route.params.viewId as string),
}),
},
{
path: '/projects/:projectId/list',
name: 'project.list',