mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3883] Improve edit-process-filter-cloud by adding inputs to control filters, sort and actions (#4127)
* [ADF-3883] Improve edit-process-filter-cloud by adding inputs to control filters, sort and actions * Fixed translate keys * * Added more properties to the editProcessModel * Fix FIlterOption model * Fix import model name * * After rebase* Cherry pick * Updated doc * Revert commit * Revert changes * * Removed obervalu from model* Added edit process/task filter to the demo shell* Refacotred edit task/process filter * Updated test to the recent changes * * Fixed failing e2e tests * Added data-automation-id * * After rebase * * Modified ProcessFilterActionType model* Added condition to get the currect filter after save as* Changed column to sort in the en.json, removed unused keys* Improved onSave editProcessfilter method * imported missing groupModule in the process-service-cloud module * * Fixed e2e test
This commit is contained in:
committed by
Maurizio Vitale
parent
618929cefb
commit
ea733fc996
@@ -24,8 +24,11 @@ Shows Process Filter Details.
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| appName | `string` | | The name of the application. |
|
||||
| id | `string` | | Id of the process instance filter. |
|
||||
| appName | `string` | | (required) The name of the application. |
|
||||
| id | `string` | | (required) Id of the process instance filter. |
|
||||
| filterProperties | `string []` | `['state', 'sort', 'order']` | List of process filter properties to display. |
|
||||
| showFilterActions | `boolean` | `true` | Toggles edit process filter actions. |
|
||||
| showTitle | `boolean` | `true` | Toggles edit process filter title. |
|
||||
|
||||
### Events
|
||||
|
||||
@@ -38,7 +41,7 @@ Shows Process Filter Details.
|
||||
|
||||
### Editing APS2 process filter
|
||||
|
||||
Use the process filter id property to edit process filter properties:
|
||||
Use the application name and process filter id property to edit process filter properties:
|
||||
|
||||
```html
|
||||
<adf-cloud-edit-process-filter
|
||||
@@ -46,5 +49,50 @@ Use the process filter id property to edit process filter properties:
|
||||
[appName]="applicationName">
|
||||
</adf-cloud-edit-process-filter>
|
||||
```
|
||||
By default these below properties are displayed:
|
||||
|
||||
**_state_**, **_sort_**, **_order_**.
|
||||
|
||||
However, you can also choose which properties to show using an input property
|
||||
`filterProperties`:
|
||||
|
||||
Populate the filterProperties in the component class:
|
||||
|
||||
```ts
|
||||
import { UserProcessModel } from '@alfresco/adf-core';
|
||||
|
||||
export class SomeComponent implements OnInit {
|
||||
|
||||
filterProperties: string[] = [
|
||||
"appName",
|
||||
"processInstanceId",
|
||||
"startDate",
|
||||
"startedAfter"];
|
||||
|
||||
onFilterChange(filter: ProcessFilterCloudModel) {
|
||||
console.log('On filter change: ', filter);
|
||||
}
|
||||
|
||||
onAction($event: ProcessFilterActionType) {
|
||||
console.log('Clicked action: ', $event);
|
||||
}
|
||||
```
|
||||
|
||||
With this configuration, only the four listed properties will be shown.
|
||||
|
||||
```html
|
||||
<adf-cloud-edit-process-filter
|
||||
[id]="processFilterId"
|
||||
[appName]="applicationName"
|
||||
[filterProperties]="filterProperties"
|
||||
(filterChange)="onFilterChange($event)"
|
||||
(action)="onAction($event)">
|
||||
</adf-cloud-edit-process-filter>
|
||||
```
|
||||
|
||||
|
||||
All Available properties are:
|
||||
|
||||
**_appName_**, **_initiator_**, **_state_**, **_sort_**, **_order_**, **_processDefinitionId_**, **_processDefinitionKey_**, **_processInstanceId_**, **_startDate_**, **_lastModified_**, **_lastModifiedFrom_**, **_lastModifiedTo_**.
|
||||
|
||||

|
||||
|
@@ -25,10 +25,10 @@ Edits Task Filter Details.
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| appName | `string` | | (required) Name of the app. |
|
||||
| filterProperties | `string[]` | | List of task filter properties to display. |
|
||||
| id | `string` | | (required) ID of the task filter. |
|
||||
| showTitle | `boolean` | true | Toggles the title. |
|
||||
| toggleFilterActions | `boolean` | true | Toggles the filter actions. |
|
||||
| id | `string` | "" | (required) The id of the Task filter. |
|
||||
| filterProperties | `string []` | `['state', 'assignment', 'sort', 'order']` | List of task filter properties to display. |
|
||||
| showFilterActions | `boolean` | `true` | Toggles edit task filter actions. |
|
||||
| showTitle | `boolean` | `true` | Toggles edit task filter title. |
|
||||
|
||||
### Events
|
||||
|
||||
|
Reference in New Issue
Block a user