siva kumar ea62b1e3bd
[ACA-3416] Add Claim/Release actions on adf task form (#5753)
* [ACA-3255] FE - Claim a task

* * Added unit tests

* * Added unit tests
* Changed cloud directive names

* * Added/Updated documents

* * Added showReleaseClaim button flag
* Add unit test too

* * Used claim/release directive in task-header component.

* * Fixed unit test

* * Fixed one comment

* * After rebase

* * Fixed comments
2020-06-10 10:43:23 +01:00

59 lines
1.8 KiB
Markdown

---
Title: Task Header component
Added: v2.0.0
Status: Active
Last reviewed: 2019-01-14
---
# [Task Header component](../../../lib/process-services/src/lib/task-list/components/task-header.component.ts "Defined in task-header.component.ts")
Shows all the information related to a task.
![adf-task-header](../../docassets/images/adf-task-header.png)
## Basic Usage
```html
<adf-task-header
[taskDetails]="taskDetails">
</adf-task-header>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| formName | `string` | null | The name of the form. |
| taskDetails | [`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts) | | (required) Details related to the task. |
| showClaimRelease | `boolean` | true | Toggles display of the claim/release button. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| claim | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the task is claimed. |
| unclaim | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the task is unclaimed (ie, requeued). |
## Details
The component populates an internal array of
[CardViewModel](../../core/components/card-view.component.md) with the information that we want to display.
By default all properties are displayed:
**_assignee_**, **_status_**, **_priority_**, **_dueDate_**, **_category_**, **_parentName_**, **_created_**, **_id_**, **_description_**, **_formName_**.
However, you can also choose which properties to show using a configuration in `app.config.json`:
```json
"adf-task-header": {
"presets": {
"properties" : [ "assignee", "status", "priority", "parentName"]
}
},
```
With this configuration, only the four listed properties will be shown.