summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts13
1 files changed, 6 insertions, 7 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts
index 9ae59ca8..734aaf09 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts
@@ -57,14 +57,13 @@ export class SearchComponent implements OnInit {
response: any;
result: any;
profileList:any;
- userHeaders = ["User ID","Last Name","First Name","Email","orgUserId","orgManagerUserId","Edit","Active?"];
+ userHeaders = ["User ID","Last Name","First Name","Email","Org User ID","Org Manager User ID","Edit","Active?"];
constructor(public profileservice:ProfileService, public ngbModal: NgbModal,private _router: Router) { }
dataSource: MatTableDataSource<[]>;
@ViewChild(MatPaginator, {}) paginator: MatPaginator;
@ViewChild(MatSort, {}) sort: MatSort;
-
ngOnInit() {
this.getUsers();
}
@@ -72,7 +71,7 @@ export class SearchComponent implements OnInit {
getUsers(){
this.showSpinner = true;
let response;
- this.response = this.profileservice.getUserPagination();
+ this.response = this.profileservice.getAllUsers();
this.response.subscribe(data => {
response = data;
this.result = JSON.parse(response.data);
@@ -84,9 +83,9 @@ export class SearchComponent implements OnInit {
});
}
- toggleUserActive(user){
- let activeOrInactive = (user.active) ? 'activate' : 'inactivate';
- let confirmationMsg = 'You are about to ' + activeOrInactive + ' the user ' + user.firstName +" "+user.lastName+ '. Do you want to continue?';
+ toggleUserActive(user, e){
+ let activeOrInactive = (e.checked) ? 'activate' : 'inactivate';
+ let confirmationMsg = 'You are about to ' + activeOrInactive + ' the user ' + user.first_name +" "+user.last_name+ '. Do you want to continue?';
const modalInfoRef = this.ngbModal.open(InformationModalComponent);
modalInfoRef.componentInstance.title = 'Confirmation';
modalInfoRef.componentInstance.message = confirmationMsg;
@@ -104,7 +103,7 @@ export class SearchComponent implements OnInit {
this.openConfirmationModal("Error",error);
});
} else {
- user.active = !user.active;
+ this.ngOnInit();
}
}, (result) => {