summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.ts')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.ts87
1 files changed, 43 insertions, 44 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.ts
index dfb485e1..01c1254a 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.ts
@@ -17,7 +17,7 @@ export class ReportListComponent implements AfterViewInit, OnInit {
@ViewChild( MatPaginator, { static: false } as any ) paginator: MatPaginator;
@ViewChild( MatSort, { static: false } as any ) sort: MatSort;
@ViewChild( MatTable, { static: false } as any ) table: MatTable<AllReportsItem>;
- @Input( "reportId" ) reportId1: string;
+ @Input('reportId') reportId1: string;
dataSource: AllReportsDataSource;
dataSource1: any;
finalGETObj: {};
@@ -26,7 +26,7 @@ export class ReportListComponent implements AfterViewInit, OnInit {
reportIdArr: string[];
toggle: boolean;
intermediateDisplayedColumns: string[];
- displayedColumns = ["rep_id", "rep_name", "descr", "owner", "create_date", "copy", "edit", "delete", "schedule", "run"];
+ displayedColumns = ['rep_id', 'rep_name', 'descr', 'owner', 'create_date', 'copy', 'edit', 'delete', 'schedule', 'run'];
finalRowArr: AllReportsItem[];
rowObj: any;
reportId: string;
@@ -47,23 +47,23 @@ export class ReportListComponent implements AfterViewInit, OnInit {
this.showSpinner = true;
this.dataSource = new AllReportsDataSource();
this.dataSource1 = new MatTableDataSource();
- this.intermediateDisplayedColumns = new Array();
- this.finalGETObj = new Object();
- this.finalGETObj = new Object();
- this.finalGETObjRowsArr = new Array();
- this.rowArr = new Array();
- this.reportIdArr = new Array();
+ this.intermediateDisplayedColumns = [];
+ this.finalGETObj = {};
+ this.finalGETObj = {};
+ this.finalGETObjRowsArr = [];
+ this.rowArr = [];
+ this.reportIdArr = [];
this.toggle = false;
this.toggle1 = false;
- this.finalRowArr = new Array();
+ this.finalRowArr = [];
this._reportListService.getAllReports()
.subscribe(( responseObj ) => {
this.finalGETObj = responseObj;
- this.finalGETObjRowsArr = this.finalGETObj["rows"];
+ this.finalGETObjRowsArr = this.finalGETObj['rows'];
let j = 0;
- while ( this.finalGETObj["columns"][0][j] ) {
- if ( this.finalGETObj["columns"][0][j]["columnId"] !== "no" ) {
- this.intermediateDisplayedColumns.push( this.finalGETObj["columns"][0][j]["columnId"] );
+ while (this.finalGETObj['columns'][0][j]) {
+ if (this.finalGETObj['columns'][0][j]['columnId'] !== 'no') {
+ this.intermediateDisplayedColumns.push(this.finalGETObj['columns'][0][j]['columnId']);
}
j++;
}
@@ -71,50 +71,50 @@ export class ReportListComponent implements AfterViewInit, OnInit {
let i = 0;
while ( this.finalGETObjRowsArr[0][i] ) {
this.rowArr = this.finalGETObjRowsArr[0][i];
- this.rowObj = new Object();
+ this.rowObj = {};
let j = 0;
while ( this.rowArr[j] ) {
- if ( this.rowArr[j]["columnId"] === "rep_id" ) {
- this.rowObj["rep_id"] = this.rowArr[j]["searchresultField"]["displayValue"];
- this.reportIdArr.push( this.rowArr[j]["searchresultField"]["displayValue"] );
+ if (this.rowArr[j]['columnId'] === 'rep_id') {
+ this.rowObj['rep_id'] = this.rowArr[j]['searchresultField']['displayValue'];
+ this.reportIdArr.push(this.rowArr[j]['searchresultField']['displayValue']);
}
- if ( this.rowArr[j]["columnId"] === "rep_name" ) {
- this.rowObj["rep_name"] = this.rowArr[j]["searchresultField"]["displayValue"];
+ if (this.rowArr[j]['columnId'] === 'rep_name') {
+ this.rowObj['rep_name'] = this.rowArr[j]['searchresultField']['displayValue'];
}
- if ( this.rowArr[j]["columnId"] === "descr" ) {
- this.rowObj["descr"] = this.rowArr[j]["searchresultField"]["displayValue"];
+ if (this.rowArr[j]['columnId'] === 'descr') {
+ this.rowObj['descr'] = this.rowArr[j]['searchresultField']['displayValue'];
}
- if ( this.rowArr[j]["columnId"] === "owner" ) {
- this.rowObj["owner"] = this.rowArr[j]["searchresultField"]["displayValue"];
+ if (this.rowArr[j]['columnId'] === 'owner') {
+ this.rowObj['owner'] = this.rowArr[j]['searchresultField']['displayValue'];
}
- if ( this.rowArr[j]["columnId"] === "create_date" ) {
- this.rowObj["create_date"] = this.rowArr[j]["searchresultField"]["displayValue"];
+ if (this.rowArr[j]['columnId'] === 'create_date') {
+ this.rowObj['create_date'] = this.rowArr[j]['searchresultField']['displayValue'];
}
- if ( this.rowArr[j]["columnId"] === "copy" ) {
- this.rowObj["copy"] = this.rowArr[j]["searchresultField"]["displayValue"];
+ if (this.rowArr[j]['columnId'] === 'copy') {
+ this.rowObj['copy'] = this.rowArr[j]['searchresultField']['displayValue'];
}
- if ( this.rowArr[j]["columnId"] === "edit" ) {
- this.rowObj["edit"] = this.rowArr[j]["searchresultField"]["displayValue"];
- this.rowObj["canEdit"] = this.rowArr[j]["searchresultField"]["authorized"];
+ if (this.rowArr[j]['columnId'] === 'edit') {
+ this.rowObj['edit'] = this.rowArr[j]['searchresultField']['displayValue'];
+ this.rowObj['canEdit'] = this.rowArr[j]['searchresultField']['authorized'];
}
- if ( this.rowArr[j]["columnId"] === "delete" ) {
- this.rowObj["delete"] = this.rowArr[j]["searchresultField"]["displayValue"];
- this.rowObj["canDelete"] = this.rowArr[j]["searchresultField"]["authorized"];
+ if (this.rowArr[j]['columnId'] === 'delete') {
+ this.rowObj['delete'] = this.rowArr[j]['searchresultField']['displayValue'];
+ this.rowObj['canDelete'] = this.rowArr[j]['searchresultField']['authorized'];
}
- if ( this.rowArr[j]["columnId"] === "schedule" ) {
- this.rowObj["schedule"] = this.rowArr[j]["searchresultField"]["displayValue"];
+ if (this.rowArr[j]['columnId'] === 'schedule') {
+ this.rowObj['schedule'] = this.rowArr[j]['searchresultField']['displayValue'];
}
- if ( this.rowArr[j]["columnId"] === "run" ) {
- this.rowObj["run"] = this.rowArr[j]["searchresultField"]["displayValue"];
+ if (this.rowArr[j]['columnId'] === 'run') {
+ this.rowObj['run'] = this.rowArr[j]['searchresultField']['displayValue'];
}
j++;
}
@@ -134,9 +134,9 @@ export class ReportListComponent implements AfterViewInit, OnInit {
ngOnInit() {
sessionStorage.clear();
- const myItem = localStorage.getItem('id');
+ const myItem = localStorage.getItem('notes');
localStorage.clear();
- localStorage.setItem('id', myItem);
+ localStorage.setItem('notes', myItem);
this.toggle = false;
}
@@ -148,12 +148,12 @@ export class ReportListComponent implements AfterViewInit, OnInit {
displayReport( reportId: string ) {
this.reportId = reportId;
- this._router.navigate( ["v2/app/reports", "Edit", reportId] );
+ this._router.navigate(['v2/app/reports', 'Edit', reportId]);
}
runReport( reportId: string ) {
this.reportId = reportId;
- this._router.navigate( ['v2/app/run', reportId] );
+ this._router.navigate(['v2/run', reportId]);
}
applyFilter( filterValue: string ) {
@@ -187,10 +187,9 @@ export class ReportListComponent implements AfterViewInit, OnInit {
this._router.navigate( ['v2/app/schedule_report', reportId] );
}
- copydisplayReport(reportId : string)
- {
+ copydisplayReport(reportId: string) {
this.reportId = reportId;
- this._router.navigate(["v2/app/reports", "Copy",reportId]);
+ this._router.navigate(['v2/app/reports', 'Copy', reportId]);
}
}