diff options
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search')
3 files changed, 21 insertions, 39 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.html index 5f131fb6..a6682306 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.html @@ -50,12 +50,12 @@ <ng-container matColumnDef="Last Name"> <th mat-header-cell *matHeaderCellDef id="heading2"> {{userHeaders[1]}} </th> - <td mat-cell *matCellDef="let rowData"> {{rowData.lastName}} </td> + <td mat-cell *matCellDef="let rowData"> {{rowData.last_name}} </td> </ng-container> <ng-container matColumnDef="First Name"> <th mat-header-cell *matHeaderCellDef id="heading3">{{userHeaders[2]}} </th> - <td mat-cell *matCellDef="let rowData"> {{rowData.firstName}}</td> + <td mat-cell *matCellDef="let rowData"> {{rowData.first_name}}</td> </ng-container> <ng-container matColumnDef="Email"> @@ -63,12 +63,12 @@ <td mat-cell *matCellDef="let rowData" > {{rowData.email}} </td> </ng-container> - <ng-container matColumnDef="orgUserId"> + <ng-container matColumnDef="Org User ID"> <th mat-header-cell *matHeaderCellDef id="heading4"> {{userHeaders[4]}} </th> <td mat-cell *matCellDef="let rowData" > {{rowData.orgUserId}} </td> </ng-container> - <ng-container matColumnDef="orgManagerUserId"> + <ng-container matColumnDef="Org Manager User ID"> <th mat-header-cell *matHeaderCellDef id="heading4"> {{userHeaders[5]}} </th> <td mat-cell *matCellDef="let rowData" > {{rowData.orgManagerUserId}} </td> </ng-container> @@ -86,7 +86,7 @@ <ng-container matColumnDef="Active?"> <th mat-header-cell *matHeaderCellDef id="heading6"> {{userHeaders[7]}} </th> <td mat-cell *matCellDef="let rowData"> - <mat-slide-toggle [(ngModel)]="rowData.active" (change)="toggleUserActive(rowData)"></mat-slide-toggle> + <mat-slide-toggle [checked]="(rowData.active_yn =='Y' || rowData.active_yn == true) ? true : false" (change)="toggleUserActive(rowData,$event)"></mat-slide-toggle> </td> </ng-container> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss index 3b9e9d3b..ec84c3b0 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss @@ -37,35 +37,18 @@ */ table { - width: 100%; - } - - .mat-form-field { - font-size: 14px; - width: 100%; - } - - td, th { - width: 25%; - } - .mat-form-field[_ngcontent-c4] { - font-size: 14px; - width: 20%; - float: right; - } + width: 100%; +} - /*td.mat-cell, td.mat-footer-cell{ - padding: 0; - border-bottom-width: 1px; - border-bottom-style: solid; - border-right-style: solid; - border-right-color: rgba(0,0,0,.12); - border-right-width: 1px; - } -*/ +::ng-deep .mat-header-cell{ + font-weight: bold; + font-size: 14px; + color: #343a40; +} -td[_ngcontent-c4], th[_ngcontent-c4] { - width: 15%; +::ng-deep .mat-form-field[_ngcontent-c4] { + font-size: 14px; + width: 20%; } #edit-button{ 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) => { |