summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List')
-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.css9
-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.html23
-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
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/columns-edit-component/columns-edit.component.css3
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/columns-edit-component/edit-drill-down-link/edit-drill-down-link.component.html4
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts2
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.html18
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.ts25
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields-add-edit/form-fields-add-edit.component.css3
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.css30
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.html113
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts5
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.ts194
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.service.ts4
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.component.ts4
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/header-tabs-component/header-tabs.component.html10
16 files changed, 453 insertions, 72 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 = '';
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/columns-edit-component/columns-edit.component.css b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/columns-edit-component/columns-edit.component.css
index 9c0e51a5..4526c54c 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/columns-edit-component/columns-edit.component.css
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/columns-edit-component/columns-edit.component.css
@@ -1,7 +1,6 @@
.dialog {
z-index: 1000;
- position: relative;
- display: flex;
+ position: fixed;
right: 0;
left: 0;
top: 20px;
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/columns-edit-component/edit-drill-down-link/edit-drill-down-link.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/columns-edit-component/edit-drill-down-link/edit-drill-down-link.component.html
index 563fd322..3780375a 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/columns-edit-component/edit-drill-down-link/edit-drill-down-link.component.html
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/columns-edit-component/edit-drill-down-link/edit-drill-down-link.component.html
@@ -13,7 +13,7 @@
<td><label for="novalue{{i}}" >No Value</label></td>
<td><label >Accept Default</label></td>
</tr>
- <tr>
+ <tr *ngIf=!checkIfItemIsTimeStamp(item.name)>
<td><input type="radio" id="fixed{{i}}" name="radio-group{{i}}" [(ngModel)]="item.radioButtonValue" value="fixed"><label for="fixed{{i}}"></label></td>
<td><label for="fixed{{i}}">Fixed Value</label></td>
<td><input class="defaultFontSize field-group" id="fixedValue{{i}}" type="text" [(ngModel)]="item.fixedValueData" value="3"/></td>
@@ -28,7 +28,7 @@
</select>
</td>
</tr>
- <tr>
+ <tr *ngIf=!checkIfItemIsTimeStamp(item.name)>
<td><input type="radio" id="field{{i}}" name="radio-group{{i}}" [(ngModel)]="item.radioButtonValue" value="field"><label for="field{{i}}"></label></td>
<td><label for="field{{i}}">Value of form field</label></td>
<td>
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts
index 3cd72584..69deefb9 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts
@@ -12,6 +12,6 @@ export class DashboardReportGridService {
getReportList() : Observable<any>
{
- return this._http.get(environment.baseUrl + "raptor.htm?action=report.search.execute&r_page=0");
+ return this._http.get(environment.baseUrl + "raptor.htm?action=report.search.execute&r_page=0&fromEdit=true");
}
}
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.html
index efe84957..1627e227 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.html
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.html
@@ -50,10 +50,11 @@
<option class="defaultFontSize" selected>Select Report Type</option>
<option class="defaultFontSize" value="Linear">Linear</option>
<option class="defaultFontSize" value="Dashboard">Dashboard</option>
+ <option class="defaultFontSize" value="Cross-Tab">Cross-Tab</option>
</select>
</div>
<br/>
- <div *ngIf="reportType === 'Linear'">
+ <div *ngIf="reportType === 'Linear' || reportType === 'Cross-Tab' ">
<div class="field-group">
<label for="dataSrc">*Data Source</label> <br/>
<select [(ngModel)]="dataSrc" class="browser-default custom-select defaultFontSize" id="dataSrc"
@@ -279,6 +280,21 @@
type="textarea" value="{{finalGetObj.reportSubTitle}}"></textarea>
</div>
<br/>
+
+ <div class="field-group" *ngIf="reportType === 'Cross-Tab' || reportType === 'Linear'">
+ <label>Page Header</label> <br/>
+ <textarea [(ngModel)]="reportHeader" class="defaultFontSize" id="reportHeader" type="textarea"
+ value="{{finalGetObj.reportHeader}}"></textarea>
+ </div>
+ <br/>
+
+ <div class="field-group" *ngIf="reportType === 'Cross-Tab' || reportType === 'Linear'">
+ <label>Page Footer</label> <br/>
+ <textarea [(ngModel)]="reportFooter" class="defaultFontSize" id="reportFooter" type="textarea"
+ value="{{finalGetObj.reportFooter}}"></textarea>
+ </div>
+ <br/>
+
<div class="field-group">
<label class="checkbox" for="oneTime">
<input [(ngModel)]="oneTime" id="oneTime" type="checkbox"
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;;
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields-add-edit/form-fields-add-edit.component.css b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields-add-edit/form-fields-add-edit.component.css
index 578b33e8..13a78c5c 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields-add-edit/form-fields-add-edit.component.css
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields-add-edit/form-fields-add-edit.component.css
@@ -1,7 +1,6 @@
.dialog {
z-index: 1000;
- display: flex;
- position: relative;
+ position: fixed;
right: 0;
left: 0;
top: 20px;
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.css b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.css
index 96d0a71f..0654d2a8 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.css
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.css
@@ -115,13 +115,6 @@ hr{
padding-bottom: 5px;
}
-.list::-webkit-scrollbar {
- -webkit-appearance: scrollbarthumb-vertical;
- width: 5px;
- background: transparent;
-}
-
-
label {
float: left;
width: 24em;
@@ -6284,7 +6277,30 @@ td{
margin-left: 10%;
}
+.add-reOrder-button
+{
+ font-size: 17px;
+ margin-left: 80%;
+}
+
.center{
margin: auto;
width: 50%;
}
+
+.showbuttons{
+ width: auto; margin-left: 70%;
+}
+
+:host ::ng-deep .mat-form-field-underline {
+ display: none;
+}
+
+:host ::ng-deep .mat-form-field-infix {
+ padding: 0;
+ border-top: 0;
+}
+
+.verify-button{
+ font-size: 17px;
+} \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.html
index 63062109..d35430db 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.html
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.html
@@ -38,7 +38,8 @@
<label class="defaultLabelFontSize">Field Name:</label><label><input [(ngModel)]="fieldName"
- class="defaultFontSize" id="fieldName"
+ class="defaultFontSize"
+ id="fieldName"
type="text"
value="{{fieldName}}"/></label>
@@ -75,7 +76,8 @@
<div>
<label class="defaultLabelFontSize">Is used in Group By Clause?:</label>
<label class="defaultLabelFontSize" class="checkbox" for="groupFormField">
- <input [(ngModel)]="groupFormField" class="ng-valid ng-dirty ng-valid-parse ng-touched" id="groupFormField"
+ <input [(ngModel)]="groupFormField" class="ng-valid ng-dirty ng-valid-parse ng-touched"
+ id="groupFormField"
type="checkbox" value="{{groupFormField}}"><i class="skin"></i><span></span>
</label>
</div>
@@ -85,7 +87,8 @@
<div>
<label class="defaultLabelFontSize">SQL as Default Value:</label>
<label class="defaultLabelFontSize" class="checkbox" for="isDefaultSql">
- <input [(ngModel)]="isDefaultSql" class="ng-valid ng-dirty ng-valid-parse ng-touched" id="isDefaultSql"
+ <input [(ngModel)]="isDefaultSql" class="ng-valid ng-dirty ng-valid-parse ng-touched"
+ id="isDefaultSql"
type="checkbox" value="{{isDefaultSql}}"><i class="skin"></i><span></span>
</label>
</div>
@@ -98,7 +101,7 @@
<textarea [(ngModel)]="fieldDefaultSQL" class="defaultFontSize" id="fieldDefaultSQL"
type="textarea" value="{{fieldDefaultSQL}}"></textarea>
<div class="center">
- <button (click)="verify('Default')" class="btn btn-alt btn-small" style="font-size: 17px;">
+ <button (click)="verify('Default')" class="btn btn-alt btn-small verify-button">
Verify
</button>
</div>
@@ -136,6 +139,73 @@
</div>
<br/>
<br/>
+ <div *ngIf='showDateRange || this.validationType === "DATE"'>
+ <div>
+ <label class="defaultLabelFontSize">SQL as Default Range Value:</label>
+ <label class="defaultLabelFontSize" class="checkbox" for="isDefaultSqlRange">
+ <input [(ngModel)]="isDefaultSqlRange" class="ng-valid ng-dirty ng-valid-parse ng-touched"
+ id="isDefaultSqlRange"
+ type="checkbox" value="{{isDefaultSqlRange}}"><i class="skin"></i><span></span>
+ </label>
+ </div>
+
+
+ <div *ngIf="!isDefaultSqlRange" class="field-group">
+ <label class="defaultLabelFontSize">rangeStartDate:</label>
+
+ <mat-form-field style="float: left;"><input [(ngModel)]="rangeStartDate"
+ [matDatepicker]="picker"
+ class="defaultFontSize" matInput>
+ <mat-datepicker-toggle [for]="picker" matSuffix></mat-datepicker-toggle>
+ <mat-datepicker #picker></mat-datepicker>
+ </mat-form-field>
+
+
+ </div>
+ <br />
+ <br />
+
+ <div *ngIf="!isDefaultSqlRange" class="field-group">
+ <label class="defaultLabelFontSize">rangeEndDate:</label>
+
+ <mat-form-field style="float: left;"><input [(ngModel)]="rangeEndDate" [matDatepicker]="picker"
+ class="defaultFontSize" matInput>
+ <mat-datepicker-toggle [for]="picker" matSuffix></mat-datepicker-toggle>
+ <mat-datepicker #picker></mat-datepicker>
+ </mat-form-field>
+ </div>
+ <br />
+ <br />
+
+
+
+
+ <div class="field-group" *ngIf="isDefaultSqlRange">
+ <label>RangeStartDate Sql:</label>
+ <textarea [(ngModel)]="rangeStartDateSQL" class="defaultFontSize" id="rangeStartDateSQL" type="textarea"
+ value="{{rangeStartDateSQL}}"></textarea>
+ <div class="center">
+ <button (click)="verify('startDateRange')" class="btn btn-alt btn-small verify-button">Verify
+ </button>
+ </div>
+ </div>
+ <br/>
+ <br/>
+
+
+ <div class="field-group" *ngIf="isDefaultSqlRange">
+ <label>RangeEndDate Sql:</label>
+ <textarea [(ngModel)]="rangeEndDateSQL" class="defaultFontSize" id="rangeEndDateSQL" type="textarea"
+ value="{{rangeEndDateSQL}}"></textarea>
+ <div class="center">
+ <button (click)="verify('endDateRange')" class="btn btn-alt btn-small verify-button">Verify
+ </button>
+ </div>
+ </div>
+ <br/>
+ <br/>
+ </div>
+
<div class="field-group">
<label>SQL Generating Custom List of Values:</label>
<textarea [(ngModel)]="fieldSQL" class="defaultFontSize" id="fieldSQL" type="textarea"
@@ -150,7 +220,8 @@
<br/>
<div>
<label class="defaultLabelFontSize">Provide Predefined List of Values: Do not use Predefined list -
- Generate list from database:</label><label><input [(ngModel)]="predefinedValue" class="defaultFontSize"
+ Generate list from database:</label><label><input [(ngModel)]="predefinedValue"
+ class="defaultFontSize"
id="predefinedValue" type="text"
value="{{predefinedValue}}"/></label>
<button (click)="addToList(predefinedValue)" class="btn btn-alt btn-small" style="font-size: 17px;">
@@ -173,7 +244,7 @@
</div>
</div>
- <div class="card-footer" style="width: 1000px; height: 65px; padding-left: 770px;">
+ <div class="card-footer" style="width: 1000px; padding-left: 770px;">
<button (click)="save();" *ngIf="!showConfirmButton" class="btn btn-alt btn-small" style="font-size: 17px;">
Save
</button>&nbsp;
@@ -246,6 +317,7 @@
</table>
</div>
<br/>
+ <br/>
<h4>Form Field List</h4>
<div *ngIf="!showSpinner">
@@ -254,6 +326,7 @@
<th class="defaultFontSize">Order Number</th>
<th class="defaultFontSize">Field Name</th>
<th class="defaultFontSize">Edit</th>
+ <th class="defaultFontSize">Order</th>
<th class="defaultFontSize">Delete</th>
<tr *ngFor="let item of formFieldsListObj; let i = index;">
@@ -269,19 +342,35 @@
</mat-icon>
</td>
<td>
+ <mat-icon (click)="moveUpward(i)" *ngIf="!isFirst(i)" aria-hidden="false" aria-label="expand_less">
+ expand_less
+ </mat-icon>
+ <mat-icon (click)="moveDownward(i)" *ngIf="!isLast(i)" aria-hidden="false" aria-label="expand_more">
+ expand_more
+ </mat-icon>
+ </td>
+ <td>
<mat-icon (click)="delete(item.id)" aria-hidden="false" aria-label="delete">delete</mat-icon>
</td>
</tr>
</table>
<br/>
+ <table class="showbuttons">
+ <tr>
+ <td>
+ <button (click)="add(); setDisplayMode('Add');" class="btn btn-alt btn-small add-reOrder-button">
+ Add
+ </button>
+ </td>
+ <td>
+ <button (click)="reOrder()" *ngIf="showReOrderButton"
+ class="btn btn-alt btn-small add-reOrder-button">ReOrder
+ </button>
+ </td>
+ </tr>
+ </table>
- <div class="field-group">
- <button (click)="add(); setDisplayMode('Add');" class="btn btn-alt btn-small"
- style="font-size: 17px; margin-left: 80%;">Add
- </button>
- </div>
<br/>
- <hr/>
</div>
</div>
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts
index 69c0aeba..8a1a5713 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts
@@ -4,7 +4,7 @@ import { FormFieldsComponent } from './form-fields.component';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientTestingModule } from '@angular/common/http/testing';
-import { MatDialogModule, MatSnackBarModule } from '@angular/material';
+import { MatDatepickerModule, MatDialogModule, MatSnackBarModule } from '@angular/material';
import { CommonModule } from '@angular/common';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormFieldsService } from './form-fields.service';
@@ -26,7 +26,8 @@ describe('FormFieldsComponent', () => {
HttpClientTestingModule,
MatDialogModule,
MatSnackBarModule,
- BrowserAnimationsModule
+ BrowserAnimationsModule,
+ MatDatepickerModule
]
})
.compileComponents();
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.ts
index e8a60849..8d2ce96c 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.ts
@@ -1,4 +1,4 @@
-import {Component, OnInit, Input, Inject} from '@angular/core';
+import {Component, OnInit, Input, Inject, ChangeDetectorRef} from '@angular/core';
import {FormFieldsService} from './form-fields.service';
import {MatDialog, MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';
import {Observable} from 'rxjs';
@@ -52,12 +52,21 @@ export class FormFieldsComponent implements OnInit {
queryObj: {};
validateResponseString: string;
showVerifySpinner: boolean;
- Groups: {}[] = [];
+ Groups: any;
isDefaultSql: boolean;
showConfirmButton: boolean;
-
-
- constructor(private _formFieldsService: FormFieldsService, public dialog: MatDialog, private _snackBar: MatSnackBar) {
+ showReOrderButton: boolean;
+ orderSeqArray: any;
+ showDateRange: any;
+ rangeStartDate :any;
+ rangeEndDate :any;
+ rangeStartDateSQL :any;
+ rangeEndDateSQL:any;
+ isDefaultSqlRange:boolean;
+ isFFDate: boolean;
+
+
+ constructor(private _formFieldsService: FormFieldsService, public dialog: MatDialog, private _snackBar: MatSnackBar,private changeDetectorRefs: ChangeDetectorRef) {
this.formFieldsListObj = [];
this.postMoveUpwrdObj = {};
this.postDownwardObj = {};
@@ -72,19 +81,49 @@ export class FormFieldsComponent implements OnInit {
this.showVerifySpinner = false;
this.Groups = [];
this.isDefaultSql = false;
+ this.showReOrderButton = false;
+ this.orderSeqArray = [];
+ this.showDateRange = false;
+ this.isDefaultSqlRange = false;
+ this.rangeStartDate ='';
+ this.rangeEndDate='';
+ this.rangeStartDateSQL ='';
+ this.rangeEndDateSQL='';
+ this.isFFDate = false;
}
ngOnInit() {
this._formFieldsService.getListOfFormFields()
.subscribe((responseFormFields) => {
for (let m = 0; m < responseFormFields.length; m++) {
- responseFormFields[m]['orderSeq'] = m + 1;
this.formFieldsListObj.push(responseFormFields[m]);
}
+ this.formFieldsListObj = this.formFieldsListObj.sort(function (a, b) {
+ if ((a['orderSeq']) === (b['orderSeq'])) {
+ return a;
+ } else {
+ return (a['orderSeq']) - (b['orderSeq']);
+ }
+ });
+ for (let ff = 0; ff < this.formFieldsListObj.length; ff++) {
+ let val = this.formFieldsListObj[ff]['orderSeq'];
+ this.orderSeqArray.push(val);
+ }
+ if (this.orderSeqArray.includes(null) || this.orderSeqArray.length !== new Set(this.orderSeqArray).size) {
+ this.reOrder();
+ }
this._formFieldsService.getFormFieldGroupsData(this.reportId1)
.subscribe((responseGroupsData) => {
this.Groups = JSON.parse(responseGroupsData['formFieldGroupsJSON']);
+ this.Groups = this.Groups.sort(function (a, b) {
+ if ((a['orderSeq']) === (b['orderSeq'])) {
+ return a;
+ } else {
+ return (a['orderSeq']) - (b['orderSeq']);
+ }
+ });
+
});
});
}
@@ -124,11 +163,6 @@ export class FormFieldsComponent implements OnInit {
this.postMoveUpwrdObj['orderSeq'] = this.orderSeqOfUp;
this.postDownwardObj['orderSeq'] = this.orderSeqOfDown;
- console.log(this.postDownwardObj);
- console.log(this.postMoveUpwrdObj);
- this.postMoveUpwrdObj['lastUpdatedFieldId'] = this.postDownwardObj['fieldId'];
- this.postDownwardObj['lastUpdatedFieldId'] = this.postMoveUpwrdObj['fieldId'];
-
this._formFieldsService.postFormFieldData(this.postDownwardObj, this.reportId1)
.subscribe((responsePostn) => {
if (responsePostn['message']) {
@@ -148,6 +182,7 @@ export class FormFieldsComponent implements OnInit {
}
}
this.showSpinner = false;
+ this.updateGroupOnOrderChange();
});
}
});
@@ -156,10 +191,23 @@ export class FormFieldsComponent implements OnInit {
});
});
+ }
-
+ updateGroupOnOrderChange() {
+ let formfieldsMap: Map<string, string> = new Map();
+ for (let i = 0; i < this.formFieldsListObj.length; i++) {
+ formfieldsMap.set(this.formFieldsListObj[i]['id'], this.formFieldsListObj[i]['orderSeq']);
+ }
+ for (let k = 0; k < this.Groups.length; k++) {
+ let element = this.Groups[k];
+ for (let l = 0; l < element['formFieldList'].length; l++) {
+ element['formFieldList'][l]['orderSeq'] = formfieldsMap.get(element['formFieldList'][l]['id']);
+ }
+ }
+ this.saveFormFieldGroups();
}
+
moveDownward(n: number) {
this.showSpinner = true;
@@ -176,13 +224,6 @@ export class FormFieldsComponent implements OnInit {
this.postMoveUpwrdObj['orderSeq'] = this.orderSeqOfUp;
this.postDownwardObj['orderSeq'] = this.orderSeqOfDown;
-
- console.log(this.postDownwardObj);
- console.log(this.postMoveUpwrdObj);
-
- this.postMoveUpwrdObj['lastUpdatedFieldId'] = this.postDownwardObj['fieldId'];
- this.postDownwardObj['lastUpdatedFieldId'] = this.postMoveUpwrdObj['fieldId'];
-
this._formFieldsService.postFormFieldData(this.postDownwardObj, this.reportId1)
.subscribe((responsePostn) => {
if (responsePostn['message']) {
@@ -194,7 +235,6 @@ export class FormFieldsComponent implements OnInit {
this._formFieldsService.getListOfFormFields()
.subscribe((finalListResponse) => {
for (let k = 0; k < finalListResponse.length; k++) {
- // this.formFieldsListObj.push(finalListResponse[k]);
for (let m = 0; m < finalListResponse.length; m++) {
if (finalListResponse[m]['orderSeq'] == k + 1) {
this.formFieldsListObj.push(finalListResponse[m]);
@@ -202,6 +242,7 @@ export class FormFieldsComponent implements OnInit {
}
}
this.showSpinner = false;
+ this.updateGroupOnOrderChange();
});
}
});
@@ -230,11 +271,54 @@ export class FormFieldsComponent implements OnInit {
this.openEditDialog(group);
}
+
+ setDate($event : any){
+ const mnth = ('0' + ($event.getMonth() + 1)).slice(-2);
+ const day = ('0' + $event.getDate()).slice(-2);
+ let temp = [mnth, day, $event.getFullYear()].join('/');
+ temp = temp+' '+ '00:00:00';
+
+ return temp;
+
+ }
edit(id: string) {
this._formFieldsService.getFormFieldData(id)
.subscribe((responseFormFieldData) => {
- this.validationType = responseFormFieldData['validationType'];
+ this.validationType = responseFormFieldData["validationType"];
+ this.showDateRange = false;
+ if(this.validationType ==='DATE'){
+ this.showDateRange = true;
+ if (responseFormFieldData['rangeStartDate'] != null) {
+ if (responseFormFieldData['rangeStartDate'] != '')
+ this.rangeStartDate = new Date(responseFormFieldData['rangeStartDate']); else {
+ this.rangeStartDate = '';
+ }
+ } else {
+ this.rangeStartDate = '';
+ }
+ if (responseFormFieldData['rangeEndDate'] != null) {
+ if (responseFormFieldData['rangeEndDate'] != '')
+ this.rangeEndDate = new Date(responseFormFieldData['rangeEndDate']);
+ else {
+ this.rangeEndDate = '';
+ }
+ } else {
+ this.rangeEndDate = '';
+ }
+ this.rangeStartDateSQL = responseFormFieldData['rangeStartDateSQL'];
+ this.rangeEndDateSQL = responseFormFieldData['rangeEndDateSQL'];
+ if ((this.rangeStartDate == '' && this.rangeEndDate == '')) {
+ this.isDefaultSqlRange = true;
+ } else {
+
+ this.isDefaultSqlRange = false;
+ }
+
+ if ((this.rangeStartDate == '' && this.rangeEndDate == '' && this.rangeEndDateSQL == '' && this.rangeStartDateSQL == '')) {
+ this.isDefaultSqlRange = false;
+ }
+ }
if (responseFormFieldData['visible'] === true) {
this.visible = 'YES';
} else {
@@ -298,9 +382,15 @@ export class FormFieldsComponent implements OnInit {
this.isDefaultSql = false;
this.predefinedValueList = [];
this.defaultValue = '';
-
+ this.orderSeq = null;
this.showDialog = true;
this.closable = true;
+ this.isDefaultSqlRange = false;
+ this.rangeStartDate ='';
+ this.rangeEndDate='';
+ this.rangeStartDateSQL ='';
+ this.rangeEndDateSQL='';
+ this.showDateRange='';
this.mode = 'Add';
@@ -340,7 +430,30 @@ export class FormFieldsComponent implements OnInit {
this.showSpinner = true;
this.showDialog = false;
this.finalPOSTObj['validationType'] = this.validationType;
+ if (this.validationType === 'DATE') {
+ if (this.rangeStartDate != null && this.rangeStartDate != '') {
+ this.finalPOSTObj['rangeStartDate'] = this.setDate(this.rangeStartDate);
+ } else {
+ this.finalPOSTObj['rangeStartDate'] = '';
+ }
+ if (this.rangeEndDate != null && this.rangeEndDate != '') {
+ this.finalPOSTObj['rangeEndDate'] = this.setDate(this.rangeEndDate);
+ } else {
+ this.finalPOSTObj['rangeEndDate'] = '';
+ }
+ this.finalPOSTObj['rangeStartDateSQL'] = this.rangeStartDateSQL;
+ this.finalPOSTObj['rangeEndDateSQL'] = this.rangeEndDateSQL;
+ }
+
+ if (this.isDefaultSqlRange) {
+ this.finalPOSTObj['rangeStartDate'] = '';
+ this.finalPOSTObj['rangeEndDate'] = '';
+ }
+ if (!this.isDefaultSqlRange) {
+ this.finalPOSTObj['rangeStartDateSQL'] = '';
+ this.finalPOSTObj['rangeEndDateSQL'] = '';
+ }
if (this.visible == 'YES') {
this.finalPOSTObj['visible'] = true;
} else {
@@ -363,6 +476,8 @@ export class FormFieldsComponent implements OnInit {
this.finalPOSTObj['defaultValue'] = this.defaultValue;
+ this.finalPOSTObj['defaultValue'] = this.defaultValue;
+
if (this.fieldDefaultSQL != '' && this.fieldDefaultSQL != null) {
this.finalPOSTObj['defaultValue'] = '';
}
@@ -443,6 +558,24 @@ export class FormFieldsComponent implements OnInit {
this.validateResponseString = responseDefaultSQL['data']['elements'];
this.showVerifySpinner = false;
});
+ } else if (SQLType == 'startDateRange' || SQLType =='endDateRange'){
+
+ if(SQLType == 'startDateRange'){
+ this.queryObj = {
+ query: this.rangeStartDateSQL
+ };
+ }
+ if(SQLType == 'endDateRange'){
+ this.queryObj = {
+ query: this.rangeEndDateSQL
+ };
+ }
+ this._formFieldsService.verifySQL(this.queryObj)
+ .subscribe((responseDefaultSQL) => {
+ this.validateResponseString = responseDefaultSQL['data']['elements'];
+ this.showVerifySpinner = false;
+ });
+
} else {
this.queryObj = {
query: this.fieldSQL
@@ -527,6 +660,23 @@ export class FormFieldsComponent implements OnInit {
});
}
+ reOrder() {
+ this._formFieldsService.reOrderFFValues()
+ .subscribe((response) => {
+ console.log(response);
+ this.formFieldsListObj = [];
+ for (let k = 0; k < response.length; k++) {
+ for (let m = 0; m < response.length; m++) {
+ if (response[m]['orderSeq'] == k + 1) {
+ this.formFieldsListObj.push(response[m]);
+ }
+ }
+ }
+ this.showSpinner = false;
+ this.showReOrderButton = false;
+ this.updateGroupOnOrderChange();
+ });
+ }
openEditDialog(groupInfo: any) {
const multiSelectArray = [];
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.service.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.service.ts
index f636a001..a7c6501d 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.service.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.service.ts
@@ -49,4 +49,8 @@ export class FormFieldsService {
{
return this._http.post(environment.baseUrl + "report/wizard/save_formfield_groups_data", formFieldGroupObj, { headers: new HttpHeaders({'Content-Type': 'application/json'})});
}
+ reOrderFFValues() : Observable<any>
+ {
+ return this._http.post(environment.baseUrl + "report/wizard/reorder", { headers: new HttpHeaders({'Content-Type': 'application/json'})});
+ }
}
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.component.ts
index 7a547e3d..0be4da8d 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.component.ts
@@ -139,15 +139,11 @@ export class SQLComponent implements OnInit {
closeValidateModal() {
if (this.reportMode === 'Create') {
- if (this.Validatestatus == 'SQL Test Run - Failed!') {
- this.sqlText = this.sqlText;
- } else {
this._http.get(environment.baseUrl + 'report/wizard/retrieve_def_tab_wise_data/InSession')
.subscribe((response) => {
console.log(response);
this._router.navigate(['v2/app/reports', 'Edit', response['reportId']]);
});
- }
}
this.showValidateSQLDialog = !this.showValidateSQLDialog;
this.Validateclosable = false;
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/header-tabs-component/header-tabs.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/header-tabs-component/header-tabs.component.html
index 7fdc5d50..0fe96763 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/header-tabs-component/header-tabs.component.html
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/header-tabs-component/header-tabs.component.html
@@ -1,12 +1,12 @@
<div *ngIf="reportMode !== 'Create'">
-<div *ngIf=" reportType === 'Linear'" >
+<div *ngIf=" reportType === 'Linear' || reportType === 'Cross-Tab'" >
<mat-tab-group>
<mat-tab label="Definition"><ng-template matTabContent><app-definition [reportId]="reportId" [reportMode]="reportMode"></app-definition></ng-template></mat-tab>
<mat-tab label="SQL"><ng-template matTabContent><app-sqlcomponent [reportId]="reportId" [reportMode]="reportMode"></app-sqlcomponent></ng-template></mat-tab>
<mat-tab label="Columns"><ng-template matTabContent><app-columns [reportId]="reportId"></app-columns></ng-template></mat-tab>
<mat-tab label="Form Fields"><ng-template matTabContent><app-form-fields [reportId]="reportId"></app-form-fields></ng-template></mat-tab>
- <mat-tab label="Chart Wizard"><ng-template matTabContent><app-chart-wizard [reportId]="reportId"></app-chart-wizard></ng-template></mat-tab>
+ <mat-tab label="Chart Wizard" *ngIf="reportType !== 'Cross-Tab'"><ng-template matTabContent><app-chart-wizard [reportId]="reportId"></app-chart-wizard></ng-template></mat-tab>
<mat-tab label="Security"><ng-template matTabContent><app-security [reportId]="reportId"></app-security></ng-template></mat-tab>
<mat-tab label="Log"><ng-template matTabContent><app-log [reportId]="reportId"></app-log></ng-template></mat-tab>
<mat-tab label="Run"><ng-template matTabContent><app-run [reportId]="reportId"></app-run></ng-template></mat-tab>
@@ -26,9 +26,9 @@
<div *ngIf="reportMode === 'Create'">
<mat-tab-group>
<mat-tab label="Definition"><ng-template matTabContent><app-definition [reportId]="reportId" [reportMode]="reportMode" (outputReportType)="getReportType($event)" ></app-definition></ng-template></mat-tab>
- <mat-tab label="SQL" *ngIf=" reportType === 'Linear'"><ng-template matTabContent><app-sqlcomponent [reportId]="reportId" [reportMode]="reportMode"></app-sqlcomponent></ng-template></mat-tab>
- <mat-tab label="Columns" *ngIf=" reportType === 'Linear'"><ng-template matTabContent><app-columns [reportId]="reportId"></app-columns></ng-template></mat-tab>
- <mat-tab label="Form Fields" *ngIf=" reportType === 'Linear'"><ng-template matTabContent><app-form-fields [reportId]="reportId"></app-form-fields></ng-template></mat-tab>
+ <mat-tab label="SQL" *ngIf=" reportType === 'Linear' || reportType === 'Cross-Tab'"><ng-template matTabContent><app-sqlcomponent [reportId]="reportId" [reportMode]="reportMode"></app-sqlcomponent></ng-template></mat-tab>
+ <mat-tab label="Columns" *ngIf=" reportType === 'Linear' || reportType === 'Cross-Tab'"><ng-template matTabContent><app-columns [reportId]="reportId"></app-columns></ng-template></mat-tab>
+ <mat-tab label="Form Fields" *ngIf=" reportType === 'Linear' || reportType === 'Cross-Tab'"><ng-template matTabContent><app-form-fields [reportId]="reportId"></app-form-fields></ng-template></mat-tab>
<mat-tab label="Chart Wizard" *ngIf=" reportType === 'Linear'"><ng-template matTabContent><app-chart-wizard [reportId]="reportId"></app-chart-wizard></ng-template></mat-tab>
<mat-tab label="Security"><ng-template matTabContent><app-security [reportId]="reportId"></app-security></ng-template></mat-tab>
<mat-tab label="Log"><ng-template matTabContent><app-log [reportId]="reportId"></app-log></ng-template></mat-tab>