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
|
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
|
## Build from sources
|
||||||
|
|
||||||
Alternatively you can build component from sources with the following commands:
|
Alternatively you can build component from sources with the following commands:
|
||||||
|
@ -38,6 +38,9 @@ export class ActivitiChecklist implements OnInit, OnChanges {
|
|||||||
@Input()
|
@Input()
|
||||||
readOnly: boolean = false;
|
readOnly: boolean = false;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
assignee: string;
|
||||||
|
|
||||||
@ViewChild('dialog')
|
@ViewChild('dialog')
|
||||||
dialog: any;
|
dialog: any;
|
||||||
|
|
||||||
@ -104,7 +107,11 @@ export class ActivitiChecklist implements OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public add() {
|
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(
|
this.activitiTaskList.addTask(newTask).subscribe(
|
||||||
(res: TaskDetailsModel) => {
|
(res: TaskDetailsModel) => {
|
||||||
this.checklist.push(res);
|
this.checklist.push(res);
|
||||||
@ -113,7 +120,6 @@ export class ActivitiChecklist implements OnInit, OnChanges {
|
|||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
this.cancel();
|
this.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#activiticomments></activiti-comments>
|
#activiticomments></activiti-comments>
|
||||||
</div>
|
</div>
|
||||||
<div class="mdl-cell mdl-cell--4-col">
|
<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>
|
#activitichecklist></activiti-checklist>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user