fcfcf4d4f84fc6889c1adbe49a0e550b2b386c7d
[portal/sdk.git] /
1 <span *ngIf="showSpinner" class="ecomp-spinner"></span>
2
3 <div *ngIf="!showSpinner" class="stdForm">
4
5     <div class="tab-content">
6         <table>
7             <tr>
8                 <td>
9                     <h6 class="reportTitle">{{reportName}}</h6>
10                     <h6 class="reportsubTitle" class="subtitle">{{reportSubTitle}}</h6>
11                 </td>
12                 <td>
13                     <mat-icon (click)="editReport(reportId)" *ngIf="allowEdit"
14                               aria-hidden="false" aria-label="edit">edit
15                     </mat-icon>
16                 </td>
17             </tr>
18         </table>
19         <span *ngIf="showformFiledSpinner" class="ecomp-spinner"></span>
20         <br>
21         <div *ngIf="!showformFiledSpinner" class="stdForm">
22             <div *ngIf="formFieldList" class="wrapper">
23                 <div *ngFor="let item of formFieldList; let i = index;">
24                     <div *ngIf="item.fieldType == 'TEXT' && item.validationType !== 'DATE'"
25                          class="fieldWidth">
26                         <label class="labelWidth">{{item.fieldDisplayName}} :</label> <textarea placement="right" ngbTooltip="comma seperated"
27                                                                                                 [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)"   [(ngModel)]="formFieldListValueArr[i]" class="defaultFontSizeTextArea" id="item.fieldId"></textarea>
28                     </div>
29                     <div *ngIf="item.fieldType == 'LIST_BOX'" class="fieldWidth">
30                         <label class="labelWidth" for="reportType">{{item.fieldDisplayName}} :</label>
31                         <select  [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)"
32                                  class="browser-default custom-select defaultFontSize" required="required"
33                         >
34                             <option *ngFor="let listItem of item.formFieldValues"
35                                     class="defaultFontSize" value="{{listItem.id}}">{{listItem.name}}</option>
36                         </select>
37                     </div>
38                     <div *ngIf="item.fieldType == 'LIST_MULTI_SELECT'" class="fieldWidth">
39                         <label class="labelWidth" for="reportType">{{item.fieldDisplayName}} :</label>
40                         <mat-form-field>
41                             <mat-select [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)" multiple>
42                                 <mat-option *ngFor="let listItem of item.formFieldValues"
43                                             value="{{listItem.id}}">{{listItem.name}}</mat-option>
44                             </mat-select>
45                         </mat-form-field>
46                     </div>
47                     <div *ngIf="item.validationType == 'DATE'" class="fieldWidth">
48                         <label class="labelWidth" for="reportType">{{item.fieldDisplayName}} :</label>
49                         <mat-form-field><input  [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)"
50                                                 [matDatepicker]="picker"
51                                                 class="defaultFontSize" matInput>
52                             <mat-datepicker-toggle [for]="picker" matSuffix></mat-datepicker-toggle>
53                             <mat-datepicker #picker></mat-datepicker>
54                         </mat-form-field>
55                     </div>
56                 </div>
57             </div>
58             <div *ngIf="formFieldList" style="padding: 0.3em" >
59                 <div *ngIf="unCommonGropusList.length > 0">
60                     <label>Select :</label><br/>
61                     <br/>
62                     <mat-radio-group ngmodel [(ngModel)]="groupSelectValue"
63                                      aria-label="Select an option" (ngModelChange) ="toggleChangeWhenCalledWithFromFields()">
64                         <div *ngFor="let group of formFieldGroupObjList; let i=index;" style="display: table-cell">
65                             <mat-radio-button value="{{group.name}}">{{group.name}}</mat-radio-button>&nbsp;&nbsp;&nbsp;
66                         </div>
67                     </mat-radio-group>
68
69                 </div>
70             </div>
71
72             <div *ngIf="formFieldList" class="wrapper">
73                 <div *ngFor="let item of toggleFormFieldRenderArr; let i = index;">
74                     <div *ngIf="item.fieldType == 'TEXT' && item.validationType !== 'DATE'" class="fieldWidth">
75                         <label class="labelWidth">{{item.fieldDisplayName}} :</label><textarea placement="right" ngbTooltip="comma seperated"
76                                                                                                [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)" class="defaultFontSizeTextArea" id="item.fieldId"></textarea>
77                     </div>
78                     <div *ngIf="item.fieldType == 'LIST_BOX'" class="fieldWidth">
79                         <label class="labelWidth" for="reportType">{{item.fieldDisplayName}} :</label>
80                         <select [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)"
81                                 class="browser-default custom-select defaultFontSize" required="required"
82                         >
83                             <option *ngFor="let listItem of item.formFieldValues"
84                                     class="defaultFontSize" value="{{listItem.id}}">{{listItem.name}}</option>
85                         </select>
86
87                     </div>
88                     <div *ngIf="item.fieldType == 'LIST_MULTI_SELECT'" class="fieldWidth">
89                         <label class="labelWidth" for="reportType">{{item.fieldDisplayName}} :</label>
90                         <mat-form-field>
91                             <mat-select [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)"
92                                         multiple>
93                                 <mat-option *ngFor="let listItem of item.formFieldValues"
94                                             value="{{listItem.id}}">{{listItem.name}}</mat-option>
95                             </mat-select>
96                         </mat-form-field>
97
98                         <br/>
99                     </div>
100                     <div *ngIf="item.validationType == 'DATE'" class="fieldWidth">
101                         <label class="labelWidth" for="reportType">{{item.fieldDisplayName}} :</label>
102                         <mat-form-field><input [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)" [matDatepicker]="picker"
103                                                class="defaultFontSize"
104                                                matInput
105                                                value="{{item.formFieldValues[0][name]}}">
106                             <mat-datepicker-toggle
107                                 [for]="picker" matSuffix></mat-datepicker-toggle>
108                             <mat-datepicker
109                                 #picker></mat-datepicker>
110                         </mat-form-field>
111                     </div>
112                     <br/>
113                 </div>
114             </div>
115             <div *ngIf="formFieldList" style="float: left;">
116                 <button (click)="runReport()" class="btn btn-alt btn-run" >Run Report</button>
117                 <button (click)="resetFormFieldValues()" class="btn btn-alt btn-run" >Reset</button>
118             </div>
119         </div>
120     </div>
121 </div>
122 <div></div>
123
124 <div *ngIf="isUpload" class="row isFileUploadDiv">
125     <p>
126         <mat-form-field class="matFormField">
127             <textarea matInput placeholder="Comments">{{uploadfileComments}}</textarea>
128         </mat-form-field>
129     </p>
130     <div class="btn-group row" style="margin: auto;">
131         <p>
132             <button (click)="onProceedWithLoad()" *ngIf="isUpload"
133                     class="btn btn-secondary proceedWitLoadButton" type="button">Proceed
134                 With Load
135             </button>
136             <button *ngIf="isUpload" class="btn btn-secondary abortButton"
137                     type="button">Abort
138             </button>
139         </p>
140     </div>
141 </div>
142 <br><br><br>
143
144 <div *ngIf="navigateToRun">
145     <!-- <app-run-dashboard-report [reportId]="reportId" [reportMode]="reportMode" [queryString]="getQueryString()" [DashboardReportObj]="DashboardReportObj"></app-run-dashboard-report> -->
146     <app-run-report [DashboardReportObj]="DashboardReportObj" [TriggerFFArr]="triggerFormFieldArr"
147                     [hitCnt]="hitCnt"
148                     [queryString]="getQueryString()"
149                     [reportId]="reportId" [reportMode]="reportMode" [runAgain]="runReportAgain" [groupSelectValue]="groupSelectValue" [chartType]="chartType" ></app-run-report>
150 </div>
151
152 <div *ngIf="error == true">
153     <h1>Error Message:</h1>
154     <p>{{errorMessage}}</p>
155     <br/>
156     <h1>Stack Trace:</h1>
157     <p>{{stackTrace}}</p>
158
159 </div>