mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-3308] ProcessList Component - Provide a way to filter the list by fields (#3629)
* [ADF-3308] Removed name input added two inputs * * [ADF-3308] Modified demo component * [ADF-3367] Modified docs * [ADF-3308] Added tests * [ADF-3308] Deprecated processDefinitionKey property
This commit is contained in:
committed by
Eugenio Romano
parent
7173a620de
commit
50e5e7a36a
@@ -69,10 +69,20 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
||||
@Input()
|
||||
appId: number;
|
||||
|
||||
/** The processDefinitionKey of the process. */
|
||||
/** The Definition Key of the process.
|
||||
* @deprecated 2.4.0
|
||||
*/
|
||||
@Input()
|
||||
processDefinitionKey: string;
|
||||
|
||||
/** The Definition Id of the process. */
|
||||
@Input()
|
||||
processDefinitionId: string;
|
||||
|
||||
/** The id of the process instance. */
|
||||
@Input()
|
||||
processInstanceId: number|string;
|
||||
|
||||
/** Defines the state of the processes. Possible values are `running`, `completed` and `all` */
|
||||
@Input()
|
||||
state: string;
|
||||
@@ -83,10 +93,6 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
||||
@Input()
|
||||
sort: string;
|
||||
|
||||
/** The name of the list. */
|
||||
@Input()
|
||||
name: string;
|
||||
|
||||
/** The page number of the processes to fetch. */
|
||||
@Input()
|
||||
page: number = 0;
|
||||
@@ -191,22 +197,25 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
||||
|
||||
let appId = changes['appId'];
|
||||
let processDefinitionKey = changes['processDefinitionKey'];
|
||||
let processDefinitionId = changes['processDefinitionId'];
|
||||
let processInstanceId = changes['processInstanceId'];
|
||||
let state = changes['state'];
|
||||
let sort = changes['sort'];
|
||||
let name = changes['name'];
|
||||
let page = changes['page'];
|
||||
let size = changes['size'];
|
||||
|
||||
if (appId && appId.currentValue) {
|
||||
changed = true;
|
||||
} else if (processDefinitionKey && processDefinitionKey.currentValue) {
|
||||
} else if (processDefinitionKey) {
|
||||
changed = true;
|
||||
} else if (processDefinitionId) {
|
||||
changed = true;
|
||||
} else if (processInstanceId) {
|
||||
changed = true;
|
||||
} else if (state && state.currentValue) {
|
||||
changed = true;
|
||||
} else if (sort && sort.currentValue) {
|
||||
changed = true;
|
||||
} else if (name && name.currentValue) {
|
||||
changed = true;
|
||||
} else if (page && page.currentValue !== page.previousValue) {
|
||||
changed = true;
|
||||
} else if (size && size.currentValue !== size.previousValue) {
|
||||
@@ -371,6 +380,8 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
||||
private createRequestNode() {
|
||||
let requestNode = {
|
||||
appDefinitionId: this.appId,
|
||||
processDefinitionId: this.processDefinitionId,
|
||||
processInstanceId: this.processInstanceId,
|
||||
state: this.state,
|
||||
sort: this.sort,
|
||||
page: this.page,
|
||||
|
Reference in New Issue
Block a user