mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
* #1259 - fix assignee for checklist task * #1259 - added checklist to tasklist readme
This commit is contained in:
parent
560d1bcd7f
commit
d972393b72
@ -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:
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user