Skip to content

Commit

Permalink
feat(workflow): breadcrumb placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfran committed Sep 20, 2023
1 parent 3543c2a commit 3b1f7a5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@
<ng-container *transloco="let t">
<h1
id="main-area-title"
*ngIf="workflows.length === 1"
data-test="kanban-title">
{{ t('kanban.title') }}
</h1>

<div
class="breadcrumb"
*ngIf="workflows.length > 1">
Todo: breadcrumb
</div>

<tui-hosted-dropdown
class="status-options-menu"
tuiDropdownAlign="left"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
*/

import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { TranslocoDirective } from '@ngneat/transloco';
import {
TuiButtonModule,
TuiDataListModule,
TuiHostedDropdownModule,
TuiSvgModule,
} from '@taiga-ui/core';
import { Workflow } from '@taiga/data';

@Component({
selector: 'tg-kanban-header',
Expand All @@ -32,5 +33,7 @@ import {
],
})
export class KanbanHeaderComponent {
@Input() public workflows: Workflow[] = [];

public openWorkflowOptions = false;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
(resized)="onResized($event)"
class="kanban-wrapper kanban-cdk-area">
<div class="kanban">
<tg-kanban-header></tg-kanban-header>
<tg-kanban-header [workflows]="vm.workflows"></tg-kanban-header>
<div class="kanban-wrapper">
<ng-container *ngIf="vm.workflow && vm.workflow.statuses.length">
<tg-kanban-workflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ import { KanbanHeaderComponent } from './components/kanban-header/kanban-header.
interface ComponentState {
loadingWorkflow: KanbanState['loadingWorkflow'];
workflow: KanbanState['workflow'];
workflows: Workflow[];
invitePeopleModal: boolean;
showStoryDetail: boolean;
storyView: StoryView;
Expand Down Expand Up @@ -186,6 +187,18 @@ export class ProjectFeatureKanbanComponent {
this.store.select(selectStory).pipe(filterNil())
);

this.state.connect(
'workflows',
this.store
.select(selectCurrentProject)
.pipe(filterNil())
.pipe(
map((project) => {
return project.workflows;
})
)
);

this.state.hold(
combineLatest([
this.state.select('storyView'),
Expand Down

0 comments on commit 3b1f7a5

Please sign in to comment.