summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.html
blob: 2f9543e03275c80391f904113e35b664aa66d89d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<div *ngIf="showSpinner">
    <div class="lds-ring"><div></div><div></div><div></div><div></div></div>
</div>


  <div *ngIf="!showSpinner" class="stdForm">
  
<div class="tab-content">
  <table>
    <tr>
      <td>
    <h1>{{reportName}}</h1>
  </td>
  <td>
    <mat-icon aria-hidden="false" aria-label="edit" (click)="editReport(reportId)">edit</mat-icon>
  </td>
  <td *ngIf="reportMode == 'FormField' || reportMode == 'Dashboard'">
      <div class="field-group">
          <label for="sizedByContent" class="checkbox">
                  <input   id="sizedByContent" type="checkbox" ng-model="definitionData.hideFormFieldsAfterRun" class="ng-valid ng-dirty ng-valid-parse ng-touched" (click)="showLabelFn()">
                  <i class="skin"></i><span></span>
              </label>
  </div>
  </td>
  </tr>
  </table>
    <br/>
    <br/>
    <div *ngIf="formFieldList">
  <div *ngFor="let item of formFieldList; let i = index;">
    <div *ngIf="item.fieldType == 'TEXT' && item.validationType !== 'DATE'">
    <div class="field-group">
        <label>{{item.fieldDisplayName}}</label> &nbsp; <label *ngIf="showLabel">[{{item.fieldId}}]</label><br/>
          <input  class="defaultFontSize" id="item.fieldId" type="text"  [(ngModel)]="formFieldListValueArr[i]" value="{{formFieldListValueArr[i]}}"/>
    </div>
  </div> 
  <div *ngIf="item.fieldType == 'LIST_BOX'">
      <div class="field-group">
          <label for="reportType">{{item.fieldDisplayName}}</label> &nbsp; <label for="reportType">{{item.fieldId}}</label><br/>
                  <select class="browser-default custom-select defaultFontSize"  required="required"  [(ngModel)]="formFieldListValueArr[i]"  value="{{formFieldListValueArr[i]}}">
                      <option *ngFor="let listItem of item.formFieldValues" class="defaultFontSize" value="{{listItem.id}}" >{{listItem.name}}</option>
                    </select>
      </div>
  </div>
  <div *ngIf="item.fieldType == 'LIST_MULTI_SELECT'">
      <mat-form-field>
        <mat-label>{{item.fieldDisplayName}}</mat-label>
        <mat-select  multiple [(ngModel)]="formFieldListValueArr[i]">
          <mat-option *ngFor="let listItem of item.formFieldValues" value="{{listItem.id}}">{{listItem.name}}</mat-option>
        </mat-select>
      </mat-form-field>
  </div>
  <div *ngIf="item.validationType == 'DATE'">
      <div class="field-group">
          <label for="reportType">{{item.fieldDisplayName}}</label><br/>
          <mat-form-field>
              <input matInput [matDatepicker]="picker" [(ngModel)]="formFieldListValueArr[i]">
              <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
              <mat-datepicker #picker></mat-datepicker>
            </mat-form-field>
      </div>
  </div>

  <br/>

  </div>

  <div *ngIf="unCommonCnt > 0">
  <label>Select</label><br/>
  <mat-radio-group aria-label="Select an option" [(ngModel)]="groupSelectValue" >
    <div *ngFor="let group of formFieldGroupObjList; let i=index;" >
      <mat-radio-button value="{{group.name}}">{{group.name}}</mat-radio-button>
    </div>
  </mat-radio-group>

  </div>
  <br/>
  <div *ngFor="let item of toggleFormFieldRenderArr; let i = index;">
      <div *ngIf="item.fieldType == 'TEXT' && item.validationType !== 'DATE'">
      <div class="field-group">
          <label>{{item.fieldDisplayName}}</label> &nbsp; <label *ngIf="showLabel">[{{item.fieldId}}]</label><br/>
            <input  class="defaultFontSize" id="item.fieldId" type="text"  [(ngModel)]="formFieldListValueArr[i + commonCount]" value="{{formFieldListValueArr[i + commonCount]}}"/>
      </div>
    </div> 
    <div *ngIf="item.fieldType == 'LIST_BOX'">
        <div class="field-group">
            <label for="reportType">{{item.fieldDisplayName}}</label> &nbsp; <label for="reportType">{{item.fieldId}}</label><br/>
                    <select class="browser-default custom-select defaultFontSize"  required="required"  [(ngModel)]="formFieldListValueArr[i + commonCount]"  value="{{formFieldListValueArr[i + commonCount]}}">
                        <option *ngFor="let listItem of item.formFieldValues" class="defaultFontSize" value="{{listItem.id}}" >{{listItem.name}}</option>
                      </select>
        </div>
    </div>
    <div *ngIf="item.fieldType == 'LIST_MULTI_SELECT'">
        <mat-form-field>
          <mat-label>{{item.fieldDisplayName}}</mat-label>
          <mat-select  multiple [(ngModel)]="formFieldListValueArr[i + commonCount]">
            <mat-option *ngFor="let listItem of item.formFieldValues" value="{{listItem.id}}">{{listItem.name}}</mat-option>
          </mat-select>
        </mat-form-field>
  
    <br/>
    <br/>
    </div>
    <div *ngIf="item.validationType == 'DATE'">
        <div class="field-group">
            <label for="reportType">{{item.fieldDisplayName}}</label><br/>
            <mat-form-field>
                <input matInput [matDatepicker]="picker" [(ngModel)]="formFieldListValueArr[i]" value="{{item.formFieldValues[0][name]}}">
                <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
                <mat-datepicker #picker></mat-datepicker>
              </mat-form-field>
        </div>
    </div>

    <br/>
  
    </div>


<button style="margin-left: 1000px; font-size: 15px;" class="btn btn-alt btn-small" (click)="runReport()">Run Report</button>
</div>
</div>
</div>

<div *ngIf="navigateToRun" >
  <!-- <app-run-dashboard-report [reportId]="reportId" [reportMode]="reportMode" [queryString]="getQueryString()" [DashboardReportObj]="DashboardReportObj"></app-run-dashboard-report> -->
  <app-run-report [reportId]="reportId" [reportMode]="reportMode" [queryString]="getQueryString()" [DashboardReportObj]="DashboardReportObj" [TriggerFFArr]="triggerFormFieldArr" [hitCnt]="hitCnt"></app-run-report>
</div>


<div *ngIf="error == true">
  <h1>Error Message:</h1>
  <p>{{errorMessage}}</p>
  <br/>
  <h1>Stack Trace:</h1>
  <p>{{stackTrace}}</p>

</div>