diff options
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list')
3 files changed, 102 insertions, 8 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.css b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.css index 2292a29c..0e10f549 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.css +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.css @@ -399,10 +399,7 @@ tr:nth-child(odd) { font-size: 35px; } -.list::-webkit-scrollbar { - -webkit-appearance: scrollbarthumb-vertical; - width: 5px; - background: transparent; +::-webkit-scrollbar { } @@ -445,4 +442,6 @@ label { font-size: 5px; top: 4px; left: 10px; } - +.err-msg{ + color: red; +} 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.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.html index 4a8f2695..2cfb1a08 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.html @@ -58,6 +58,22 @@ </div> <br/> <br/> + <div *ngIf="isCrossTab"> + <div> + <label class="defaultFontSize1" for="crossTabValue">Column Usage in Cross-Tab:</label> + <select [(ngModel)]="crossTabValue" class="browser-default custom-select" + placeholder="Select Report Type" required="required" + value="{{finalEditRowGetObj.crossTabValue}}"> + <option class="defaultFontSize1" selected>Select Data Type</option> + <option class="defaultFontSize1" value="ROW">Row headings</option> + <option class="defaultFontSize1" value="COLUMN">Column headings</option> + <option class="defaultFontSize1" value="VALUE">Report values</option> + <option class="defaultFontSize1" value="Invisible/Filter">Invisible/Filter</option> + </select> + </div> + <br/> + <br/> + </div> <div> <label class="defaultFontSize1" for="dataType">Data Type:</label> <select [(ngModel)]="dataType" class="browser-default custom-select" @@ -269,6 +285,7 @@ <span *ngIf="showSpinner" class="ecomp-spinner"></span> +<span *ngIf='isCrossTab && displaymsg' class="err-msg">You must have atleast one column used for cross-tab 'Row headings', 'Column headings' and 'Report Values'</span> <div class="app-data-table"> <table aria-label="Elements" class="full-width-table app-data-table" mat-table matSort> @@ -290,6 +307,10 @@ <td *matCellDef="let row" mat-cell>{{row.name}}</td> </ng-container> + <ng-container *ngIf='isCrossTab' matColumnDef="Cross-Tab Usage"> + <th *matHeaderCellDef class="defaultFontSize" mat-header-cell mat-sort-header>Cross-Tab Usage</th> + <td *matCellDef="let row" mat-cell>{{row.crossTabValue}}</td> + </ng-container> <!-- Name Column --> <ng-container matColumnDef="edit"> <th *matHeaderCellDef class="defaultFontSize" mat-header-cell mat-sort-header>EDIT</th> @@ -300,6 +321,8 @@ </ng-container> <tr *matHeaderRowDef="displayedColumns" mat-header-row></tr> + + <tr *matRowDef="let row; columns: displayedColumns;" mat-row></tr> </table> 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 = ''; |