mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
upgrade to latest js api
This commit is contained in:
@@ -436,7 +436,7 @@ export class FormService {
|
||||
* @param userId ID of the target user
|
||||
* @returns URL string
|
||||
*/
|
||||
getUserProfileImageApi(userId: number): string {
|
||||
getUserProfileImageApi(userId: string): string {
|
||||
return this.apiService.getInstance().activiti.userApi.getUserProfilePictureUrl(userId);
|
||||
}
|
||||
|
||||
@@ -453,9 +453,9 @@ export class FormService {
|
||||
}
|
||||
return from(this.usersWorkflowApi.getUsers(option))
|
||||
.pipe(
|
||||
switchMap((response: any) => <UserProcessModel[]> response.data || []),
|
||||
map((user: any) => {
|
||||
user.userImage = this.getUserProfileImageApi(user.id);
|
||||
switchMap(response => <UserProcessModel[]> response.data || []),
|
||||
map((user) => {
|
||||
user.userImage = this.getUserProfileImageApi(user.id.toString());
|
||||
return of(user);
|
||||
}),
|
||||
combineAll(),
|
||||
|
@@ -28,6 +28,7 @@ export class UserProcessModel implements LightUserRepresentation {
|
||||
lastName?: string;
|
||||
pictureId?: number;
|
||||
externalId?: string;
|
||||
userImage?: string;
|
||||
|
||||
constructor(input?: any) {
|
||||
if (input) {
|
||||
@@ -37,6 +38,7 @@ export class UserProcessModel implements LightUserRepresentation {
|
||||
this.lastName = input.lastName || null;
|
||||
this.pictureId = input.pictureId || null;
|
||||
this.externalId = input.externalId || null;
|
||||
this.userImage = input.userImage;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -52,7 +52,7 @@ export class PeopleProcessService {
|
||||
* @returns Profile picture URL
|
||||
*/
|
||||
getUserImage(user: UserProcessModel): string {
|
||||
return this.getUserProfileImageApi(user.id);
|
||||
return this.getUserProfileImageApi(user.id.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,7 +95,7 @@ export class PeopleProcessService {
|
||||
return this.alfrescoJsApi.getInstance().activiti.taskActionsApi.removeInvolvedUser(taskId, node);
|
||||
}
|
||||
|
||||
private getUserProfileImageApi(userId: number) {
|
||||
private getUserProfileImageApi(userId: string): string {
|
||||
return this.alfrescoJsApi.getInstance().activiti.userApi.getUserProfilePictureUrl(userId);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user