Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(workflow): u#2859 t#4115 design review ii #562

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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