127b82db26651ba60c630420a714bc488ec8f854
[motion-next.git] /
1 <div id="voiceRecordings" class="page-layout simple left-sidenav inner-sidenav">
2   <!-- HEADER -->
3   <div
4     class="header md-accent-bg"
5     layout="row"
6     layout-align="space-between center"
7   >
8     <!-- APP TITLE -->
9     <div layout="row" layout-align="start center">
10       <div class="logo" layout="row" layout-align="start center">
11         <span class="logo-icon">
12           <md-icon md-font-icon="icon-phone" class="s24"></md-icon>
13         </span>
14         <span class="logo-text" translate="VOICE.VOICERECORDINGS"
15           >VoiceRecordings</span
16         >
17       </div>
18     </div>
19     <!-- / APP TITLE -->
20
21     <div layout="row">
22       <!-- SEARCH -->
23       <div
24         class="search-input-wrapper"
25         layout="row"
26         layout-align="start center"
27       >
28         <label for="search">
29           <md-icon md-font-icon="icon-magnify"></md-icon>
30         </label>
31         <md-input-container md-no-float class="m-0">
32           <input
33             id="search"
34             placeholder="Search for anyone"
35             type="text"
36             ng-model="vm.query.filter"
37             ng-model-options="{ debounce: 1000 }"
38             translate
39             translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE"
40           />
41         </md-input-container>
42       </div>
43       <!-- / SEARCH -->
44       <ms-quick-filter
45         filters="vm.quickFilters"
46         query="vm.query"
47         search="vm.getVoiceRecordings()"
48       ></ms-quick-filter>
49     </div>
50   </div>
51   <!-- / HEADER -->
52
53   <!-- SELECTED BAR -->
54   <div
55     ng-show="vm.selectedVoiceRecordings.length > 0"
56     class="selected-bar header animate-slide-down md-accent-bg"
57     layout="row"
58     layout-align="start center"
59   >
60     <div class="close-button-wrapper" ng-click="vm.selectedVoiceRecordings =[]">
61       <md-button layout="row" layout-align="start center">
62         <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>
63         <span translate="VOICE.BACK">Back</span>
64       </md-button>
65     </div>
66
67     <div flex layout="row" layout-align="space-between center">
68       <div>
69         <span class="selected-voiceRecordings-count">
70           <span>{{vm.selectedVoiceRecordings.length}}</span>
71           <span translate="VOICE.SELECTED">selected</span>
72         </span>
73
74         <md-menu class="select-menu" ng-if="!vm.currentThread">
75           <md-button
76             class="md-icon-button"
77             ng-click="$mdMenu.open($event)"
78             aria-label="multi select toggle"
79             translate
80             translate-attr-aria-label="VOICE.MULTI_SELECT_TOGGLE"
81           >
82             <md-icon md-font-icon="icon-menu-down"></md-icon>
83           </md-button>
84           <md-menu-content width="3">
85             <md-menu-item>
86               <md-button
87                 ng-click="vm.selectAllVoiceRecordings()"
88                 translate="VOICE.SELECT_ALL"
89               >
90                 Select all
91               </md-button>
92             </md-menu-item>
93             <md-menu-item>
94               <md-button
95                 ng-click="vm.deselectVoiceRecordings()"
96                 translate="VOICE.SELECT_NONE"
97               >
98                 Select none
99               </md-button>
100             </md-menu-item>
101           </md-menu-content>
102         </md-menu>
103       </div>
104
105       <div class="multi-select-actions">
106         <button
107           class="md-icon-button"
108           ng-csv="vm.exportSelectedVoiceRecordings"
109           csv-label="true"
110           filename="voiceRecordings.csv"
111         >
112           <md-icon md-font-icon="icon-file-excel"></md-icon>
113         </button>
114         <md-button
115           class="md-icon-button"
116           ng-if="vm.license.ai"
117           ng-click="vm.runtranscribesentimentSelectedVoiceRecordings($event)"
118           aria-label="transcribesentiment selected"
119           translate
120           translate-attr-label="VOICERECORDINGS.TRANSCRIBESENTIMENT_SELECTED"
121         >
122           <md-icon md-font-icon="icon-text-to-speech"></md-icon
123           ><md-tooltip
124             >{{'VOICE.RUNTRANSCRIBESENTIMENT_VOICERECORDING' |
125             translate}}</md-tooltip
126           >
127         </md-button>
128         <md-button
129           class="md-icon-button"
130           ng-if="vm.license.ai"
131           ng-click="vm.runtranscribeSelectedVoiceRecordings($event)"
132           aria-label="transcribe selected"
133           translate
134           translate-attr-label="VOICERECORDINGS.TRANSCRIBE_SELECTED"
135         >
136           <md-icon md-font-icon="icon-format-size"></md-icon
137           ><md-tooltip
138             >{{'VOICE.RUNTRANSCRIBE_VOICERECORDING' | translate}}</md-tooltip
139           >
140         </md-button>
141         <md-button
142           class="md-icon-button"
143           ng-if="vm.license.ai"
144           ng-click="vm.runsentimentSelectedVoiceRecordings($event)"
145           aria-label="transcribe selected"
146           translate
147           translate-attr-label="VOICERECORDINGS.SENTIMENT_SELECTED"
148         >
149           <md-icon md-font-icon="icon-heart-outline"></md-icon
150           ><md-tooltip
151             >{{'VOICE.RUNSENTIMENT_VOICERECORDING' | translate}}</md-tooltip
152           >
153         </md-button>
154         <md-button
155           class="md-icon-button"
156           ng-if="vm.crudPermissions.canDelete"
157           ng-click="vm.deleteSelectedVoiceRecordings($event)"
158           aria-label="delete selected"
159           translate
160           translate-attr-label="VOICE.DELETE_SELECTED"
161         >
162           <md-icon md-font-icon="icon-delete"></md-icon>
163         </md-button>
164       </div>
165     </div>
166   </div>
167   <!-- / SELECTED BAR -->
168
169   <!-- CONTENT -->
170   <div class="content" md-background-bg layout="row" layout-align="start start">
171     <!-- MAIN -->
172     <div class="main scrollable" ms-scroll>
173       <!-- VOICERECORDING TABLE -->
174       <md-card>
175         <md-table-container>
176           <table
177             md-table
178             md-row-select
179             multiple
180             ng-model="vm.selectedVoiceRecordings"
181             md-progress="vm.promise"
182           >
183             <thead
184               md-head
185               md-order="vm.query.sort"
186               md-on-reorder="vm.getVoiceRecordings"
187             >
188               <tr md-row>
189                 <th
190                   md-column
191                   ng-if="vm.table == 'users' || vm.table == 'agents'"
192                   width="20px"
193                 ></th>
194                 <th md-column md-order-by="type">
195                   {{ 'VOICE.TYPE' | translate }}
196                 </th>
197                 <th md-column md-order-by="uniqueid">
198                   {{ 'VOICE.UNIQUEID' | translate }}
199                 </th>
200                 <th md-column md-order-by="calleridnum">
201                   {{ 'VOICE.CALLER' | translate }}
202                 </th>
203                 <th md-column md-order-by="exten">
204                   {{ 'VOICE.CALLED' | translate }}
205                 </th>
206                 <th md-column md-order-by="connectedlinenum">
207                   {{ 'VOICE.CONNECTED' | translate }}
208                 </th>
209                 <th md-column md-order-by="queue">
210                   {{ 'VOICE.QUEUE' | translate }}
211                 </th>
212                 <th md-column md-order-by="membername">
213                   {{ 'VOICE.AGENT' | translate }}
214                 </th>
215                 <th md-column md-order-by="rating">
216                   {{ 'VOICE.RATING' | translate }}
217                 </th>
218                 <th md-column md-order-by="audio">
219                   {{ 'VOICE.AUDIO' | translate }}
220                 </th>
221                 <th md-column md-order-by="createdAt">
222                   {{ 'VOICE.DATE' | translate }}
223                 </th>
224                 <th md-column md-order-by="userDisposition">
225                   {{ 'VOICE.DISPOSITION' | translate }}
226                 </th>
227                 <th md-column md-order-by="userSecondDisposition">
228                   {{ 'VOICE.SECOND_LEVEL_DISPOSITION' | translate }}
229                 </th>
230                 <th md-column md-order-by="userThirdDisposition">
231                   {{ 'VOICE.THIRD_LEVEL_DISPOSITION' | translate }}
232                 </th>
233                 <th
234                   md-column
235                   md-order-by="transcribeStatus"
236                   ng-if="vm.license.ai"
237                 >
238                   {{ 'VOICE.TRANSCRIBE' | translate }}
239                 </th>
240                 <th md-column md-order-by="sentiment" ng-if="vm.license.ai">
241                   {{ 'VOICE.SENTIMENTANALYSIS' | translate }}
242                 </th>
243                 <th md-column width="10px"></th>
244               </tr>
245             </thead>
246             <tbody md-body>
247               <tr md-row ng-hide="vm.voiceRecordings.rows.length">
248                 <td md-cell colspan="16">
249                   <div layout="row" layout-align="center center">
250                     <span translate="VOICE.NO_AVAILABLE_INFO"
251                       >No Available Info</span
252                     >
253                   </div>
254                 </td>
255               </tr>
256               <tr
257                 md-row
258                 md-select="voiceRecording"
259                 md-select-id="id"
260                 ng-repeat="voiceRecording in vm.voiceRecordings.rows"
261               >
262                 <td md-cell ng-if="voiceRecording.userpic">
263                   <img
264                     class="avatar"
265                     alt="{{voiceRecording.name}}"
266                     ng-src="api/users/{{voiceRecording.id}}/avatar"
267                   />
268                 </td>
269                 <td
270                   md-cell
271                   ng-if="!voiceRecording.userpic && (vm.table == 'users' || vm.table == 'agents')"
272                 >
273                   <img
274                     class="avatar"
275                     alt="{{voiceRecording.name}}"
276                     ng-src="assets/images/avatars/profile.png"
277                   />
278                 </td>
279                 <td
280                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
281                   md-cell
282                   class="type"
283                 >
284                   {{voiceRecording.type}}
285                 </td>
286                 <td
287                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
288                   md-cell
289                   class="uniqueid"
290                 >
291                   {{voiceRecording.uniqueid}}
292                 </td>
293                 <td
294                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
295                   md-cell
296                   class="calleridnum"
297                 >
298                   {{voiceRecording.calleridnum}}
299                 </td>
300                 <td
301                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
302                   md-cell
303                   class="exten"
304                 >
305                   {{voiceRecording.exten}}
306                 </td>
307                 <td
308                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
309                   md-cell
310                   class="connectedlinenum"
311                 >
312                   {{voiceRecording.connectedlinenum}}
313                 </td>
314                 <td
315                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
316                   md-cell
317                   class="queue"
318                 >
319                   {{voiceRecording.queue}}
320                 </td>
321                 <td
322                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
323                   md-cell
324                   class="membername"
325                 >
326                   {{voiceRecording.membername}}
327                 </td>
328                 <td
329                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
330                   md-cell
331                   class="rating"
332                 >
333                   <md-icon
334                     md-font-icon="icon-star"
335                     style="color: red"
336                     ng-show="voiceRecording.rating"
337                     ng-repeat="rating in [1,2,3,4,5] | limitTo:voiceRecording.rating"
338                   ></md-icon
339                   ><span
340                     ng-hide="voiceRecording.rating"
341                     translate="VOICE.NO_RATING"
342                     >No rating</span
343                   >
344                 </td>
345                 <td md-cell class="audio" ng-switch="voiceRecording.format">
346                   <!-- audio recording directive -->
347                   <ms-recording
348                     ng-switch-when=".wav"
349                     id="voiceRecording.id"
350                   ></ms-recording>
351                   <!-- / audio recording directive -->
352                   <span ng-switch-when=".gsm|.WAV" ng-switch-when-separator="|">
353                     <em>{{ 'VOICE.CANT_PLAY_GSM_AUDIO_FILES' | translate }}</em>
354                   </span>
355                 </td>
356                 <td
357                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
358                   md-cell
359                   class="createdAt"
360                 >
361                   {{voiceRecording.createdAt | date:'medium' }}
362                 </td>
363                 <td
364                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
365                   md-cell
366                   class="userDisposition"
367                 >
368                   {{voiceRecording.userDisposition}}
369                 </td>
370                 <td
371                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
372                   md-cell
373                   class="userSecondDisposition"
374                 >
375                   {{voiceRecording.userSecondDisposition}}
376                 </td>
377                 <td
378                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
379                   md-cell
380                   class="userThirdDisposition"
381                 >
382                   {{voiceRecording.userThirdDisposition}}
383                 </td>
384                 <td
385                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
386                   md-cell
387                   class="transcribeStatus"
388                   ng-if="vm.license.ai"
389                 >
390                   {{ 'VOICE.TRANSCRIBESTATUS_' + voiceRecording.transcribeStatus
391                   | translate}}
392                 </td>
393                 <td
394                   ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(voiceRecording, ev) : vm.createOrEditVoiceRecording($event, voiceRecording)"
395                   md-cell
396                   class="sentiment"
397                   ng-if="vm.license.ai"
398                 >
399                   {{voiceRecording.sentiment}}
400                 </td>
401
402                 <td md-cell class="actions">
403                   <md-menu>
404                     <md-button
405                       class="md-icon-button"
406                       aria-label="More"
407                       translate
408                       translate-attr-aria-label="VOICE.MORE"
409                       ng-click="$mdMenu.open($event)"
410                     >
411                       <md-icon md-font-icon="icon-dots-vertical"></md-icon>
412                     </md-button>
413
414                     <md-menu-content width="3">
415                       <!-- SUBACTIONS -->
416
417                       <!-- ACTIONS -->
418
419                       <md-menu-item ng-if="vm.crudPermissions.canEdit">
420                         <md-button
421                           ng-click="vm.editstate(voiceRecording, $event    )"
422                           translate="VOICE.EDIT_VOICERECORDING"
423                         >
424                           Edit VoiceRecording
425                         </md-button>
426                       </md-menu-item>
427
428                       <!-- SUBACTIONS -->
429
430                       <!-- ACTIONS -->
431
432                       <md-menu-item
433                         ng-if="voiceRecording.transcribeStatus == 'NEW' && vm.license.ai"
434                       >
435                         <md-button
436                           ng-click="vm.runtranscriberuntranscribesentiment(voiceRecording, $event    )"
437                           translate="VOICE.RUNTRANSCRIBE_VOICERECORDING"
438                         >
439                           RunTranscribe VoiceRecording
440                         </md-button>
441                       </md-menu-item>
442
443                       <!-- SUBACTIONS -->
444
445                       <!-- ACTIONS -->
446
447                       <md-menu-item
448                         ng-if="voiceRecording.transcribeStatus == 'NEW' && vm.license.ai"
449                       >
450                         <md-button
451                           ng-click="vm.runtranscribesentimentruntranscribesentiment(voiceRecording, $event    )"
452                           translate="VOICE.RUNTRANSCRIBESENTIMENT_VOICERECORDING"
453                         >
454                           RunTranscribeSentiment VoiceRecording
455                         </md-button>
456                       </md-menu-item>
457
458                       <!-- SUBACTIONS -->
459
460                       <!-- ACTIONS -->
461
462                       <md-menu-item
463                         ng-if="voiceRecording.transcribeStatus == 'COMPLETED' && voiceRecording.sentiment == null && vm.license.ai"
464                       >
465                         <md-button
466                           ng-click="vm.runsentimentruntranscribesentiment(voiceRecording, $event    )"
467                           translate="VOICE.RUNSENTIMENT_VOICERECORDING"
468                         >
469                           RunSentiment VoiceRecording
470                         </md-button>
471                       </md-menu-item>
472
473                       <!-- SUBACTIONS -->
474
475                       <!-- ACTIONS -->
476
477                       <md-menu-item
478                         ng-if="voiceRecording.transcribeStatus == 'COMPLETED' && vm.license.ai"
479                       >
480                         <md-button
481                           ng-click="vm.downloadtranscribefile2(voiceRecording, $event    )"
482                           translate="VOICE.DOWNLOADTRANSCRIBE_VOICERECORDING"
483                         >
484                           DownloadTranscribe VoiceRecording
485                         </md-button>
486                       </md-menu-item>
487
488                       <!-- SUBACTIONS -->
489
490                       <!-- ACTIONS -->
491
492                       <md-menu-item>
493                         <md-button
494                           ng-click="vm.downloadfile2(voiceRecording, $event  , 'voice/recordings'   )"
495                           translate="VOICE.DOWNLOAD_VOICERECORDING"
496                         >
497                           Download VoiceRecording
498                         </md-button>
499                       </md-menu-item>
500
501                       <!-- SUBACTIONS -->
502
503                       <!-- ACTIONS -->
504
505                       <md-menu-item ng-if="vm.crudPermissions.canDelete">
506                         <md-button
507                           ng-click="vm.deleteconfirm(voiceRecording, $event    )"
508                           translate="VOICE.DELETE_VOICERECORDING"
509                         >
510                           Delete VoiceRecording
511                         </md-button>
512                       </md-menu-item>
513                     </md-menu-content>
514                   </md-menu>
515                 </td>
516               </tr>
517             </tbody>
518           </table>
519         </md-table-container>
520
521         <md-table-pagination
522           md-label="{page: '{{'VOICE.PAGE' | translate}}:', rowsPerPage: '{{'VOICE.ROWSPERPAGE' | translate}}:', of: '{{'VOICE.OF' | translate}}'}"
523           md-limit="vm.query.limit"
524           md-limit-options="[10, 15, 20, 50, 100, 250]"
525           md-page="vm.query.page"
526           md-total="{{vm.voiceRecordings.count}}"
527           md-on-paginate="vm.getVoiceRecordings"
528           md-page-select
529         ></md-table-pagination>
530       </md-card>
531       <!-- / VOICERECORDING TABLE -->
532       <!-- NO RESULTS -->
533
534       <!-- / NO RESULTS -->
535     </div>
536     <!-- / MAIN -->
537   </div>
538   <!-- / CONTENT -->
539
540   <!-- NO ADD BUTTON BUTTON -->
541 </div>