2 id="whatsapp-whatsappAccount"
3 class="page-layout simple tabbed"
7 <div class="header md-accent-bg" layout="row" layout-align="start center">
8 <div class="white-fg" layout="row" layout-align="start center" flex>
10 class="goto-whatsappAccounts-button md-icon-button"
11 aria-label="Go to whatsappAccounts"
12 ng-click="vm.gotoWhatsappAccounts()"
14 translate-attr-aria-label="WHATSAPP.GO_TO_WHATSAPPACCOUNTS"
16 <md-icon md-font-icon="icon-arrow-left"></md-icon>
19 <div layout="row" layout-align="start center">
20 <div class="whatsappAccount-image" hide-xs>
21 <img ng-src="assets/images/business/whatsappAccounts.jpg" />
24 <div layout="column" layout-align="start start">
26 #{{vm.whatsappAccount.id}}
27 <span ng-if="vm.whatsappAccount.name"
28 >{{vm.whatsappAccount.name}}</span
31 <div class="subtitle secondary-text">
32 <span translate="WHATSAPP.CREATED_AT"></span>
33 <span>{{vm.whatsappAccount.createdAt | date:'medium'}}</span>
41 ng-click="vm.agentadddialog(vm.whatsappAccount, $event)"
42 class="md-fab md-warn md-icon-button"
46 ><span translate="WHATSAPP.AGENTADD_WHATSAPPACCOUNT"></span
48 <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>
54 ng-click="vm.saveWhatsappAccount()"
55 ng-if="vm.crudPermissions.canEdit"
56 class="send-button md-accent md-raised"
57 ng-disabled="(generalForm.$invalid) || (notificationForm.$invalid) || (transferForm.$invalid) || (proxyForm.$invalid) || (dispositionForm.$invalid) || (whatsappDispositionsForm.$invalid) || (whatsappCannedAnswersForm.$invalid) || (actionsForm.$invalid) || (interactionsForm.$invalid)"
58 translate="WHATSAPP.SAVE"
59 translate-attr-aria-label="WHATSAPP.SAVE"
70 md-selected="vm.selectedTab"
71 md-stretch-tabs="always"
78 <span translate="WHATSAPP.SETTINGS">SETTINGS</span>
82 class="whatsappAccount-detail-form-container general md-background-bg md-whiteframe-1dp"
84 <div class="pb-16" layout="row" layout-align="start center">
85 <div class="h2 secondary-text" translate="WHATSAPP.GENERAL">
89 <form name="generalForm" novalidate>
90 <md-input-container class="md-block">
91 <label translate="WHATSAPP.NAME">Name</label>
95 ng-model="vm.whatsappAccount.name"
102 <span translate="WHATSAPP.HELP.NAME"></span>
105 ng-messages="generalForm['name'].$error"
106 ng-show="generalForm['name'].$touched"
109 <div ng-message="required">
110 <span translate="WHATSAPP.ERRORS.NAME_REQUIRED"
111 >Name field is required</span
115 </md-input-container>
116 <md-input-container class="md-block">
117 <label translate="WHATSAPP.KEY">key</label>
121 ng-model="vm.whatsappAccount.key"
124 ng-disabled="!vm.crudPermissions.canEdit"
128 ng-messages="generalForm['key'].$error"
129 ng-show="generalForm['key'].$touched"
132 <div ng-message="required">
133 <span translate="WHATSAPP.ERRORS.KEY_REQUIRED"
134 >key field is required</span
137 <div ng-message="md-maxlength">
139 translate="WHATSAPP.ERRORS.KEY_MAX_LENGTH"
140 translate-values="{max: 5}"
141 >key must have a maximum length equal to 5</span
145 </md-input-container>
146 <md-input-container class="md-block">
147 <label translate="WHATSAPP.LIST">List</label>
150 ng-model="vm.whatsappAccount.ListId"
152 ng-disabled="!vm.crudPermissions.canEdit"
156 ng-repeat="ListId in vm.lists"
157 ng-disabled="ListId.canSelect === false"
158 >{{ ListId.name }}</md-option
162 <span translate="WHATSAPP.HELP.LIST"></span>
165 ng-messages="generalForm['ListId'].$error"
166 ng-show="generalForm['ListId'].$touched"
169 <div ng-message="required">
170 <span translate="WHATSAPP.ERRORS.LIST_REQUIRED"
171 >List field is required</span
175 </md-input-container>
177 ng-if="vm.whatsappAccount.type == 'twilio'"
180 <label translate="WHATSAPP.ACCOUNTSID">AccountSID</label>
184 ng-model="vm.whatsappAccount.accountSid"
186 ng-disabled="!vm.crudPermissions.canEdit"
190 ng-messages="generalForm['accountSid'].$error"
191 ng-show="generalForm['accountSid'].$touched"
194 <div ng-message="required">
195 <span translate="WHATSAPP.ERRORS.ACCOUNTSID_REQUIRED"
196 >AccountSID field is required</span
200 </md-input-container>
202 ng-if="vm.whatsappAccount.type == 'twilio'"
205 <label translate="WHATSAPP.AUTHTOKEN">AuthToken</label>
209 ng-model="vm.whatsappAccount.authToken"
211 ng-disabled="!vm.crudPermissions.canEdit"
215 ng-messages="generalForm['authToken'].$error"
216 ng-show="generalForm['authToken'].$touched"
219 <div ng-message="required">
220 <span translate="WHATSAPP.ERRORS.AUTHTOKEN_REQUIRED"
221 >AuthToken field is required</span
225 </md-input-container>
226 <md-input-container class="md-block">
227 <label translate="WHATSAPP.PHONE">phone</label>
231 ng-model="vm.whatsappAccount.phone"
233 ng-disabled="!vm.crudPermissions.canEdit"
237 ng-messages="generalForm['phone'].$error"
238 ng-show="generalForm['phone'].$touched"
241 <div ng-message="required">
242 <span translate="WHATSAPP.ERRORS.PHONE_REQUIRED"
243 >phone field is required</span
247 </md-input-container>
248 <md-input-container class="md-block">
249 <label translate="WHATSAPP.RECEIVEURL">receiveUrl</label>
250 <div layout="row" layout-align="center center">
252 class="md-button md-fab md-mini md-primary"
254 data-clipboard-target="#copytoclipboard-receiveUrl"
255 ngclipboard-success="vm.alert({title: 'copied to clipboard', msg: e.text});"
256 ngclipboard-error="vm.alert({title: 'error', msg: 'copy to clipboard failed'});"
258 <md-icon md-font-icon="icon-clipboard-text"></md-icon>
263 id="copytoclipboard-receiveUrl"
265 ng-value="vm.whatsappAccount.remote + '/api/whatsapp/accounts/' + vm.whatsappAccount.id + '/notify?token=' + vm.whatsappAccount.token"
270 <span translate="WHATSAPP.HELP.RECEIVEURL"></span>
272 </md-input-container>
274 ng-if="vm.whatsappAccount.type == 'twillo'"
277 <label translate="WHATSAPP.DELIVERYREPORTURL"
278 >deliveryReportUrl</label
280 <div layout="row" layout-align="center center">
282 class="md-button md-fab md-mini md-primary"
284 data-clipboard-target="#copytoclipboard-deliveryReportUrl"
285 ngclipboard-success="vm.alert({title: 'copied to clipboard', msg: e.text});"
286 ngclipboard-error="vm.alert({title: 'error', msg: 'copy to clipboard failed'});"
288 <md-icon md-font-icon="icon-clipboard-text"></md-icon>
293 id="copytoclipboard-deliveryReportUrl"
294 name="deliveryReportUrl"
295 ng-value="vm.whatsappAccount.remote + '/api/whatsapp/accounts/' + vm.whatsappAccount.id + '/status?token=' + vm.whatsappAccount.token + (vm.whatsappAccount.type == 'csc' ? '&message-id={message-id}&state={state}' : '')"
300 <span translate="WHATSAPP.HELP.DELIVERYREPORTURL"></span>
302 </md-input-container>
303 <md-input-container class="md-block">
304 <label translate="WHATSAPP.WAITFORTHEASSIGNEDAGENT"
305 >WaitForTheAssignedAgent</label
309 name="waitForTheAssignedAgent"
310 ng-model="vm.whatsappAccount.waitForTheAssignedAgent"
314 ng-disabled="!vm.crudPermissions.canEdit"
318 ng-messages="generalForm['waitForTheAssignedAgent'].$error"
319 ng-show="generalForm['waitForTheAssignedAgent'].$touched"
322 <div ng-message="required">
324 translate="WHATSAPP.ERRORS.WAITFORTHEASSIGNEDAGENT_REQUIRED"
325 >WaitForTheAssignedAgent field is required</span
328 <div ng-message="min">
330 translate="WHATSAPP.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
331 >WaitForTheAssignedAgent must be a valid greater or equal
336 <div ng-message="max">
338 translate="WHATSAPP.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_LESS_THAN_OR_EQUAL_TO"
339 >WaitForTheAssignedAgent must be a valid greater or equal
345 </md-input-container>
346 <md-input-container class="md-block">
347 <label translate="WHATSAPP.DESCRIPTION">Description</label>
351 ng-model="vm.whatsappAccount.description"
352 ng-disabled="!vm.crudPermissions.canEdit"
356 ng-messages="generalForm['description'].$error"
357 ng-show="generalForm['description'].$touched"
360 <div ng-message="required">
361 <span translate="WHATSAPP.ERRORS.DESCRIPTION_REQUIRED"
362 >Description field is required</span
366 </md-input-container>
370 class="whatsappAccount-detail-form-container notification md-background-bg md-whiteframe-1dp"
372 <div class="pb-16" layout="row" layout-align="start center">
373 <div class="h2 secondary-text" translate="WHATSAPP.NOTIFICATION">
377 <form name="notificationForm" novalidate>
378 <md-input-container class="md-block">
380 ng-model="vm.whatsappAccount.notificationShake"
381 aria-label="notificationShake"
382 ng-disabled="!vm.crudPermissions.canEdit"
383 ><span translate="WHATSAPP.NOTIFICATIONSHAKE"
384 >notificationShake</span
387 </md-input-container>
388 <md-input-container class="md-block">
390 ng-model="vm.whatsappAccount.notificationSound"
391 aria-label="notificationSound"
392 ng-disabled="!vm.crudPermissions.canEdit"
393 ><span translate="WHATSAPP.NOTIFICATIONSOUND"
394 >notificationSound</span
397 </md-input-container>
398 <div class="md-block">
400 class="md-caption grey-fg"
401 translate="WHATSAPP.NOTIFICATIONTEMPLATE"
402 >notificationTemplate</label
405 aria-label="notificationTemplate notificationTemplate"
406 ckeditor="{ skin: 'office2013', language: 'en', allowedContent: true, extraPlugins: 'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64', toolbarGroups: [{ name: 'styles', groups: ['styles'] }, { name: 'clipboard', groups: ['undo'] }, { name: 'colors', groups: ['colors'] }, { name: 'basicstyles', groups: ['basicstyles'] }, { name: 'paragraph', groups: ['list', 'indent', 'align'] }, { name: 'mode' }], autocorrect_enabled: true, disableNativeSpellChecker: false, fontSize_sizes: '8/8pt;9/9pt;10/10pt;11/11pt;12/12pt;14/14pt;16/16pt;18/18pt;20/20pt;22/22pt;24/24pt;26/26pt;28/28pt;36/36pt;48/48pt;72/72pt', removePlugins: 'magicline' }"
407 ng-model="vm.whatsappAccount.notificationTemplate"
413 class="whatsappAccount-detail-form-container transfer md-background-bg md-whiteframe-1dp"
415 <div class="pb-16" layout="row" layout-align="start center">
416 <div class="h2 secondary-text" translate="WHATSAPP.TRANSFER">
420 <form name="transferForm" novalidate>
421 <md-input-container class="md-block">
423 ng-model="vm.whatsappAccount.queueTransfer"
424 aria-label="queueTransfer"
425 ng-disabled="!vm.crudPermissions.canEdit"
426 ><span translate="WHATSAPP.QUEUETRANSFER"
430 </md-input-container>
432 ng-if="vm.whatsappAccount.queueTransfer == true"
435 <label translate="WHATSAPP.QUEUETRANSFERTIMEOUT"
436 >queueTransferTimeout</label
440 name="queueTransferTimeout"
441 ng-model="vm.whatsappAccount.queueTransferTimeout"
445 ng-disabled="!vm.crudPermissions.canEdit"
449 ng-messages="transferForm['queueTransferTimeout'].$error"
450 ng-show="transferForm['queueTransferTimeout'].$touched"
453 <div ng-message="required">
455 translate="WHATSAPP.ERRORS.QUEUETRANSFERTIMEOUT_REQUIRED"
456 >queueTransferTimeout field is required</span
459 <div ng-message="min">
461 translate="WHATSAPP.ERRORS.QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
462 >queueTransferTimeout must be a valid greater or equal
467 <div ng-message="max">
469 translate="WHATSAPP.ERRORS.QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO"
470 >queueTransferTimeout must be a valid greater or equal
476 </md-input-container>
477 <md-input-container class="md-block">
479 ng-model="vm.whatsappAccount.agentTransfer"
480 aria-label="agentTransfer"
481 ng-disabled="!vm.crudPermissions.canEdit"
482 ><span translate="WHATSAPP.AGENTTRANSFER"
486 </md-input-container>
488 ng-if="vm.whatsappAccount.agentTransfer == true"
491 <label translate="WHATSAPP.AGENTTRANSFERTIMEOUT"
492 >agentTransferTimeout</label
496 name="agentTransferTimeout"
497 ng-model="vm.whatsappAccount.agentTransferTimeout"
501 ng-disabled="!vm.crudPermissions.canEdit"
505 ng-messages="transferForm['agentTransferTimeout'].$error"
506 ng-show="transferForm['agentTransferTimeout'].$touched"
509 <div ng-message="required">
511 translate="WHATSAPP.ERRORS.AGENTTRANSFERTIMEOUT_REQUIRED"
512 >agentTransferTimeout field is required</span
515 <div ng-message="min">
517 translate="WHATSAPP.ERRORS.AGENTTRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
518 >agentTransferTimeout must be a valid greater or equal
523 <div ng-message="max">
525 translate="WHATSAPP.ERRORS.AGENTTRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO"
526 >agentTransferTimeout must be a valid greater or equal
532 </md-input-container>
539 <span translate="WHATSAPP.ADVANCED">ADVANCED</span>
543 class="whatsappAccount-detail-form-container proxy md-background-bg md-whiteframe-1dp"
545 <div class="pb-16" layout="row" layout-align="start center">
546 <div class="h2 secondary-text" translate="WHATSAPP.PROXY">
550 <form name="proxyForm" novalidate>
551 <md-input-container class="md-block">
552 <label translate="WHATSAPP.MOTIONPROXY">MotionProxy</label>
556 ng-model="vm.whatsappAccount.remote"
560 ng-disabled="!vm.crudPermissions.canEdit"
564 <span translate="WHATSAPP.HELP.MOTIONPROXY"></span>
567 ng-messages="proxyForm['remote'].$error"
568 ng-show="proxyForm['remote'].$touched"
571 <div ng-message="required">
572 <span translate="WHATSAPP.ERRORS.MOTIONPROXY_REQUIRED"
573 >MotionProxy field is required</span
576 <div ng-message="url">
577 <span translate="WHATSAPP.ERRORS.MOTIONPROXY_MUST_VALID_URL"
578 >MotionProxy must be a valid url
579 http://www.xcally.com</span
582 <div ng-message="md-maxlength">
584 translate="WHATSAPP.ERRORS.MOTIONPROXY_MAX_LENGTH"
585 translate-values="{max: 255}"
586 >MotionProxy must have a maximum length equal to 255</span
590 </md-input-container>
591 <md-input-container class="md-block">
592 <label translate="WHATSAPP.TOKEN">token</label>
596 ng-model="vm.whatsappAccount.token"
601 ng-messages="proxyForm['token'].$error"
602 ng-show="proxyForm['token'].$touched"
605 <div ng-message="required">
606 <span translate="WHATSAPP.ERRORS.TOKEN_REQUIRED"
607 >token field is required</span
611 </md-input-container>
615 class="whatsappAccount-detail-form-container disposition md-background-bg md-whiteframe-1dp"
617 <div class="pb-16" layout="row" layout-align="start center">
618 <div class="h2 secondary-text" translate="WHATSAPP.DISPOSITION">
622 <form name="dispositionForm" novalidate>
623 <md-input-container class="md-block">
625 ng-model="vm.whatsappAccount.mandatoryDisposition"
626 aria-label="MandatoryDisposition"
627 ng-disabled="!vm.crudPermissions.canEdit"
628 ><span translate="WHATSAPP.MANDATORYDISPOSITION"
629 >MandatoryDisposition</span
632 </md-input-container>
634 ng-if="vm.whatsappAccount.mandatoryDisposition"
637 <label translate="WHATSAPP.MANDATORYDISPOSITIONPAUSEID"
638 >MandatoryDispositionPauseId</label
641 name="mandatoryDispositionPauseId"
642 ng-model="vm.whatsappAccount.mandatoryDispositionPauseId"
644 ng-disabled="!vm.crudPermissions.canEdit"
647 ng-value="mandatoryDispositionPauseId.id"
648 ng-repeat="mandatoryDispositionPauseId in vm.pauses"
649 ng-disabled="mandatoryDispositionPauseId.canSelect === false"
650 >{{ mandatoryDispositionPauseId.name }}</md-option
655 translate="WHATSAPP.HELP.MANDATORYDISPOSITIONPAUSEID"
659 ng-messages="dispositionForm['mandatoryDispositionPauseId'].$error"
660 ng-show="dispositionForm['mandatoryDispositionPauseId'].$touched"
663 <div ng-message="required">
665 translate="WHATSAPP.ERRORS.MANDATORYDISPOSITIONPAUSEID_REQUIRED"
666 >MandatoryDispositionPauseId field is required</span
670 </md-input-container>
677 <span translate="WHATSAPP.DISPOSITIONS">DISPOSITIONS</span>
681 ng-controller="WhatsappAccountDispositionsController as vm_dc"
682 ng-init="vm_dc.init(vm.whatsappAccount, vm.crudPermissions)"
685 <div class="column" flex="20">
686 <md-card class="mt-0">
689 layout-align="center center"
691 ng-click="vm_dc.query.level = null; vm_dc.getDispositions()"
693 <div layout="row" layout-align="start center">
694 <md-icon md-font-icon="icon-refresh"></md-icon>
696 >{{ 'TOOLS.ALL_DISPOSITIONS' | translate }}</span
704 <md-input-container class="md-block" flex-gt-sm="">
705 <label translate="TOOLS.SELECT_LEVEL"
706 >Select a level</label
709 placeholder="{{ 'TOOLS.SELECT_LEVEL' | translate }}"
710 ng-model="vm_dc.query.level"
711 ng-change="vm_dc.getDispositions()"
713 <md-option ng-value="null"
714 ><em translate="TOOLS.ALL">All</em></md-option
718 ng-repeat="(key, value) in vm_dc.levels"
719 >{{ value }}</md-option
722 </md-input-container>
727 class="whatsappAccount-detail-form-container whatsappdispositions md-background-bg md-whiteframe-1dp"
731 class="md-table-toolbar md-default"
732 ng-hide="vm_dc.selectedWhatsappAccountDispositions.length"
734 <div class="md-toolbar-tools">
735 <span class="md-subhead" translate="WHATSAPP.DISPOSITIONS"
739 on-search="vm_dc.query.filter = query"
740 on-collapse="vm_dc.query.filter = undefined"
746 ng-if="vm_dc.crudPermissions.canEdit"
747 class="md-icon-button"
748 ng-click="vm_dc.createOrEditDisposition($event)"
749 aria-label="Add whatsapp dispositions"
751 translate-attr-label="WHATSAPP.ADD_DISPOSITION"
753 <md-icon md-font-icon="icon-plus"></md-icon>
758 class="md-table-toolbar md-accent"
759 ng-show="vm_dc.selectedDispositions.length"
761 <div class="md-toolbar-tools">
762 <span class="md-subhead"
763 >{{vm_dc.selectedDispositions.length}}
764 {{vm_dc.selectedDispositions.length > 1 ? 'items' :
765 'item'}} selected</span
769 class="md-icon-button"
770 ng-csv="vm_dc.exportSelectedDispositions"
772 filename="whatsappAccounts.csv"
774 <md-icon md-font-icon="icon-file-excel"></md-icon>
777 ng-if="vm_dc.crudPermissions.canDelete"
778 class="md-icon-button"
779 ng-click="vm_dc.deleteSelectedDispositions($event)"
780 aria-label="delete selected"
782 translate-attr-label="WHATSAPP.DELETE_SELECTED"
784 <md-icon md-font-icon="icon-delete"></md-icon>
793 ng-model="vm_dc.selectedDispositions"
794 md-progress="vm_dc.promise"
798 md-order="vm_dc.query.sort"
799 md-on-reorder="vm_dc.getDispositions"
802 <th md-column md-order-by="id">
803 {{ 'WHATSAPP.ID' | translate }}
805 <th md-column md-order-by="level">
806 {{ 'TOOLS.LEVEL' | translate }}
808 <th md-column md-order-by="name">
809 {{ 'WHATSAPP.NAME' | translate }}
811 <th md-column md-order-by="description">
812 {{ 'WHATSAPP.DESCRIPTION' | translate }}
814 <th md-column width="10px"></th>
818 <tr md-row ng-hide="vm_dc.dispositions.rows.length">
819 <td md-cell colspan="5">
820 <div layout="row" layout-align="center center">
821 <span translate="WHATSAPP.NO_AVAILABLE_INFO"
822 >No Available Info</span
829 md-select="disposition"
831 ng-repeat="disposition in vm_dc.dispositions.rows"
834 ng-click="vm_dc.createOrEditDisposition($event, disposition)"
841 ng-click="vm_dc.createOrEditDisposition($event, disposition)"
845 {{ vm_dc.levels[disposition.level] }}
848 ng-click="vm_dc.createOrEditDisposition($event, disposition)"
855 ng-click="vm_dc.createOrEditDisposition($event, disposition)"
859 {{disposition.description}}
864 ng-if="!vm_dc.crudPermissions.readOnly"
868 class="md-icon-button"
871 translate-attr-aria-label="WHATSAPP.MORE"
872 ng-click="$mdOpenMenu($event)"
875 md-font-icon="icon-dots-vertical"
878 <md-menu-content width="3">
882 ng-if="vm_dc.crudPermissions.canEdit"
885 ng-click="vm_dc.createOrEditDisposition($event, disposition)"
886 translate="TOOLS.EDIT_DISPOSITION"
894 ng-if="vm_dc.crudPermissions.canDelete"
897 ng-click="vm_dc.deleteConfirm(disposition, $event)"
898 translate="TOOLS.DELETE_DISPOSITION"
909 </md-table-container>
911 md-label="{page: '{{'WHATSAPP.PAGE' | translate}}:', rowsPerPage: '{{'WHATSAPP.ROWSPERPAGE' | translate}}:', of: '{{'WHATSAPP.OF' | translate}}'}"
912 md-limit="vm_dc.query.limit"
913 md-limit-options="[10, 15, 20, 50, 100, 250]"
914 md-page="vm_dc.query.page"
915 md-total="{{vm_dc.dispositions.count}}"
916 md-on-paginate="vm_dc.getDispositions"
919 </md-table-pagination>
927 <span translate="WHATSAPP.CANNEDANSWERS">CANNEDANSWERS</span>
931 class="whatsappAccount-detail-form-container whatsappcannedanswers md-background-bg md-whiteframe-1dp"
934 ng-controller="WhatsappAccountWhatsappCannedAnswersController as vm_dc"
935 ng-init="vm_dc.init(vm.whatsappAccount, vm.crudPermissions)"
938 class="md-table-toolbar md-default"
939 ng-hide="vm_dc.selectedWhatsappAccountWhatsappCannedAnswers.length"
941 <div class="md-toolbar-tools">
944 translate="WHATSAPP.WHATSAPPCANNEDANSWERS"
945 >WhatsappCannedAnswers</span
948 on-search="vm_dc.query.filter = query"
949 on-collapse="vm_dc.query.filter = undefined"
955 ng-if="vm_dc.crudPermissions.canEdit"
956 class="md-icon-button"
957 ng-click="vm_dc.createOrEditWhatsappAccountWhatsappCannedAnswer($event)"
958 aria-label="add whatsappCannedAnswer"
960 translate-attr-label="WHATSAPP.ADD_WHATSAPPCANNEDANSWER"
962 <md-icon md-font-icon="icon-plus"></md-icon>
967 class="md-table-toolbar md-accent"
968 ng-show="vm_dc.selectedWhatsappAccountWhatsappCannedAnswers.length"
970 <div class="md-toolbar-tools">
971 <span class="md-subhead"
972 >{{vm_dc.selectedWhatsappAccountWhatsappCannedAnswers.length}}
973 {{vm_dc.selectedWhatsappAccountWhatsappCannedAnswers.length
974 > 1 ? 'items' : 'item'}} selected</span
978 class="md-icon-button"
979 ng-csv="vm_dc.exportSelectedWhatsappAccountWhatsappCannedAnswers"
981 filename="whatsappAccounts.csv"
983 <md-icon md-font-icon="icon-file-excel"></md-icon>
986 ng-if="vm_dc.crudPermissions.canDelete"
987 class="md-icon-button"
988 ng-click="vm_dc.deleteSelectedWhatsappAccountWhatsappCannedAnswers($event)"
989 aria-label="delete selected"
991 translate-attr-label="WHATSAPP.DELETE_SELECTED"
993 <md-icon md-font-icon="icon-delete"></md-icon>
997 <md-table-container class="font-size-12">
1002 ng-model="vm_dc.selectedWhatsappAccountWhatsappCannedAnswers"
1003 md-progress="vm_dc.promise"
1007 md-order="vm_dc.query.sort"
1008 md-on-reorder="vm_dc.getWhatsappAccountWhatsappCannedAnswers"
1011 <th md-column md-order-by="id">
1012 {{ 'WHATSAPP.ID' | translate }}
1014 <th md-column md-order-by="key">
1015 {{ 'WHATSAPP.KEY' | translate }}
1017 <th md-column md-order-by="value">
1018 {{ 'WHATSAPP.VALUE' | translate }}
1020 <th md-column md-order-by="description">
1021 {{ 'WHATSAPP.DESCRIPTION' | translate }}
1023 <th md-column md-order-by="createdAt">
1024 {{ 'WHATSAPP.CREATED_AT' | translate }}
1026 <th md-column width="10px"></th>
1032 md-select="whatsappCannedAnswer"
1034 ng-repeat="whatsappCannedAnswer in vm_dc.whatsappAccountWhatsappCannedAnswers.rows"
1037 ng-click="vm_dc.createOrEditWhatsappAccountWhatsappCannedAnswer($event, whatsappCannedAnswer)"
1040 {{whatsappCannedAnswer.id}}
1043 ng-click="vm_dc.createOrEditWhatsappAccountWhatsappCannedAnswer($event, whatsappCannedAnswer)"
1046 {{whatsappCannedAnswer.key}}
1049 ng-click="vm_dc.createOrEditWhatsappAccountWhatsappCannedAnswer($event, whatsappCannedAnswer)"
1052 {{whatsappCannedAnswer.value}}
1055 ng-click="vm_dc.createOrEditWhatsappAccountWhatsappCannedAnswer($event, whatsappCannedAnswer)"
1058 {{whatsappCannedAnswer.description}}
1061 ng-click="vm_dc.createOrEditWhatsappAccountWhatsappCannedAnswer($event, whatsappCannedAnswer)"
1064 {{ whatsappCannedAnswer.createdAt | formatdate }}
1069 ng-if="!vm_dc.crudPermissions.readOnly"
1073 class="md-icon-button"
1076 translate-attr-aria-label="WHATSAPP.MORE"
1077 ng-click="$mdOpenMenu($event)"
1080 md-font-icon="icon-dots-vertical"
1084 <md-menu-content width="3">
1085 <md-menu-item ng-if="vm_dc.crudPermissions.canEdit">
1087 ng-click="vm_dc.createOrEditWhatsappAccountWhatsappCannedAnswer($event, whatsappCannedAnswer)"
1088 translate="WHATSAPP.EDIT_WHATSAPPCANNEDANSWER"
1090 Edit WhatsappCannedAnswer
1094 ng-if="vm_dc.crudPermissions.canDelete"
1097 ng-click="vm_dc.deleteConfirm(whatsappCannedAnswer, $event)"
1098 translate="WHATSAPP.DELETE_WHATSAPPCANNEDANSWER"
1100 Delete WhatsappCannedAnswer
1109 ng-if="!vm_dc.whatsappAccountWhatsappCannedAnswers.rows.length"
1111 <td md-cell colspan="7">
1112 <div layout="row" layout-align="center center">
1114 class="text-boxed-light"
1115 translate="WHATSAPP.NO_WHATSAPPCANNEDANSWER_AVAILABLE"
1116 >No whatsappcannedanswer available</span
1123 </md-table-container>
1124 <md-table-pagination
1125 md-label="{page: '{{'WHATSAPP.PAGE' | translate}}:', rowsPerPage: '{{'WHATSAPP.ROWSPERPAGE' | translate}}:', of: '{{'WHATSAPP.OF' | translate}}'}"
1126 md-limit="vm_dc.query.limit"
1127 md-limit-options="[10, 15, 20, 50, 100, 250]"
1128 md-page="vm_dc.query.page"
1129 md-total="{{vm_dc.whatsappAccountWhatsappCannedAnswers.count}}"
1130 md-on-paginate="vm_dc.getWhatsappAccountWhatsappCannedAnswers"
1132 ></md-table-pagination>
1139 <span translate="WHATSAPP.ACTIONS">ACTIONS</span>
1143 class="whatsappAccount-detail-form-container actions md-background-bg md-whiteframe-1dp"
1146 ng-controller="WhatsappAccountActionsController as vm_ac"
1147 ng-init="vm_ac.init(vm.whatsappAccount, vm.crudPermissions)"
1151 layout-align="start start"
1155 class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp"
1159 ng-if="vm_ac.crudPermissions.canEdit"
1161 <!-- SIDENAV CONTENT -->
1162 <md-list class="no-padding">
1163 <md-subheader class="md-no-sticky">
1164 <span translate="VOICE.APPLICATIONS_LIST">
1169 <md-divider></md-divider>
1170 <md-list ng-sortable="vm_ac.list">
1171 <md-list-item class="handle" ng-repeat="a in vm_ac.apps">
1172 <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>
1174 class="text-truncate"
1175 translate="WHATSAPP.{{(a.alias || a.appType) | uppercase}}"
1177 {{a.alias || a.appType}}
1181 <!-- / SIDENAV CONTENT -->
1187 class="main scrollable md-background-bg md-whiteframe-1dp"
1190 flex="{{vm_ac.crudPermissions.canEdit ? 75 : 100}}"
1193 class="md-table-toolbar md-default"
1194 ng-hide="vm_ac.selectedWhatsappAccountApps.length"
1196 <div class="md-toolbar-tools">
1197 <span class="md-subhead">Drag & Drop Routing</span>
1200 on-search="vm_ac.query.filter = query"
1201 on-collapse="vm_ac.query.filter = undefined"
1207 class="md-table-toolbar md-accent"
1208 ng-show="vm_ac.selectedWhatsappAccountApps.length"
1210 <div class="md-toolbar-tools">
1211 <span class="md-subhead"
1212 >{{vm_ac.selectedWhatsappAccountApps.length}}
1213 {{vm_ac.selectedWhatsappAccountApps.length > 1 ? 'items' :
1214 'item'}} selected</span
1218 ng-if="vm_ac.crudPermissions.canDelete"
1219 class="md-icon-button"
1220 ng-click="vm_ac.deleteSelectedWhatsappAccountApps($event)"
1221 aria-label="delete selected"
1223 translate-attr-label="WHATSAPP.DELETE_SELECTED"
1225 <md-icon md-font-icon="icon-delete"></md-icon>
1230 <!-- QUEUES TABLE -->
1231 <md-table-container>
1236 ng-model="vm_ac.selectedWhatsappAccountApps"
1240 <th md-column width="10px"></th>
1241 <th md-column width="10px">
1242 <span translate="VOICE.PRIORITY">Priority</span>
1248 <span>Appdata</span>
1251 <span>Interval</span>
1253 <th md-column width="10px"></th>
1254 <th md-column width="10px"></th>
1257 <tbody md-body ng-sortable="vm_ac.applications">
1262 ng-repeat="app in vm_ac.whatsappAccountApps.rows | filter: vm_ac.query.filter"
1266 md-font-icon="icon-drag-vertical"
1272 ng-click="vm_ac.editWhatsappAccountApp($event, $index)"
1274 <span>{{app.priority}}</span>
1278 ng-click="vm_ac.editWhatsappAccountApp($event, $index)"
1280 {{app.app.toLowerCase() === 'agi' ? 'Cally-Square' :
1281 app.app | ucfirst}}<span
1282 ng-if="app.appType.toLowerCase() === 'custom'"
1288 ng-click="vm_ac.editWhatsappAccountApp($event, $index)"
1290 <span class="text-truncate" style="width: 200px"
1291 >{{app.appdata}}</span
1296 ng-click="vm_ac.editInterval($event, $index)"
1298 {{app.IntervalId ? 'From List' : app.interval}}
1302 ng-click="vm_ac.editInterval($event, $index)"
1303 class="md-icon-button"
1304 aria-label="Interval"
1306 <md-icon md-font-icon="icon-timer"></md-icon>
1308 {{app.IntervalId ? 'From List' : (app.interval ===
1309 '*,*,*,*' ? 'Always' : 'Custom')}}
1316 ng-if="!vm_ac.crudPermissions.readOnly"
1320 class="md-icon-button"
1323 translate-attr-aria-label="VOICE.MORE"
1324 ng-click="$mdOpenMenu($event)"
1327 md-font-icon="icon-dots-vertical"
1331 <md-menu-content width="3">
1333 ng-if="vm_ac.crudPermissions.canEdit"
1336 ng-click="vm_ac.editWhatsappAccountApp($event, $index)"
1337 translate="VOICE.EDIT_APP"
1343 ng-if="vm_ac.crudPermissions.canEdit"
1346 ng-click="vm_ac.editInterval($event, $index)"
1347 translate="VOICE.EDIT_INTERVAL"
1353 ng-if="vm_ac.crudPermissions.canDelete"
1356 ng-click="vm_ac.deleteConfirm(app, $index, $event)"
1357 translate="VOICE.DELETE_APP"
1368 ng-hide="vm_ac.whatsappAccountApps.rows.length"
1370 <td md-cell colspan="7">
1372 class="text-boxed-light"
1373 translate="VOICE.NO_APPS_AVAILABLE"
1374 >No apps available</span
1380 </md-table-container>
1381 <!-- / QUEUES TABLE -->
1385 <!-- / NO RESULTS -->
1394 <span translate="WHATSAPP.INTERACTIONS">INTERACTIONS</span>
1398 class="whatsappAccount-detail-form-container interactions md-background-bg md-whiteframe-1dp"
1401 ng-controller="WhatsappAccountInteractionsController as vm_dc"
1402 ng-init="vm_dc.init(vm.whatsappAccount, vm.crudPermissions)"
1405 class="md-table-toolbar md-default"
1406 ng-hide="vm_dc.selectedWhatsappAccountInteractions.length"
1408 <div class="md-toolbar-tools">
1409 <span class="md-subhead" translate="WHATSAPP.INTERACTIONS"
1413 on-search="vm_dc.query.filter = query"
1414 on-collapse="vm_dc.query.filter = undefined"
1420 filters="vm_dc.quickFilters"
1422 search="vm_dc.getWhatsappAccountInteractions()"
1424 <div layout="column">
1426 class="md-icon-button advanced-search"
1427 ng-class="{ 'md-fab md-mini md-accent-bg': vm_dc.query.search }"
1430 translate-attr-aria-label="DASHBOARDS.FILTER"
1431 ng-click="vm_dc.openAdvancedSearch()"
1434 md-font-icon="{{ vm_dc.query.search ? 'icon-filter' : 'icon-filter-outline' }}"
1435 ng-class="{ 'blink': vm_dc.query.search }"
1440 class="md-icon-button"
1441 ng-click="vm_dc.getWhatsappAccountInteractions()"
1442 aria-label="refresh Interactions"
1444 translate-attr-label="WHATSAPP.REFRESH_INTERACTIONS"
1446 <md-icon md-font-icon="icon-refresh"></md-icon>
1451 class="md-table-toolbar md-accent"
1452 ng-show="vm_dc.selectedWhatsappAccountInteractions.length"
1454 <div class="md-toolbar-tools">
1455 <span class="md-subhead"
1456 >{{vm_dc.selectedWhatsappAccountInteractions.length}}
1457 {{vm_dc.selectedWhatsappAccountInteractions.length > 1 ?
1458 'items' : 'item'}} selected</span
1462 class="md-icon-button"
1463 ng-csv="vm_dc.exportSelectedWhatsappAccountInteractions"
1465 filename="whatsappAccounts.csv"
1467 <md-icon md-font-icon="icon-file-excel"></md-icon>
1470 ng-if="vm_dc.crudPermissions.canDelete"
1471 class="md-icon-button"
1472 ng-click="vm_dc.deleteSelectedWhatsappAccountInteractions($event)"
1473 aria-label="delete selected"
1475 translate-attr-label="WHATSAPP.DELETE_SELECTED"
1477 <md-icon md-font-icon="icon-delete"></md-icon>
1481 <md-table-container class="font-size-12">
1486 ng-model="vm_dc.selectedWhatsappAccountInteractions"
1487 md-progress="vm_dc.promise"
1491 md-order="vm_dc.query.sort"
1492 md-on-reorder="vm_dc.getWhatsappAccountInteractions"
1495 <th md-column md-order-by="id">
1496 {{ 'WHATSAPP.ID' | translate }}
1498 <th md-column class="no-padding">
1499 <md-icon md-font-icon="icon-eye" class="s16"></md-icon>
1501 <th md-column class="no-padding"></th>
1502 <th md-column class="no-padding"></th>
1503 <th md-column>{{ 'WHATSAPP.CONTACT' | translate }}</th>
1504 <th md-column md-order-by="createdAt">
1505 {{ 'WHATSAPP.STARTEDAT' | translate }}
1507 <th md-column md-order-by="lastMsgAt">
1508 {{ 'WHATSAPP.LASTMESSAGE' | translate }}
1510 <th md-column md-order-by="closed">
1511 {{ 'WHATSAPP.STATUS' | translate }}
1513 <th md-column>{{ 'WHATSAPP.AGENT' | translate }}</th>
1514 <th md-column md-order-by="tag">
1515 {{ 'WHATSAPP.TAGS' | translate }}
1517 <th md-column width="10px"></th>
1523 md-select="interaction"
1525 ng-repeat="interaction in vm_dc.whatsappAccountInteractions.rows"
1526 ng-class="{'text-bold text-italic': interaction.unreadMessages > 0}"
1528 <td md-cell>{{interaction.id}}</td>
1529 <td md-cell class="no-padding">
1531 ng-if="!interaction.closed && interaction.Users.length"
1534 md-font-icon="icon-eye"
1538 <span ng-repeat="user in interaction.Users"
1539 >{{ user.fullname | translate }}
1540 <span ng-if="!$last">, </span>
1545 <td md-cell class="no-padding">
1547 ng-if="interaction.unreadMessages > 0"
1549 layout-align="start center"
1552 class="badge white-fg md-primary-bg"
1554 >{{ interaction.unreadMessages}}</span
1558 <td md-cell class="no-padding">
1559 <div ng-if="interaction.attach">
1561 md-font-icon="icon-paperclip"
1567 <div layout="column" layout-align="start start">
1569 class="font-size-12 text-truncate contact-text"
1570 ng-class="{'margin-bottom-0' : interaction.contactInfo}"
1572 >{{ interaction.contactName }}</span
1575 ng-if="interaction.contactInfo"
1576 class="font-size-12 text-truncate contact-text margin-top-0"
1578 >{{ interaction.contactInfo }}</span
1582 <td md-cell>{{ interaction.createdAt | formatdate }}</td>
1587 md-font-icon="{{interaction.lastMsgDirection == 'in' ? 'icon-arrow-down-bold blue-grey-800-fg' : 'icon-arrow-up-bold blue-grey-300-fg'}}"
1590 <div layout="column" layout-align="center center">
1591 <span class="text-truncate"
1592 >{{ interaction.lastMsgAt | formatdate }}</span
1598 <span ng-if="interaction.closed === 0" class="green-fg">
1599 {{ 'WHATSAPP.OPENED' | translate }}
1600 <span ng-if="interaction.substatus">
1601 - {{ interaction.substatus }}
1604 <span ng-if="interaction.closed === 1" class="red-fg">
1605 {{ 'WHATSAPP.CLOSED' | translate }}
1606 <span ng-if="interaction.disposition">
1607 - {{ interaction.thirdDisposition ||
1608 interaction.secondDisposition ||
1609 interaction.disposition }}
1611 <md-tooltip class="multiline">
1612 <div layout="column">
1613 <div layout="column">
1615 >{{ 'DASHBOARDS.CLOSED_AT' |
1618 <span class="text-bold"
1619 >{{ interaction.closedAt | formatdate }}</span
1623 ng-if="interaction.disposition"
1627 >{{ 'DASHBOARDS.DISPOSITION' |
1630 <span class="text-bold"
1631 >{{ interaction.disposition }}</span
1635 ng-if="interaction.secondDisposition"
1639 >{{ 'DASHBOARDS.SECOND_LEVEL_DISPOSITION' |
1642 <span class="text-bold"
1643 >{{ interaction.secondDisposition }}</span
1647 ng-if="interaction.thirdDisposition"
1651 >{{ 'DASHBOARDS.THIRD_LEVEL_DISPOSITION' |
1654 <span class="text-bold"
1655 >{{ interaction.thirdDisposition }}</span
1663 <td md-cell>{{interaction.Owner.name}}</td>
1665 <div ng-if="interaction.Tags.length">
1666 <md-tooltip md-direction="left" layout="row">
1667 <span ng-repeat="tag in interaction.Tags"
1668 >{{tag.name}}<span ng-if="!$last">, </span></span
1672 md-font-icon="icon-tag"
1673 ng-style="{'color': interaction.Tags.length == 1 && interaction.Tags[0].color }"
1678 <td md-cell class="actions">
1681 class="md-icon-button"
1684 translate-attr-aria-label="WHATSAPP.MORE"
1685 ng-click="$mdOpenMenu($event)"
1688 md-font-icon="icon-dots-vertical"
1692 <md-menu-content width="3">
1695 ng-click="vm_dc.spywhatsappInteraction($event, interaction)"
1696 translate="WHATSAPP.SPYINTERACTION"
1704 ng-click="vm_dc.whatsappInteractionDownload(interaction, $event)"
1705 translate="WHATSAPP.DOWNLOAD_INTERACTION"
1711 ng-if="vm_dc.crudPermissions.canDelete"
1714 ng-click="vm_dc.deleteConfirm(interaction, $event)"
1715 translate="WHATSAPP.DELETE_INTERACTION"
1726 ng-if="!vm_dc.whatsappAccountInteractions.rows.length"
1728 <td md-cell colspan="12">
1729 <div layout="row" layout-align="center center">
1731 class="text-boxed-light"
1732 translate="WHATSAPP.NO_INTERACTION_AVAILABLE"
1733 >No interaction available</span
1740 </md-table-container>
1741 <md-table-pagination
1742 md-label="{page: '{{'WHATSAPP.PAGE' | translate}}:', rowsPerPage: '{{'WHATSAPP.ROWSPERPAGE' | translate}}:', of: '{{'WHATSAPP.OF' | translate}}'}"
1743 md-limit="vm_dc.query.limit"
1744 md-limit-options="[10, 15, 20, 50, 100, 250]"
1745 md-page="vm_dc.query.page"
1746 md-total="{{vm_dc.whatsappAccountInteractions.count}}"
1747 md-on-paginate="vm_dc.getWhatsappAccountInteractions"
1749 ></md-table-pagination>