Skip to content
Snippets Groups Projects
Commit 7937bcf2 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #10568 TIME 1:00 fix rest user in autocomplete in group admin

parent 359b0c62
No related branches found
No related tags found
No related merge requests found
......@@ -153,7 +153,7 @@
<div class="row" style="margin:0px;">
<div class="col-md-12" *ngIf="group.canAdminUsers" style="padding:5px;">
<plugin-autocomplete [labelPlaceholder]="lang.linkUser"
[labelList]="lang.availableUsers" [routeDatas]="['/rest/autocomplete/users']"
[labelList]="lang.availableUsers" [routeDatas]="['/rest/autocomplete/users/administration']"
[targetSearchKey]="'idToDisplay'" [subInfoKey]="'id'"
(triggerEvent)="linkUser($event)"></plugin-autocomplete>
<hr />
......
......@@ -354,14 +354,15 @@ export class GroupAdministrationComponent implements OnInit {
'groupId': this.group.group_id,
'role': this.group.role
};
this.http.post('../rest/users/' + newUser.serialId + '/groups', groupReq)
this.http.post('../rest/users/' + newUser.id + '/groups', groupReq)
.subscribe(() => {
const displayName = newUser.idToDisplay.split(' ');
const user = {
id: newUser.id,
user_id: newUser.otherInfo,
firstname: displayName[0],
lastname: displayName[1]
lastname: displayName[1],
allowed: true
};
this.group.users.push(user);
this.usersDataSource = new MatTableDataSource(this.group.users);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment