In my codebase, I have an entity named Epic which contains a method called pendingTasks() within a class.
import { Solution } from '../solutions.model';
import { PortfolioKanban } from '../kanban/portfolio-kanban.model';
import { Kanbanitem } from '../kanban/kanbanitem';
import { Task, TaskStatus } from '../kanban/Task';
export interface EpicConstructor {
new (
id: string,
name: string,
description: string,
code: string,
entryDate: Date,
state: string,
columnID: string,
kanbanId: string,
outcome: string,
owner: string,
tasks?: Task[]
): Epic;
}
export function createEpic(
ector: EpicConstructor,
id: string,
name: string,
description: string,
code: string,
entryDate: Date,
state: string,
columnID: string,
kanbanId: string,
outcome: string,
owner: string,
tasks?: Task[]
) {
return new ector(
id,
name,
description,
code,
entryDate,
state,
columnID,
kanbanId,
outcome,
owner,
tasks
);
}
export class Epic implements Kanbanitem {
id: string;
code: string;
description;
entryDate: Date;
state: string;
name: string;
outcome?: string;
owner: string;
kanban?: PortfolioKanban;
kanbanId: string;
columnId: string;
tasks?: Task[];
constructor(
...
I'm utilizing ngrx and redux to retrieve initial epics from the Store. Here's how I accomplish this:
...