Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update managers #173

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,12 @@ <h3>{{ 'DOMAINS.LIST.GROUP' | translate }}</h3>
</nmaas-modal>

<nmaas-modal styleModal="info" #userAccess>
<div class="nmaas-modal-header">{{'DOMAINS.GROUP.ACCESS_USER' | translate}}</div>
<div class="nmaas-modal-header">{{'DOMAINS.GROUP.ADD_MANAGERS' | translate}}</div>
<div class="nmaas-modal-body" style="height: 300px">
<div style="height: 100px">
<p>{{'DOMAINS.GROUP.ADD_INFO' | translate}}</p>
<input pInputText name="searchTexUser" id="searchTextUser" placeholder="Search" type="text" (keyup)="searchUsers($event.target.value)">
<p>{{'DOMAINS.GROUP.ADD_INFO' | translate}} {{domainGroup.name}}</p>
<input pInputText name="searchTexUser" id="searchTextUser" placeholder="{{'USERS.SEARCH' | translate}}" type="text" (keyup)="searchUsers($event.target.value)">
</div>
<!-- <h4>{{'DOMAINS.GROUP.FOUND_USERS' | translate}}</h4>-->
<table class="table table-hover table-condensed" aria-describedby="Users found by mail">
<thead>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class DomainGroupViewComponent extends BaseComponent implements OnInit {
if (search === '') {
this.usersFound = [];
} else {
this.userService.getUserBySearchGlobal(search ).subscribe(data => {
this.userService.getUserBySearchManagers(search ).subscribe(data => {
this.usersFound = [];
const ids = this.domainGroup.managers.flatMap(val => val.id);
const idsLocalAdded = this.usersToAdd.flatMap(val => val.id);
Expand Down
6 changes: 6 additions & 0 deletions src/app/service/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,10 @@ export class UserService extends GenericDataService {
params = params.append('searchPart', search);
return this.http.get<User[]>(`${this.appConfig.getApiUrl()}/users/search`, {params})
}

public getUserBySearchManagers(search: string): Observable<User[]> {
let params = new HttpParams();
params = params.append('searchPart', search);
return this.http.get<User[]>(`${this.appConfig.getApiUrl()}/users/search/managers`, {params})
}
}