Skip to content

Commit

Permalink
feat(workflow): u#2859 t#4115 design review ii
Browse files Browse the repository at this point in the history
  • Loading branch information
mavalroot committed Nov 22, 2023
1 parent f276b45 commit 4b9e7d0
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@
'/project',
project.id,
project.slug,
'kanban'
'kanban',
project.workflows[0].slug
]"
routerLinkActive>
<tui-svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,63 @@ const routes: Routes = [
project: ProjectFeatureShellResolverService,
},
children: [
{
path: 'overview',
loadChildren: () =>
import(
'~/app/modules/project/feature-overview/project-feature-overview.module'
).then((m) => m.ProjectFeatureOverviewModule),
data: {
overview: true,
},
},
{
path: ':slug/overview',
loadChildren: () =>
import(
'~/app/modules/project/feature-overview/project-feature-overview.module'
).then((m) => m.ProjectFeatureOverviewModule),
data: {
overview: true,
},
},
{
path: ':slug/new-workflow',
loadChildren: () =>
import(
'~/app/modules/project/feature-new-workflow/project-feature-new-workflow.module'
).then((m) => m.ProjectFeatureNewWorkflowModule),
resolve: {
project: ProjectAdminResolver,
},
data: {
newKanban: true,
},
},
{
path: ':slug/kanban',
loadChildren: () =>
import(
'~/app/modules/project/feature-view-setter/project-feature-view-setter.module'
).then((m) => m.ProjectFeatureViewSetterModule),
canDeactivate: [CanDeactivateGuard],
data: {
redirect: true,
kanban: true,
},
},
{
path: 'kanban',
loadChildren: () =>
import(
'~/app/modules/project/feature-view-setter/project-feature-view-setter.module'
).then((m) => m.ProjectFeatureViewSetterModule),
canDeactivate: [CanDeactivateGuard],
data: {
redirect: true,
kanban: true,
},
},
{
path: ':slug/kanban/:workflow',
loadChildren: () =>
Expand Down Expand Up @@ -91,39 +148,6 @@ const routes: Routes = [
project: ProjectAdminResolver,
},
},
{
path: 'overview',
loadChildren: () =>
import(
'~/app/modules/project/feature-overview/project-feature-overview.module'
).then((m) => m.ProjectFeatureOverviewModule),
data: {
overview: true,
},
},
{
path: ':slug/overview',
loadChildren: () =>
import(
'~/app/modules/project/feature-overview/project-feature-overview.module'
).then((m) => m.ProjectFeatureOverviewModule),
data: {
overview: true,
},
},
{
path: ':slug/new-workflow',
loadChildren: () =>
import(
'~/app/modules/project/feature-new-workflow/project-feature-new-workflow.module'
).then((m) => m.ProjectFeatureNewWorkflowModule),
resolve: {
project: ProjectAdminResolver,
},
data: {
newKanban: true,
},
},
],
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import { filterNil } from '~/app/shared/utils/operators';
import { ProjectFeatureStoryWrapperFullViewModule } from '../feature-story-wrapper-full-view/project-feature-story-wrapper-full-view.module';
import { selectRouteParams } from '~/app/router-selectors';
import { ProjectFeatureViewSetterKanbanComponent } from './project-feature-view-setter.component-kanban.component';
import { selectCurrentProject } from '../data-access/+state/selectors/project.selectors';

interface ProjectFeatureViewSetterComponentState {
storyView: StoryView;
Expand All @@ -60,6 +61,7 @@ interface ProjectFeatureViewSetterComponentState {
kanbanHost: ViewContainerRef | undefined;
url: string;
workflowSlug?: Workflow['slug'];
project: Project;
}

interface StoryParams {
Expand Down Expand Up @@ -101,6 +103,19 @@ export class ProjectFeatureViewSetterComponent implements OnDestroy {
) {
this.state.connect('storyView', this.store.select(selectStoryView));
this.state.connect('selectStory', this.store.select(selectStory));
this.state.connect(
'project',
this.store.select(selectCurrentProject).pipe(filterNil())
);

if (this.route.snapshot.data['redirect']) {
void this.router.navigate(
[this.state.get('project')?.workflows?.[0]?.slug],
{
relativeTo: this.route,
}
);
}

this.state.connect(
'url',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Copyright (c) 2023-present Kaleidos INC
.crumb {
padding: var(--spacing-4);
white-space: nowrap;

&:first-of-type {
padding-inline-start: 0;
}
}

.crumb-divider {
Expand Down

0 comments on commit 4b9e7d0

Please sign in to comment.