140a82e108ddc09d2e251b4eb7073ced7bcae23c
[motion-next.git] /
1 <div
2   id="extractedReports"
3   class="page-layout simple left-sidenav inner-sidenav motion-list"
4 >
5   <!-- HEADER -->
6   <div
7     class="header md-accent-bg"
8     layout="row"
9     layout-align="space-between center"
10   >
11     <!-- APP TITLE -->
12     <div layout="row" layout-align="start center">
13       <div class="logo" layout="row" layout-align="start center">
14         <span class="logo-icon">
15           <md-icon md-font-icon="icon-chart-line" class="s24"></md-icon>
16         </span>
17         <span class="logo-text" translate="ANALYTICS.EXTRACTEDREPORTS"
18           >ExtractedReports</span
19         >
20       </div>
21     </div>
22     <!-- / APP TITLE -->
23
24     <div layout="row">
25       <!-- SEARCH -->
26       <div
27         class="search-input-wrapper"
28         layout="row"
29         layout-align="start center"
30       >
31         <label for="search">
32           <md-icon md-font-icon="icon-magnify"></md-icon>
33         </label>
34         <md-input-container md-no-float class="m-0">
35           <input
36             id="search"
37             placeholder="Search for anyone"
38             type="text"
39             ng-model="vm.query.filter"
40             ng-model-options="{ debounce: 1000 }"
41             translate
42             translate-attr-placeholder="ANALYTICS.SEARCH_FOR_ANYONE"
43           />
44         </md-input-container>
45       </div>
46       <!-- / SEARCH -->
47     </div>
48   </div>
49   <!-- / HEADER -->
50
51   <!-- SELECTED BAR -->
52   <div
53     ng-show="vm.selectedExtractedReports.length > 0"
54     class="selected-bar header animate-slide-down md-accent-bg"
55     layout="row"
56     layout-align="start center"
57   >
58     <div
59       class="close-button-wrapper"
60       ng-click="vm.selectedExtractedReports =[]"
61     >
62       <md-button layout="row" layout-align="start center">
63         <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>
64         <span translate="ANALYTICS.BACK">Back</span>
65       </md-button>
66     </div>
67
68     <div flex layout="row" layout-align="space-between center">
69       <div>
70         <span class="selected-extractedReports-count">
71           <span>{{vm.selectedExtractedReports.length}}</span>
72           <span translate="ANALYTICS.SELECTED">selected</span>
73         </span>
74
75         <md-menu class="select-menu" ng-if="!vm.currentThread">
76           <md-button
77             class="md-icon-button"
78             ng-click="$mdMenu.open($event)"
79             aria-label="multi select toggle"
80             translate
81             translate-attr-aria-label="ANALYTICS.MULTI_SELECT_TOGGLE"
82           >
83             <md-icon md-font-icon="icon-menu-down"></md-icon>
84           </md-button>
85           <md-menu-content width="3">
86             <md-menu-item>
87               <md-button
88                 ng-click="vm.selectAllExtractedReports()"
89                 translate="ANALYTICS.SELECT_ALL"
90               >
91                 Select all
92               </md-button>
93             </md-menu-item>
94             <md-menu-item>
95               <md-button
96                 ng-click="vm.deselectExtractedReports()"
97                 translate="ANALYTICS.SELECT_NONE"
98               >
99                 Select none
100               </md-button>
101             </md-menu-item>
102           </md-menu-content>
103         </md-menu>
104       </div>
105
106       <div class="multi-select-actions">
107         <button
108           class="md-icon-button"
109           ng-csv="vm.exportSelectedExtractedReports"
110           csv-label="true"
111           filename="extractedReports.csv"
112         >
113           <md-icon md-font-icon="icon-file-excel"></md-icon>
114         </button>
115         <md-button
116           class="md-icon-button"
117           ng-if="vm.crudPermissions.canDelete"
118           ng-click="vm.deleteSelectedExtractedReports($event)"
119           aria-label="delete selected"
120           translate
121           translate-attr-label="ANALYTICS.DELETE_SELECTED"
122         >
123           <md-icon md-font-icon="icon-delete"></md-icon>
124         </md-button>
125       </div>
126     </div>
127   </div>
128   <!-- / SELECTED BAR -->
129
130   <!-- CONTENT -->
131   <div class="content" md-background-bg layout="row" layout-align="start start">
132     <!-- MAIN -->
133     <div class="main scrollable" ms-scroll>
134       <!-- EXTRACTEDREPORT TABLE -->
135       <md-card>
136         <md-table-container>
137           <table
138             md-table
139             md-row-select
140             multiple
141             ng-model="vm.selectedExtractedReports"
142             md-progress="vm.promise"
143           >
144             <thead
145               md-head
146               md-order="vm.query.sort"
147               md-on-reorder="vm.getExtractedReports"
148             >
149               <tr md-row>
150                 <th
151                   md-column
152                   ng-if="vm.table == 'users' || vm.table == 'agents'"
153                   width="20px"
154                 ></th>
155                 <th md-column md-order-by="id">
156                   {{ 'ANALYTICS.ID' | translate }}
157                 </th>
158                 <th md-column md-order-by="name">
159                   {{ 'ANALYTICS.REPORTNAME' | translate }}
160                 </th>
161                 <th md-column md-order-by="basename">
162                   {{ 'ANALYTICS.NAME' | translate }}
163                 </th>
164                 <th md-column md-order-by="type">
165                   {{ 'ANALYTICS.TYPE' | translate }}
166                 </th>
167                 <th md-column md-order-by="startDate">
168                   {{ 'ANALYTICS.DATE_RANGE_FROM' | translate }}
169                 </th>
170                 <th md-column md-order-by="endDate">
171                   {{ 'ANALYTICS.DATE_RANGE_TO' | translate }}
172                 </th>
173                 <th md-column md-order-by="createdAt">
174                   {{ 'ANALYTICS.GENERATED_AT' | translate }}
175                 </th>
176                 <th md-column md-order-by="status">
177                   {{ 'ANALYTICS.STATUS' | translate }}
178                 </th>
179                 <th md-column md-order-by="output">
180                   {{ 'ANALYTICS.OUTPUT' | translate }}
181                 </th>
182                 <th md-column width="10px"></th>
183               </tr>
184             </thead>
185             <tbody md-body>
186               <tr md-row ng-hide="vm.extractedReports.rows.length">
187                 <td md-cell colspan="10">
188                   <div layout="row" layout-align="center center">
189                     <span translate="ANALYTICS.NO_AVAILABLE_INFO"
190                       >No Available Info</span
191                     >
192                   </div>
193                 </td>
194               </tr>
195               <tr
196                 md-row
197                 md-select="extractedReport"
198                 md-select-id="id"
199                 ng-repeat="extractedReport in vm.extractedReports.rows"
200               >
201                 <td md-cell ng-if="extractedReport.userpic">
202                   <img
203                     class="avatar"
204                     alt="{{extractedReport.name}}"
205                     ng-src="api/users/{{extractedReport.id}}/avatar"
206                   />
207                 </td>
208                 <td
209                   md-cell
210                   ng-if="!extractedReport.userpic && (vm.table == 'users' || vm.table == 'agents')"
211                 >
212                   <img
213                     class="avatar"
214                     alt="{{extractedReport.name}}"
215                     ng-src="assets/images/avatars/profile.png"
216                   />
217                 </td>
218                 <td
219                   ng-click="vm.createOrEditExtractedReport($event, extractedReport)"
220                   md-cell
221                   class="id"
222                 >
223                   {{extractedReport.id}}
224                 </td>
225                 <td
226                   ng-click="vm.createOrEditExtractedReport($event, extractedReport)"
227                   md-cell
228                   class="name"
229                 >
230                   {{extractedReport.name}}
231                 </td>
232                 <td
233                   ng-click="vm.createOrEditExtractedReport($event, extractedReport)"
234                   md-cell
235                   class="basename"
236                 >
237                   {{extractedReport.basename}}
238                 </td>
239                 <td
240                   ng-click="vm.createOrEditExtractedReport($event, extractedReport)"
241                   md-cell
242                   class="type"
243                 >
244                   {{extractedReport.type}}
245                 </td>
246                 <td
247                   ng-click="vm.createOrEditExtractedReport($event, extractedReport)"
248                   md-cell
249                   class="startDate"
250                 >
251                   {{extractedReport.startDate | date:'medium' }}
252                 </td>
253                 <td
254                   ng-click="vm.createOrEditExtractedReport($event, extractedReport)"
255                   md-cell
256                   class="endDate"
257                 >
258                   {{extractedReport.endDate | date:'medium' }}
259                 </td>
260                 <td
261                   ng-click="vm.createOrEditExtractedReport($event, extractedReport)"
262                   md-cell
263                   class="createdAt"
264                 >
265                   {{extractedReport.createdAt | date:'medium' }}
266                 </td>
267                 <td
268                   ng-click="vm.createOrEditExtractedReport($event, extractedReport)"
269                   md-cell
270                   class="status"
271                 >
272                   {{extractedReport.status}}
273                 </td>
274                 <td
275                   ng-click="vm.createOrEditExtractedReport($event, extractedReport)"
276                   md-cell
277                   class="output"
278                 >
279                   {{extractedReport.output}}
280                 </td>
281
282                 <td md-cell class="actions">
283                   <md-menu>
284                     <md-button
285                       class="md-icon-button"
286                       aria-label="More"
287                       translate
288                       translate-attr-aria-label="ANALYTICS.MORE"
289                       ng-click="$mdMenu.open($event)"
290                     >
291                       <md-icon md-font-icon="icon-dots-vertical"></md-icon>
292                     </md-button>
293
294                     <md-menu-content width="3">
295                       <!-- SUBACTIONS -->
296
297                       <!-- ACTIONS -->
298
299                       <md-menu-item ng-if="vm.crudPermissions.canEdit">
300                         <md-button
301                           ng-click="vm.editdialog(extractedReport, $event    )"
302                           translate="ANALYTICS.EDIT_EXTRACTEDREPORT"
303                         >
304                           Edit ExtractedReport
305                         </md-button>
306                       </md-menu-item>
307
308                       <!-- SUBACTIONS -->
309
310                       <!-- ACTIONS -->
311
312                       <md-menu-item
313                         ng-if="extractedReport.status == 'Completed'"
314                       >
315                         <md-button
316                           ng-click="vm.downloadfile2(extractedReport, $event  , 'analytics/extracted_reports'   )"
317                           translate="ANALYTICS.DOWNLOAD_EXTRACTEDREPORT"
318                         >
319                           Download ExtractedReport
320                         </md-button>
321                       </md-menu-item>
322
323                       <!-- SUBACTIONS -->
324
325                       <!-- ACTIONS -->
326
327                       <md-menu-item ng-if="vm.crudPermissions.canDelete">
328                         <md-button
329                           ng-click="vm.deleteconfirm(extractedReport, $event    )"
330                           translate="ANALYTICS.DELETE_EXTRACTEDREPORT"
331                         >
332                           Delete ExtractedReport
333                         </md-button>
334                       </md-menu-item>
335                     </md-menu-content>
336                   </md-menu>
337                 </td>
338               </tr>
339             </tbody>
340           </table>
341         </md-table-container>
342
343         <md-table-pagination
344           md-label="{page: '{{'ANALYTICS.PAGE' | translate}}:', rowsPerPage: '{{'ANALYTICS.ROWSPERPAGE' | translate}}:', of: '{{'ANALYTICS.OF' | translate}}'}"
345           md-limit="vm.query.limit"
346           md-limit-options="[10, 15, 20, 50, 100, 250]"
347           md-page="vm.query.page"
348           md-total="{{vm.extractedReports.count}}"
349           md-on-paginate="vm.getExtractedReports"
350           md-page-select
351         ></md-table-pagination>
352       </md-card>
353       <!-- / EXTRACTEDREPORT TABLE -->
354       <!-- NO RESULTS -->
355
356       <!-- / NO RESULTS -->
357     </div>
358     <!-- / MAIN -->
359   </div>
360   <!-- / CONTENT -->
361
362   <!-- NO ADD BUTTON BUTTON -->
363 </div>