summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts27
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.service.ts41
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/self/self.component.html34
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/self/self.component.ts13
4 files changed, 74 insertions, 41 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts
index 1b22cf28..9df51b51 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts
@@ -42,12 +42,23 @@ import { HttpClient } from '@angular/common/http';
import { RdpCrudInterface } from 'portalsdk-tag-lib';
import { environment } from 'src/environments/environment';
import { AdminService } from '../admin.service';
+import { BehaviorSubject } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class MenusService implements RdpCrudInterface {
+ public statusResponse = new BehaviorSubject("");
+ public updatedData = new BehaviorSubject<any>({});
+
+ loadTableData(filter: any, sortActive: any, sortDirection: any, pageIndex: any, pageSize: any): import("rxjs").Observable<any[]> {
+ throw new Error("Method not implemented.");
+ }
+ getTotalRowCount() {
+ throw new Error("Method not implemented.");
+ }
+
parentDataList: any;
constructor(private http: HttpClient, private adminService: AdminService) {
@@ -108,6 +119,7 @@ export class MenusService implements RdpCrudInterface {
this.adminService.updateFnMenuItem(postData)
.subscribe(_data => {
console.log("Response : ", _data);
+ this.statusResponse.next("200");
}, error => {
console.log("Error : ", error);
});
@@ -122,6 +134,9 @@ export class MenusService implements RdpCrudInterface {
let result = { availableFnMenuItem: data };
this.adminService.deleteMenu(result).subscribe(response => {
console.log("Response ", response);
+ this.statusResponse.next("200");
+ }, error =>{
+ console.log("Error : ", error);
})
}
@@ -133,7 +148,15 @@ export class MenusService implements RdpCrudInterface {
}
}
- get(data: any) {
- console.log("get method is getting called from AppServie data:: ", data);
+ get() {
+ console.log("get method is getting called from AppServie data:: ");
+ let response = this.adminService.getFnMenuItems();
+ let resp;
+ response.subscribe(res => {
+ console.log("Get Response : ", res);
+ resp = res;
+ console.log("edited : ",JSON.parse(resp.data).fnMenuItems);
+ this.updatedData.next(JSON.parse(resp.data).fnMenuItems);
+ })
}
}
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.service.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.service.ts
index 9d931d1d..b0595361 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.service.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.service.ts
@@ -1,34 +1,57 @@
import { Injectable } from '@angular/core';
import { RdpCrudInterface } from 'portalsdk-tag-lib';
import { AdminService } from '../admin.service';
+import { BehaviorSubject } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class RoleFunctionsService implements RdpCrudInterface {
+ public statusResponse = new BehaviorSubject("");
+ public updatedData = new BehaviorSubject<any>({});
+
+ loadTableData(filter: any, sortActive: any, sortDirection: any, pageIndex: any, pageSize: any): import("rxjs").Observable<any[]> {
+ throw new Error("Method not implemented.");
+ }
+ getTotalRowCount() {
+ throw new Error("Method not implemented.");
+ }
+
constructor(private adminService: AdminService) { }
add(data: any) {
- console.log("Add method is getting called from AppServie data:: ", data);
+ console.log("Add method is getting called from RoleFunctionService data:: ", data);
}
- update(data: any) {
- console.log("Update method is getting called from MenusService data:: ", data);
- this.adminService.saveRoleFunction(data).subscribe(response => {
- console.log(response);
+ update(data: any): any {
+ console.log("Update method is getting called from RoleFunctionService data:: ", data);
+ return this.adminService.saveRoleFunction(data).subscribe(response => {
+ console.log("Success Response ", response);
+ this.statusResponse.next("200");
+ }, error => {
+ console.log("Error ", error);
})
}
delete(data: any) {
- console.log("Delete method is getting called from AppServie data::>> " + JSON.stringify(data));
+ console.log("Delete method is getting called from RoleFunctionService data::>> " + JSON.stringify(data));
this.adminService.deleteRoleFunction(data).subscribe(response => {
- console.log("Repsonse : ",response);
+ console.log("Repsonse : ", response);
+ this.statusResponse.next("200");
+
})
}
- get(data: any) {
- console.log("get method is getting called from AppServie data:: ", data);
+ get() {
+ let response = this.adminService.getRoleFunctionList();
+ let editedData;
+ response.subscribe(res => {
+ editedData = res;
+ let data = JSON.parse(JSON.parse(editedData.data).availableRoleFunctions);
+ console.log("Get Method called : ", data);
+ this.updatedData.next(data);
+ })
}
}
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/self/self.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/self/self.component.html
index c0611493..846dae52 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/self/self.component.html
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/self/self.component.html
@@ -59,14 +59,16 @@
</div>
</div>
<div class="form-row">
- <label for="textinputID-3a">Organization User ID</label>&nbsp;
+ <label for="textinputID-3a">Organization User ID</label>&nbsp;<a style="cursor: hand;" target="_new"
+ href="http://webphone.att.com/cgi-bin/webphones.pl?id={{profile.orgUserId}}">wephone</a>
<input [(ngModel)]="profile.orgUserId" type="text" name="orgUserId" class="form-control" id="orgUserId"
style="width: 100%;" disabled="true">
</div>
<div class="form-row">
<label for="textinputID-3a">Organization Manager ID</label>
- &nbsp;
+ &nbsp;<a style="cursor: hand;" target="_new"
+ href="http://webphone.att.com/cgi-bin/webphones.pl?id={{profile.orgManagerUserId}}">wephone</a>
<input [(ngModel)]="profile.orgManagerUserId" type="text" name="orgManagerUserId" class="form-control"
id="orgManagerUserId" style="
@@ -195,33 +197,7 @@
</div>
- <table mat-table [dataSource]="dataSource" matSort>
- <ng-container matColumnDef="name">
- <th mat-header-cell *matHeaderCellDef id="heading1"> Name</th>
- <td mat-cell *matCellDef="let rowData"> {{rowData.name}} </td>
- </ng-container>
-
- <!--<ng-container matColumnDef="delete">
- <th mat-header-cell *matHeaderCellDef id="heading2"> Delete</th>
- <td id="rowheader_t1_{{i}}" mat-cell *matCellDef="let rowData; let i=index;">
- <span class="icon-trash" id="{{i}}-button-role-remove" (click)="removeRole(rowData)">
- <i class="icon ion-md-trash"></i>
- </span>
- </td>
- </ng-container>-->
-
- <!-- Active Column -->
- <ng-container matColumnDef="active">
- <th id="col3" mat-header-cell *matHeaderCellDef>Active ?</th>
- <td id="rowheader_t1_{{i}}-userId" mat-cell *matCellDef="let element; let i=index;">
- <mat-slide-toggle [(ngModel)]="element.selected" (change)="toggleRoles(element)"></mat-slide-toggle>
- </td>
- </ng-container>
-
- <tr mat-header-row *matHeaderRowDef="userRolesHeader"></tr>
- <tr mat-row *matRowDef="let rowData; columns: userRolesHeader;">
-
- </table>
+ <rdp-data-table [data]="ociavailableRoles" [settings]="settings"></rdp-data-table>
<span class="ecomp-spinner" *ngIf="showSpinner"></span>
</div>
</div> \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/self/self.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/self/self.component.ts
index 23a2bb07..45210f80 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/self/self.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/self/self.component.ts
@@ -45,6 +45,7 @@ import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap';
import { InformationModalComponent } from 'src/app/modals/information-modal/information-modal.component';
import { ErrorModalComponent } from 'src/app/modals/error-modal/error-modal.component';
import { ConfirmationModalComponent } from 'src/app/modals/confirmation-modal/confirmation-modal.component';
+import { Column, ColumnTypes, DataTableSettings } from 'portalsdk-tag-lib';
@Component({
selector: 'app-self',
@@ -92,6 +93,9 @@ export class SelfComponent implements OnInit {
selectedTimeZone;
finalSelectedRoles: any;
+ public settings;
+ public columns: any = [];
+
ngOnInit() {
this.showSpinner = false;
@@ -145,7 +149,14 @@ export class SelfComponent implements OnInit {
}
}
- this.dataSource = new MatTableDataSource(this.ociavailableRoles);
+ console.log("Data : ", this.ociavailableRoles);
+ this.columns.push(new Column("name", "Name", ColumnTypes.TEXT, false, null));
+ this.settings = new DataTableSettings()
+ this.settings.columns = this.columns;
+ this.settings.isPaginationEnabled = false;
+ this.settings.isReadOnly = true;
+ this.settings.isTableSearchEnabled = false;
+ this.settings.isToggleEnabled = true;
if (this.ociavailableRoles != null) {
for (let role of this.ociavailableRoles) {