From d972393b72ce75882adedfdddeb7c9b9a10e7428 Mon Sep 17 00:00:00 2001 From: Vito Date: Thu, 5 Jan 2017 06:53:39 -0800 Subject: [PATCH] #1259 - fix assignee for checklist task (#1395) * #1259 - fix assignee for checklist task * #1259 - added checklist to tasklist readme --- .../ng2-activiti-tasklist/README.md | 24 +++++++++++++++++++ .../activiti-checklist.component.ts | 10 ++++++-- .../activiti-task-details.component.html | 2 +- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/ng2-components/ng2-activiti-tasklist/README.md b/ng2-components/ng2-activiti-tasklist/README.md index 2eb7821a25..8c36a53110 100644 --- a/ng2-components/ng2-activiti-tasklist/README.md +++ b/ng2-components/ng2-activiti-tasklist/README.md @@ -329,6 +329,30 @@ The component shows all the available filters. No options +## Basic usage example Activiti Checklist + +The component shows the checklist task functionality. + +```html + +``` + +#### Options + +| Name | Type | Required | Description | +| --- | --- | --- | --- | +| `taskId` | {string} | required | The id of the parent task which sub tasks are attached on. | +| `readOnlyForm` | {boolean} | optional | Toggle readonly state of the form. Enforces all form widgets render readonly if enabled. | +| `assignee` | {string} | required | The assignee id where the subtasks are assigned to. | + +## Basic usage example Activiti Checklist + +The component shows all the available filters. + +```html + +``` + ## Build from sources Alternatively you can build component from sources with the following commands: diff --git a/ng2-components/ng2-activiti-tasklist/src/components/activiti-checklist.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/activiti-checklist.component.ts index 202c3e0055..cdff69d151 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/activiti-checklist.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/activiti-checklist.component.ts @@ -38,6 +38,9 @@ export class ActivitiChecklist implements OnInit, OnChanges { @Input() readOnly: boolean = false; + @Input() + assignee: string; + @ViewChild('dialog') dialog: any; @@ -104,7 +107,11 @@ export class ActivitiChecklist implements OnInit, OnChanges { } public add() { - let newTask = new TaskDetailsModel({name: this.taskName, parentTaskId: this.taskId, assignee: {id: '1'}}); + let newTask = new TaskDetailsModel({ + name: this.taskName, + parentTaskId: this.taskId, + assignee: { id: this.assignee } + }); this.activitiTaskList.addTask(newTask).subscribe( (res: TaskDetailsModel) => { this.checklist.push(res); @@ -113,7 +120,6 @@ export class ActivitiChecklist implements OnInit, OnChanges { console.log(err); } ); - this.cancel(); } diff --git a/ng2-components/ng2-activiti-tasklist/src/components/activiti-task-details.component.html b/ng2-components/ng2-activiti-tasklist/src/components/activiti-task-details.component.html index c59d74e9c8..e65cce9585 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/activiti-task-details.component.html +++ b/ng2-components/ng2-activiti-tasklist/src/components/activiti-task-details.component.html @@ -23,7 +23,7 @@ #activiticomments>
-