summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-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/columns/column-list/column-list.component.ts')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.ts78
1 files changed, 75 insertions, 3 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.ts
index 193e5ad0..242a50e1 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.ts
@@ -53,7 +53,6 @@ export class ColumnListComponent implements OnInit {
finalPOSTObj: {};
isDisabled: boolean;
showConfirmButton: boolean;
- displayedColumns = ['no', 'id', 'name', 'edit'];
SQLstatus: string;
SQLmessage: string;
showSaveColDialog: boolean;
@@ -78,10 +77,18 @@ export class ColumnListComponent implements OnInit {
private newSemaphoreList: any;
private addDisplay = false;
columnList: any;
+ isCrossTab: boolean;
+ displayedColumns: any;
+ crossTabValue: String;
+ displaymsg: boolean;
+ checkRowHeading: boolean;
+ checkCoumnHeading: boolean;
+ checkValue: boolean;
+ crossTabValuesArr: any;
constructor(private _http: HttpClient,
- private _columnService: ColumnService,
- private changeDetectorRefs: ChangeDetectorRef) {
+ private _columnService: ColumnService,
+ private changeDetectorRefs: ChangeDetectorRef) {
this.showEditDrillDownPage = false;
this.showAdvancedDisplayPage = false;
@@ -104,6 +111,9 @@ export class ColumnListComponent implements OnInit {
this.semaphoreId = '';
this.incomingDrillDownParams = '';
this.isIncomingDrillDownParams = false;
+ this.isCrossTab = false;
+ this.displaymsg = false;
+ this.crossTabValuesArr = [];
}
ngOnInit() {
@@ -118,8 +128,37 @@ export class ColumnListComponent implements OnInit {
this.finalGetObj[fgo_counter]['no'] = fgo_counter + 1;
this.finalGetObj[fgo_counter]['edit'] = '';
this.finalObjArr.push(this.finalGetObj[fgo_counter]);
+ if (this.finalGetObj[fgo_counter]['crossTabValue'] !== null && this.finalGetObj[fgo_counter]['crossTabValue'] !== 'Cross-Tab') {
+ this.isCrossTab = true;
+ }
fgo_counter++;
}
+ for (let i = 0; i < this.finalObjArr.length; i++) {
+ this.crossTabValuesArr.push(this.finalObjArr[i]['crossTabValue'])
+ }
+
+ if (this.crossTabValuesArr.includes('Row headings'))
+ this.checkRowHeading = true;
+ if (this.crossTabValuesArr.includes('Column headings'))
+ this.checkCoumnHeading = true;
+ if (this.crossTabValuesArr.includes('Report values'))
+ this.checkValue = true;
+
+ if (this.isCrossTab) {
+ if (this.checkRowHeading && this.checkCoumnHeading && this.checkValue) {
+ this.displaymsg = false;
+ } else {
+ this.displaymsg = true;
+ }
+ }
+
+ if (this.isCrossTab) {
+ this.displayedColumns = ['no', 'id', 'name', 'Cross-Tab Usage', 'edit'];
+ }
+ else {
+ this.displayedColumns = ['no', 'id', 'name', 'edit'];
+
+ }
this.dataSource.data = this.finalObjArr;
this.dataSource.sort = this.sort;
this.dataSource.paginator = this.paginator;
@@ -176,6 +215,9 @@ export class ColumnListComponent implements OnInit {
this.drillDownObj['drillDownType'] = this.drilldownType;
this.semaphoreList = this.finalEditRowGetObj['semaphoreList'];
this.semaphoreId = this.finalEditRowGetObj['semaphoreId'];
+ if (this.isCrossTab) {
+ this.crossTabValue = this.finalEditRowGetObj['crossTabValue'];
+ }
if (this.semaphoreId === '') {
this.semaphoreName = 'No Display';
} else {
@@ -235,6 +277,32 @@ export class ColumnListComponent implements OnInit {
this.finalObjArr.push(this.finalGetObj[fgo_counter]);
fgo_counter++;
}
+ this.crossTabValuesArr = [];
+ this.checkRowHeading = false;
+ this.checkCoumnHeading = false;
+ this.checkValue = false;
+
+ for (let i = 0; i < this.finalObjArr.length; i++) {
+ this.crossTabValuesArr.push(this.finalObjArr[i]['crossTabValue'])
+ }
+
+
+ if (this.crossTabValuesArr.includes('Row headings'))
+ this.checkRowHeading = true;
+ if (this.crossTabValuesArr.includes('Column headings'))
+ this.checkCoumnHeading = true;
+ if (this.crossTabValuesArr.includes('Report values'))
+ this.checkValue = true;
+
+ if (this.isCrossTab) {
+ if (this.checkRowHeading && this.checkCoumnHeading && this.checkValue) {
+ this.displaymsg = false;
+ } else {
+ this.displaymsg = true;
+ }
+ }
+
+
this.dataSource.data = this.finalObjArr;
this.dataSource.sort = this.sort;
this.dataSource.paginator = this.paginator;
@@ -250,6 +318,7 @@ export class ColumnListComponent implements OnInit {
this.addDisplay = false;
this.Colclosable = false;
this.showConfirmButton = false;
+ this.changeDetectorRefs.detectChanges();
}
complete() {
@@ -296,6 +365,9 @@ export class ColumnListComponent implements OnInit {
this.finalPOSTObj['noWrap'] = (this.noWrap === true ? 'Y' : 'N');
this.finalPOSTObj['sortable'] = this.sortable;
this.finalPOSTObj['subTotalCustomText'] = this.displayTotal;
+ if (this.isCrossTab) {
+ this.finalPOSTObj['crossTabValue'] = this.crossTabValue;
+ }
this.finalPOSTObj['visible'] = this.visible;
if (this.semaphoreName === 'No Display') {
this.semaphoreId = '';