[ADF-1749] Task/Process List - Should be able to customize the rendered columns from JSON (#2613)

* [ADF-1749] Task List - Should be able to customize the rendered columns from JSON

* Refactored task/process list components to support customization key's
* Added Key properties to the app.config.json.
* Created preset model for task/process list .

* [ADF-1749] Task/Process List - Should be able to customize the rendered columns from JSON

* Fixed failing testcases.

* [ADF-1749] Task/Process List - Should be able to customize the rendered columns from JSON.

* Added test cases.
* Updated task/process list readme.md file

* * Updated task/process list readme.md file.
This commit is contained in:
siva kumar
2017-11-08 05:07:07 +05:30
committed by Eugenio Romano
parent 348f4971ce
commit 3204bdebcb
11 changed files with 454 additions and 35 deletions

View File

@@ -26,12 +26,45 @@ This component renders a list containing all the process instances matched by th
</adf-process-instance-list>
```
You can also use custom schema declaration as shown below:
define custom schema in the app.config.json as shown below json format.
```json
"adf-process-list": {
"presets": {
"customSchema": [
{
"key": "name",
"type": "text",
"title": "name",
"sortable": true
}],
"default": [
{
"key": "name",
"type": "text",
"title": "name",
"sortable": true
}],
}
}
```
```html
<adf-process-instance-list
[appId]="'1'"
[state]="'open'"
[presetColumn]="'customSchema'">
</adf-process-instance-list>
```
### Properties
| Name | Description |
| --- | --- |
| appId | The id of the app. |
| processDefinitionKey | The processDefinitionKey of the process. |
| presetColumn | string || The presetColumn of the custom schema to fetch. |
| state | Define state of the processes. Possible values are `running`, `completed` and `all` |
| sort | Define sort of the processes. Possible values are `created-desc`, `created-asc`, `ended-desc`, `ended-asc` |
| schemaColumn | List of columns to display in the process instances datatable (see the [Details](#details) section below) |

View File

@@ -23,6 +23,36 @@ You can also use HTML-based schema declaration like shown below:
</adf-tasklist>
```
You can also use custom schema declaration as shown below:
define custom schema in the app.config.json as shown below json format.
```json
"adf-task-list": {
"presets": {
"customSchema": [
{
"key": "name",
"type": "text",
"title": "name",
"sortable": true
}],
"default": [
{
"key": "name",
"type": "text",
"title": "name",
"sortable": true
}],
}
}
```
```html
<adf-tasklist
[appId]="'1'"
[presetColumn]="'customSchema'">
</adf-tasklist>
```
### Properties
| Name | Type | Default | Description |
@@ -30,6 +60,7 @@ You can also use HTML-based schema declaration like shown below:
| appId | string || The id of the app. |
| processDefinitionKey | string || The processDefinitionKey of the process. |
| processInstanceId | string || The processInstanceId of the process. |
| presetColumn | string || The presetColumn of the custom schema to fetch. |
| page | number | 0 | The page of the tasks to fetch. |
| size | number | 5 | The number of tasks to fetch. |
| assignment | string || The assignment of the process. <ul>Possible values are: <li>assignee : where the current user is the assignee</li> <li>candidate: where the current user is a task candidate </li><li>group_x: where the task is assigned to a group where the current user is a member of.</li> <li>no value: where the current user is involved</li> </ul> |