From 76aa660621c5d278eef26acefe7aaf3e6849696a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marina=20L=C3=B3pez?= Date: Fri, 6 Oct 2023 13:25:19 +0200 Subject: [PATCH] fix(front): i#4070 workflow without project slug not working --- .../project-feature-shell-routing.module.ts | 11 +++++++++++ .../feature-shell/project-feature-shell.component.ts | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) 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 56a67ee2a..c535a1ce4 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 @@ -54,6 +54,17 @@ const routes: Routes = [ kanban: true, }, }, + { + path: 'kanban/:workflow', + loadChildren: () => + import( + '~/app/modules/project/feature-view-setter/project-feature-view-setter.module' + ).then((m) => m.ProjectFeatureViewSetterModule), + canDeactivate: [CanDeactivateGuard], + data: { + kanban: true, + }, + }, { path: ':slug/stories/:storyRef', loadChildren: () => diff --git a/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell.component.ts b/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell.component.ts index 6760742e2..eadd60423 100644 --- a/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell.component.ts +++ b/javascript/apps/taiga/src/app/modules/project/feature-shell/project-feature-shell.component.ts @@ -157,7 +157,12 @@ export class ProjectFeatureShellComponent implements OnDestroy, AfterViewInit { if (isKanban) { void this.router.navigate( - [`project/${project.id}/${project.slug}/kanban`], + [ + `project/${project.id}/${project.slug}/kanban/${ + (active.params.workflow as Workflow['slug']) || + project.workflows[0].slug + }`, + ], { replaceUrl: true } ); } else if (isNewKanban) {