mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
#ADF-780 Fixed getProcessFilterByName to get the correct filter for the given appId and name (#1952)
This commit is contained in:
committed by
Eugenio Romano
parent
a02ba4ad71
commit
969658891d
@@ -96,13 +96,14 @@ export class ActivitiProcessService {
|
||||
|
||||
/**
|
||||
* Retrieve the process filter by name
|
||||
* @param processName - string - The name of the filter
|
||||
* @param filterName - string - The name of the filter
|
||||
* @param appId - string - optional - The id of app
|
||||
* @returns {Observable<FilterProcessRepresentationModel>}
|
||||
*/
|
||||
getProcessFilterByName(processName: string, appId?: string): Observable<FilterProcessRepresentationModel> {
|
||||
getProcessFilterByName(filterName: string, appId?: string): Observable<FilterProcessRepresentationModel> {
|
||||
return Observable.fromPromise(this.callApiProcessFilters(appId))
|
||||
.map((response: any) => {
|
||||
return response.data.find(filter => filter.name === processName);
|
||||
return response.data.find(filter => filter.name === filterName);
|
||||
}).catch(err => this.handleError(err));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user