From c8cdb32668cd93a21b9a046a244dcb977bfc89f0 Mon Sep 17 00:00:00 2001 From: Xaviju Date: Fri, 15 Sep 2023 09:26:08 +0200 Subject: [PATCH] feat(workflows): navigate to workflows --- .../project-feature-kanban.component.ts | 13 ++++++++++--- .../project-feature-shell-routing.module.ts | 3 +++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/javascript/apps/taiga/src/app/modules/project/feature-kanban/project-feature-kanban.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-kanban/project-feature-kanban.component.ts index 1f353c4dc..0c2d520f0 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-kanban/project-feature-kanban.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-kanban/project-feature-kanban.component.ts @@ -134,9 +134,16 @@ export class ProjectFeatureKanbanComponent { return; } - const workflowSlug = - this.route.snapshot.queryParamMap.get('workflow') ?? 'main'; - this.store.dispatch(KanbanActions.initKanban({ workflow: workflowSlug })); + this.route.paramMap.subscribe((params) => { + const workflowSlug = params.get('workflow') ?? 'main'; + this.store.dispatch(KanbanActions.initKanban({ workflow: workflowSlug })); + }); + + // Load on init kanban page. Not on every reload + // const workflowSlug = this.route.snapshot.params['workflow']; + // this.store.dispatch( + // KanbanActions.initKanban({ workflow: workflowSlug }) + // ); this.checkInviteModalStatus(); this.state.connect( diff --git a/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell-routing.module.ts b/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell-routing.module.ts index eaf42252c..4a18dd54d 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell-routing.module.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell-routing.module.ts @@ -50,6 +50,9 @@ const routes: Routes = [ }, { path: ':slug/kanban/:workflow', + data: { + reuseComponent: false, + }, loadChildren: () => import( '~/app/modules/project/feature-view-setter/project-feature-view-setter.module'