[ADF-2452] Task Standalone component (#3084)

* Add a new standalone component to show when there is no form attached to a task.
This commit is contained in:
camorra-skk
2018-03-20 17:53:19 +05:30
committed by Eugenio Romano
parent c578529b15
commit afb91cf062
11 changed files with 344 additions and 21 deletions

View File

@@ -0,0 +1,38 @@
---
Added: v2.0.0
Status: Active
---
# Task Standalone component
This component can be used when there is no form attached to a task.
## Contents
- [Basic Usage](#basic-usage)
- [Properties](#properties)
- [Events](#events)
## Basic Usage
```html
<adf-task-standalone
[taskName]= "taskname">
</adf-task-standalone>
```
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| taskName | `string` | | Name of the task |
| isCompleted | `boolean` | `false` | If true then Task completed message is shown and `Complete` and `Cancel` buttons are hidden |
| hasCompletePermission | `boolean` | `true` | Toggle rendering of the `Complete` button. |
| hideCancelButton | `boolean` | `true` | Toggle rendering of the `Cancel` button. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| cancel | `EventEmitter<void>` | Emitted when the `Cancel` button is clicked. |
| complete | `EventEmitter<void>` | Emitted when the form associated with the task is completed. |