mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-1152] Making sure the people and group widget is working fine as part of form (#5322)
* Making sure the people and group widget is working fine as part of the form * Be able to save a form with people and group * Fix tslint * Fix html error * Fix unit test
This commit is contained in:
committed by
Eugenio Romano
parent
d8b703b6ef
commit
88d89b4ca8
@@ -173,7 +173,7 @@ export class IdentityGroupService {
|
||||
* @param searchParams Object containing the name filter string
|
||||
* @returns List of group information
|
||||
*/
|
||||
findGroupsByName(searchParams: IdentityGroupSearchParam): Observable<any> {
|
||||
findGroupsByName(searchParams: IdentityGroupSearchParam): Observable<IdentityGroupModel[]> {
|
||||
if (searchParams.name === '') {
|
||||
return of([]);
|
||||
}
|
||||
@@ -181,12 +181,17 @@ export class IdentityGroupService {
|
||||
const httpMethod = 'GET', pathParams = {}, queryParams = {search: searchParams.name}, bodyParam = {}, headerParams = {},
|
||||
formParams = {}, contentTypes = ['application/json'], accepts = ['application/json'];
|
||||
|
||||
return (from(this.alfrescoApiService.getInstance().oauth2Auth.callCustomApi(
|
||||
return from(this.alfrescoApiService.getInstance().oauth2Auth.callCustomApi(
|
||||
url, httpMethod, pathParams, queryParams,
|
||||
headerParams, formParams, bodyParam,
|
||||
contentTypes, accepts, Object, null, null)
|
||||
)).pipe(
|
||||
catchError((error) => this.handleError(error))
|
||||
).pipe(
|
||||
map((response: []) => {
|
||||
return response.map( (group: IdentityGroupModel) => {
|
||||
return {id: group.id, name: group.name};
|
||||
});
|
||||
}),
|
||||
catchError((err) => this.handleError(err))
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user