From efb31c8139526215182dda47b949ddc11dfca534 Mon Sep 17 00:00:00 2001 From: mravula Date: Tue, 15 Dec 2020 16:00:49 -0500 Subject: Raptor Crosstab report UI Changes Issue-ID: PORTAL-902 Change-Id: I02f1e5651251a8c26d6c524d659617e5941343a2 Signed-off-by: mravula --- .../Report/definition/definition.component.ts | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.ts') diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.ts index 0ca05b4c..eda3fb6b 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.ts @@ -72,6 +72,8 @@ export class DefinitionComponent implements OnInit, OnDestroy { pilotModalComponent: DefinitionSaveDialogComponent; IncomingReportId: number; displayOptionsArr: {}[] = []; + reportHeader: string; + reportFooter:string; constructor(private _http: HttpClient, private _route: ActivatedRoute, private _definitionService: DefinitionService, private _router: Router) { this.showSpinner = true; @@ -181,7 +183,7 @@ export class DefinitionComponent implements OnInit, OnDestroy { this.IncomingReportId = -1; this.reportId = -1; } - if (this.reportType === 'Linear') { + if (this.reportType === 'Linear' || this.reportType ==='Cross-Tab') { this.dataSrc = response['dbInfo']; this.helpText = response['formHelpText']; this.reportDefinition = response['repDefType']; @@ -203,6 +205,7 @@ export class DefinitionComponent implements OnInit, OnDestroy { this.allowScheduler = (response['allowScheduler'] == 'Y' ? true : false); this.sizedByContent = (response['sizedByContent'] == 'Y' ? true : false); this.displayOptionsArr = response['displayOptions']; + if( this.displayOptionsArr != null){ for (let cont of this.displayOptionsArr) { if (cont['name'] == 'HideFormFields') { this.hideFormFields = cont['selected']; @@ -220,8 +223,11 @@ export class DefinitionComponent implements OnInit, OnDestroy { this.hidePDF = cont['selected']; } } + } this.disableColumnSort = response['runtimeColSortDisabled']; this.runTimeFormNum = response['numFormCols']; + this.reportHeader = response['reportHeader']; + this.reportFooter = response['reportFooter']; this.reportTitle = response['reportTitle']; this.reportSubTitle = response['reportSubTitle']; @@ -252,7 +258,7 @@ export class DefinitionComponent implements OnInit, OnDestroy { this.reportName = response['reportName']; this.reportDescription = response['reportDescr']; this.reportType = response['reportType']; - if (this.reportType === 'Linear') { + if (this.reportType === 'Linear' || this.reportType ==='Cross-Tab') { this.dataSrc = response['dbInfo']; this.helpText = response['formHelpText']; this.reportDefinition = response['repDefType']; @@ -274,6 +280,7 @@ export class DefinitionComponent implements OnInit, OnDestroy { this.allowScheduler = (response['allowScheduler'] == 'Y' ? true : false); this.sizedByContent = (response['sizedByContent'] == 'Y' ? true : false); this.displayOptionsArr = response['displayOptions']; + if(this.displayOptionsArr != null){ for (let cont of this.displayOptionsArr) { if (cont['name'] == 'HideFormFields') { this.hideFormFields = cont['selected']; @@ -291,9 +298,11 @@ export class DefinitionComponent implements OnInit, OnDestroy { this.hidePDF = cont['selected']; } } + } this.disableColumnSort = response['runtimeColSortDisabled']; this.runTimeFormNum = response['numFormCols']; - + this.reportHeader = response['reportHeader']; + this.reportFooter = response['reportFooter']; this.reportTitle = response['reportTitle']; this.reportSubTitle = response['reportSubTitle']; this.oneTime = (response['oneTimeRec'] == 'Y' ? true : false); @@ -400,6 +409,11 @@ export class DefinitionComponent implements OnInit, OnDestroy { this.finalPostObj['allowScheduler'] = (this.allowScheduler == true ? 'Y' : 'N'); this.finalPostObj['sizedByContent'] = (this.sizedByContent == true ? 'Y' : 'N'); this.finalPostObj['repDefType'] = this.reportDefinition; + + this.finalPostObj['reportHeader'] = this.reportHeader; + this.finalPostObj['reportFooter'] = this.reportFooter; + + if (this.reportType === 'Dashboard') { this.dashboardObj = this.dashboardObj.sort(function (a, b) { if (a['x'] === b['x']) { @@ -514,7 +528,10 @@ export class DefinitionComponent implements OnInit, OnDestroy { ]; this.finalPostObj['runtimeColSortDisabled'] = this.disableColumnSort; this.finalPostObj['numFormCols'] = this.runTimeFormNum; - if ( this.reportTitle.length > 0) { + this.finalPostObj['reportHeader'] = this.reportHeader; + this.finalPostObj['reportFooter'] = this.reportFooter; + + if ( undefined != this.reportTitle && this.reportTitle.length > 0) { this.finalPostObj['reportTitle'] = this.reportTitle; } else { this.finalPostObj['reportTitle'] = this.reportName;; -- cgit 1.2.3-korg