feat(console): show user/project on new auth input (#5116)

Prefills user and project searchfields with results for authorization creation
This commit is contained in:
Miguel Cabrerizo
2023-02-02 10:29:36 +01:00
committed by GitHub
parent 5704c44117
commit 1fa50c8074
3 changed files with 41 additions and 3 deletions
@@ -64,6 +64,15 @@ export class SearchUserAutocompleteComponent implements OnInit, AfterContentChec
this.filteredUsers = [];
this.unsubscribed$.next(); // clear old subscription
} else if (this.target === UserTarget.SELF) {
// feat-3916 show users as soon as I am in the input field of the user
const query = new SearchQuery();
const lnQuery = new LoginNameQuery();
lnQuery.setMethod(TextQueryMethod.TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE);
query.setLoginNameQuery(lnQuery);
this.userService.listUsers(10, 0, [query]).then((users) => {
this.filteredUsers = users.resultList;
});
this.getFilteredResults(); // new subscription
}
}