#1259 - fix assignee for checklist task (#1395)

* #1259 - fix assignee for checklist task

* #1259 - added checklist to tasklist readme
This commit is contained in:
Vito 2017-01-05 06:53:39 -08:00 committed by Denys Vuika
parent 560d1bcd7f
commit d972393b72
3 changed files with 33 additions and 3 deletions

View File

@ -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
<activiti-checklist></activiti-checklist>
```
#### 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
<activiti-checklist [readOnly]="false" [taskId]="taskId" [assignee]="taskAssignee.id" #activitichecklist></activiti-checklist>
```
## Build from sources
Alternatively you can build component from sources with the following commands:

View File

@ -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();
}

View File

@ -23,7 +23,7 @@
#activiticomments></activiti-comments>
</div>
<div class="mdl-cell mdl-cell--4-col">
<activiti-checklist [readOnly]="readOnlyForm" [taskId]="taskDetails.id"
<activiti-checklist [readOnly]="readOnlyForm" [taskId]="taskDetails.id" [assignee]="taskDetails?.assignee?.id"
#activitichecklist></activiti-checklist>
</div>
</div>