4df986cccfd8c00a1856ac02563f3357a81d710e
[portal/sdk.git] /
1 <div class="stdForm">
2         <br/>
3         <div class="tab-content">
4                 <h1>Step {{stepNo}} - Report Security</h1>
5         </div>
6         <br/>
7         <br/>
8         <div *ngIf="showSpinner">
9                         <div class="lds-ring"><div></div><div></div><div></div><div></div></div>
10         </div>
11         
12         <div *ngIf="!showSpinner">
13         <div class="tab-pane">
14         <div class="field-group">
15                
16         
17                 
18                         <table>
19                                 <tr>
20                                 <!-- <div class="column"> -->
21                                         <td>
22                                         <label class="left">Created By: </label>&nbsp;&nbsp;&nbsp;<label>{{reportSecurityInfo.createdUser}}</label>
23                                         
24                                         </td>
25                                         <td>
26                                         <label class="right">Created Date: </label>&nbsp;&nbsp;&nbsp;<label>{{reportSecurityInfo.createdDate}}</label>
27                                         </td>
28                                         <td>
29                                         
30                                         
31                                         </td>
32                                      
33                                 <!-- </div> -->
34                         </tr>
35                         <tr>
36                                 <!-- <div class="column"> -->
37                                         <td>
38                                         <label class="left">Last Updated By: </label>&nbsp;&nbsp;&nbsp;<label>{{reportSecurityInfo.updateUser}}</label>
39                                         </td>
40                                         <td>
41                                         <label class="right">Last Updated: </label>&nbsp;&nbsp;&nbsp;<label>{{reportSecurityInfo.updatedDate}}</label>
42                                         </td>
43                                          
44                                    
45                                 <!-- </div> -->
46                         </tr>
47                         <tr>
48                                 <td>
49                                                 <label for="reportType">Report Owner</label> <br/>
50                                                 <select  class="browser-default custom-select defaultFontSize"  required="required" placeholder="Select Report Type" [(ngModel)]="reportOwner"  value="{{reportSecurityInfo.createdUser}}">
51                                                         <option  class="defaultFontSize" selected>Select Report Owner  </option>
52                                                         <option  *ngFor="let reportOwner of reportOwnerList" class="defaultFontSize" value="{{reportOwner.name}}" >{{reportOwner.name}}</option>
53                                                 </select>    
54                                 </td>
55                                 <td>
56                                                 <label for="reportType">Public? (All users can run the report):</label> <br/>
57                                                 <select class="browser-default custom-select defaultFontSize"  required="required" placeholder="Select Report Type" [(ngModel)]="publicReport"  value="publicReport">
58                                                         <option  class="defaultFontSize" value="YES" >YES</option>
59                                                         <option  class="defaultFontSize" value="NO" >NO</option>
60                                                 </select>  
61                                 </td>
62                         </tr>
63                         </table>
64                 
65                 
66                 <br/>
67                 
68                 <table>
69                         <tr>
70                                 <h4>Report Users</h4>
71                         </tr>
72                 </table>
73           
74                 <div *ngIf="showUserListSpinner">
75                                 <div class="lds-ring"><div></div><div></div><div></div><div></div></div>
76                 </div>
77
78                 <div *ngIf="!showUserListSpinner">
79                         <table>
80                                 <tr>
81                                         <th><label>No</label></th>
82                                         <th><label>User Name</label></th>
83                                         <th><label>Run Access</label></th>
84                                         <th><label>Edit Access</label></th>
85                                         <th><label>Remove</label></th>
86                                 </tr>
87                                 <tr *ngFor="let reportUser of reportUserList; let i = index;">
88                                         <td>{{i+1}}</td>
89                                         <td style="width: 700px;"> {{reportUser.name}}</td>
90                                         <td>
91                                                         <div class="onoffswitch" >
92                                                                         <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" disabled="disabled" Checked="true">
93                                                                         <label class="onoffswitch-label" for="myonoffswitch">
94                                                                             <span class="onoffswitch-inner"></span>
95                                                                             <span class="onoffswitch-switch"></span>
96                                                                         </label>
97                                                                     </div>
98                                         </td>
99                                         <td>
100                                                         <div class="onoffswitch">
101                                                                         <input type="checkbox" name="reportUser{{i}}" class="onoffswitch-checkbox" id="reportUser{{i}}"  (change)="addUserEditAccess(reportUser.id, i)"  [(ngModel)]="userEditAccessArr[i]" Checked="userEditAccessArr[i]"> 
102                                                                         <label class="onoffswitch-label" for="reportUser{{i}}">
103                                                                             <span class="onoffswitch-inner"></span>
104                                                                             <span class="onoffswitch-switch"></span>
105                                                                         </label>
106                                                                     </div>
107                                         </td>
108                                         <td><mat-icon aria-hidden="false" aria-label="delete" (click)="removeReportUser(reportUser.name)">delete</mat-icon></td>
109                                 </tr>
110                         </table>
111                 </div>
112                 <div>
113                         <table>
114                         <tr>
115                         <label for="reportType">Grant Access To:</label> <br/>
116                         <select style="width: 95%" class="browser-default custom-select defaultFontSize"  required="required" placeholder="Select user" [(ngModel)]="reportUser"  value="reportUser">
117                                 <option  class="defaultFontSize" selected>Select User</option>
118                                         <option  *ngFor="let reportOwner of reportOwnerList" class="defaultFontSize" value="{{reportOwner.name}}" >{{reportOwner.name}}</option>
119                                         
120                         </select>
121                         </tr>
122                         <br/>
123                         <tr>
124                         <button style="font-size: 17px;" class="btn btn-alt btn-small" (click)="addReportUser()" >Add</button>
125                         </tr>  
126                         </table>
127                 </div>
128                 
129                 <table>
130                 <tr>
131                         <h4>Report Roles</h4>
132                 </tr>
133                 </table>
134
135                 <div *ngIf="showRoleListSpinner">
136                                 <div class="lds-ring"><div></div><div></div><div></div><div></div></div>
137                 </div>
138               
139                 <div *ngIf="!showRoleListSpinner">
140                         <table>
141                                 <tr>
142                                         <th><label>No</label></th>
143                                         <th><label>User Name</label></th>
144                                         <th><label>Run Access</label></th>
145                                         <th><label>Edit Access</label></th>
146                                         <th><label>Remove</label></th>
147                                 </tr>
148                                 <tr *ngFor="let securityRole of reportSecurityRoles; let j = index;">
149                                         <td>{{j+1}}</td>
150                                         <td style="width: 700px;">{{securityRole.name}}</td>
151                                         <td>
152                                                         <div class="onoffswitch" >
153                                                                         <input type="checkbox" name="onoffswitch2" class="onoffswitch-checkbox" id="myonoffswitch2" disabled="disabled" style="cursor: not-allowed;" checked>
154                                                                         <label class="onoffswitch-label" for="myonoffswitch2">
155                                                                             <span class="onoffswitch-inner"></span>
156                                                                             <span class="onoffswitch-switch"></span>
157                                                                         </label>
158                                                                     </div>
159                                         </td>
160                                         <td>
161                                                         <div class="onoffswitch">
162                                                                         <input type="checkbox" name="securityRole{{j}}" class="onoffswitch-checkbox" id="securityRole{{j}}" (change)="addRoleEditAccess(securityRole.id, j)"  [(ngModel)]="addRoleEditAccessArr[j]" Checked="addRoleEditAccessArr[j]">
163                                                                         <label class="onoffswitch-label" for="securityRole{{j}}">
164                                                                             <span class="onoffswitch-inner"></span>
165                                                                             <span class="onoffswitch-switch"></span>
166                                                                         </label>
167                                                                     </div>
168                                         </td>
169                                         <td><mat-icon aria-hidden="false" aria-label="delete" (click)="removeReportRole(securityRole.id)">delete</mat-icon></td>
170                                 </tr>
171                         </table>
172                 </div>
173                 <div>
174                         <table>
175                                 <tr>
176                 <label for="reportType">Grant Access To:</label> <br/>
177                         <select style="width: 95%" class="browser-default custom-select defaultFontSize"  required="required" placeholder="Select Report Type" [(ngModel)]="reportRole"  value="reportRole">
178                                 <option  class="defaultFontSize" selected>Select Role  </option>
179                                                 <option  *ngFor="let reportRoles of reportRoleList" class="defaultFontSize" value="{{reportRoles.name}}" >{{reportRoles.name}}</option>
180                                                 
181                         </select>
182                                 </tr>
183                                 <br/>
184                                 <tr>
185                         <button style="font-size: 17px;" class="btn btn-alt btn-small" (click)="addReportRole()" >Add</button>
186                                 </tr>
187                         </table>
188                 </div>
189                 
190                 <br/>  
191                 <button style="font-size: 17px;" class="btn btn-alt btn-small" (click)="saveSecurityTabData()" >Save</button>
192           
193         </div>
194
195         </div>
196         </div>
197 </div>