All files / src/app/tasks/kanban kanban.component.ts

100% Statements 12/12
100% Branches 0/0
100% Functions 3/3
100% Lines 10/10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 571x   1x                     1x           1x   1x                     1x                         1x       1x       1x   1x  
import { Component, OnInit } from '@angular/core';
import { KanbanListComponent } from '../kanban-list/kanban-list.component';
import { KanbanList } from '../model/kanban-list';
import { waitFor$ } from 'app/store/selector-helpers/selector-helpers';
 
@Component({
  selector: 'mwb-kanban',
  template: `
    <div>
      <mwb-kanban-list *ngFor="let list of lists" [list]="list"></mwb-kanban-list>
    </div>
  `,
})
export class KanbanComponent implements OnInit {
 
  lists: KanbanList[];
 
  constructor() { }
 
  ngOnInit() {
 
    const unassigned = new KanbanList({
      name: 'Unassigned',
      cards: [
        {
          id: 1,
          status: 'Unassigned',
          description: 'validations',
          effectiveDate: '2017-06-07',
        },
      ]
    })
    const inProgress = new KanbanList({
      name: 'In Progress',
      cards: [
        {
          id: 2,
          status: 'In Progress',
          description: 'validations',
          icon: 'fa-check-square-o',
          effectiveDate: '2017-06-06',
          assignedTo: 'Sam'
        },
      ]
    })
    const waiting = new KanbanList({
      name: 'Waiting',
      cards: []
    })
    const done = new KanbanList({
      name: 'Done',
      cards: []
    })
    this.lists = [unassigned, inProgress, waiting, done]
  }
}