alfresco-ng2-components/docs/process-services-cloud/edit-task-filter-cloud.component.md
siva kumar ea733fc996 [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
2019-01-29 12:48:11 +00:00

3.1 KiB

Title, Added, Status, Last reviewed
Title Added Status Last reviewed
Edit Task Filter Cloud component v3.0.0 Experimental 2019-01-08

Edit Task Filter Cloud component

Edits Task Filter Details.

Basic Usage

<adf-cloud-edit-task-filter 
    [id]="taskFilterId"
    [appName]="applicationName">
</adf-cloud-edit-task-filter>

Class members

Properties

Name Type Default value Description
appName string (required) Name of the app.
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

Name Type Description
action EventEmitter<FilterActionType> Emitted when a filter action occurs (i.e Save, Save As, Delete).
filterChange EventEmitter<TaskFilterCloudModel> Emitted when an task filter property changes.

Details

Editing APS2 task filter

Use the appName and id properties to edit task filter properties:

<adf-cloud-edit-task-filter
    [id]="taskFilterId"
    [appName]="applicationName">
</adf-cloud-edit-task-filter>

By default these below properties are displayed:

state, assignment, sort, order.

However, you can also choose which properties to show using the filterProperties input property:

Populate the filterProperties in the component class:

import { UserProcessModel } from '@alfresco/adf-core';

export class SomeComponent implements OnInit {

    filterProperties: string[] = [
        "appName",
        "processInstanceId",
        "createdDateTo",
        "lastModifiedTo"];

    onFilterChange(filter: TaskFilterCloudModel) {
        console.log('On filter change: ', filter);
    }

    onAction($event: FilterActionType) {
        console.log('Clicked action: ', $event);
    }

With this configuration, only the four listed properties will be shown.

<adf-cloud-edit-task-filter
    [id]="taskFilterId"
    [appName]="applicationName"
    [filterProperties]="filterProperties"
    (filterChange)="onFilterChange($event)"
    (action)="onAction($event)">
</adf-cloud-edit-task-filter>

The available properties are:

appName, state, assignment, sort, order, processDefinitionId, processInstanceId, taskName, parentTaskId, priority, standAlone, lastModifiedFrom, lastModifiedTo, owner.

edit-task-filter-cloud