1 <div id="whatsappAccounts" class="page-layout simple left-sidenav inner-sidenav motion-list">
3 <div class="header md-accent-bg" layout="row" layout-align="space-between center">
5 <div layout="row" layout-align="start center">
6 <div class="logo" layout="row" layout-align="start center">
7 <span class="logo-icon">
8 <md-icon md-font-icon="icon-whatsapp" class="s24"></md-icon>
10 <span class="logo-text" translate="WHATSAPP.WHATSAPPACCOUNTS">WhatsappAccounts</span>
17 <div class="search-input-wrapper" layout="row" layout-align="start center">
19 <md-icon md-font-icon="icon-magnify"></md-icon>
21 <md-input-container md-no-float class="m-0">
22 <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter"
23 ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="APP.SEARCH_FOR_ANYONE" />
32 <div ng-show="vm.selectedWhatsappAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg"
33 layout="row" layout-align="start center">
34 <div class="close-button-wrapper" ng-click="vm.selectedWhatsappAccounts =[]">
35 <md-button layout="row" layout-align="start center">
36 <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>
37 <span translate="APP.BACK">Back</span>
41 <div flex layout="row" layout-align="space-between center">
43 <span class="selected-whatsappAccounts-count">
44 <span>{{vm.selectedWhatsappAccounts.length}}</span>
45 <span translate="APP.SELECTED">selected</span>
48 <md-menu class="select-menu" ng-if="!vm.currentThread">
49 <md-button class="md-icon-button" ng-click="$mdMenu.open($event)" aria-label="multi select toggle" translate
50 translate-attr-aria-label="WHATSAPP.MULTI_SELECT_TOGGLE">
51 <md-icon md-font-icon="icon-menu-down"></md-icon>
53 <md-menu-content width="3">
55 <md-button ng-click="vm.selectAllWhatsappAccounts()" translate="APP.SELECT_ALL">
60 <md-button ng-click="vm.deselectWhatsappAccounts()" translate="APP.SELECT_NONE">
68 <div class="multi-select-actions">
69 <button class="md-icon-button" ng-csv="vm.exportSelectedWhatsappAccounts" csv-label="true"
70 filename="whatsappAccounts.csv">
71 <md-icon md-font-icon="icon-file-excel"></md-icon>
73 <md-button class="md-icon-button" ng-if="vm.crudPermissions.canDelete"
74 ng-click="vm.deleteSelectedWhatsappAccounts($event)" aria-label="delete selected" translate
75 translate-attr-label="APP.DELETE_SELECTED">
76 <md-icon md-font-icon="icon-delete"></md-icon>
81 <!-- / SELECTED BAR -->
84 <div class="content" md-background-bg layout="row" layout-align="start start">
86 <div class="main scrollable" ms-scroll>
87 <!-- WHATSAPPACCOUNT TABLE -->
90 <table md-table md-row-select multiple ng-model="vm.selectedWhatsappAccounts" md-progress="vm.promise">
91 <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getWhatsappAccounts">
93 <th md-column ng-if="vm.table == 'users' || vm.table == 'agents'" width="20px"></th>
94 <th md-column md-order-by="id">{{ 'APP.ID' | translate }}</th>
95 <th md-column md-order-by="name">
96 {{ 'APP.NAME' | translate }}
98 <th md-column md-order-by="key">{{ 'APP.KEY' | translate }}</th>
99 <th md-column md-order-by="ListId">
100 {{ 'APP.LIST' | translate }}
102 <th md-column md-order-by="type">
103 {{ 'APP.TYPE' | translate }}
105 <th md-column md-order-by="phone">
106 {{ 'APP.PHONE' | translate }}
108 <th md-column md-order-by="description">
109 {{ 'APP.DESCRIPTION' | translate }}
111 <th md-column width="10px"></th>
115 <tr md-row ng-hide="vm.whatsappAccounts.rows.length">
116 <td md-cell colspan="8">
117 <div layout="row" layout-align="center center">
118 <span translate="APP.NO_AVAILABLE_INFO">No Available Info</span>
122 <tr md-row md-select="whatsappAccount" md-select-id="id"
123 ng-repeat="whatsappAccount in vm.whatsappAccounts.rows">
124 <td md-cell ng-if="whatsappAccount.userpic">
125 <img class="avatar" alt="{{whatsappAccount.name}}" ng-src="api/users/{{whatsappAccount.id}}/avatar" />
127 <td md-cell ng-if="!whatsappAccount.userpic && (vm.table == 'users' || vm.table == 'agents')">
128 <img class="avatar" alt="{{whatsappAccount.name}}" ng-src="assets/images/avatars/profile.png" />
131 ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(whatsappAccount, ev) : vm.createOrEditWhatsappAccount($event, whatsappAccount)"
133 {{whatsappAccount.id}}
136 ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(whatsappAccount, ev) : vm.createOrEditWhatsappAccount($event, whatsappAccount)"
137 md-cell class="name">
138 {{whatsappAccount.name}}
141 ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(whatsappAccount, ev) : vm.createOrEditWhatsappAccount($event, whatsappAccount)"
143 {{whatsappAccount.key}}
146 ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(whatsappAccount, ev) : vm.createOrEditWhatsappAccount($event, whatsappAccount)"
147 md-cell class="ListId">
148 {{ (vm.lists | filter : {'id':whatsappAccount.ListId} :
152 ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(whatsappAccount, ev) : vm.createOrEditWhatsappAccount($event, whatsappAccount)"
153 md-cell class="type">
154 {{ vm.arraytype[whatsappAccount.type].option }}
157 ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(whatsappAccount, ev) : vm.createOrEditWhatsappAccount($event, whatsappAccount)"
158 md-cell class="phone">
159 {{whatsappAccount.phone}}
162 ng-click="vm.crudPermissions.readOnly || (vm.crudPermissions.canDelete && !vm.crudPermissions.canEdit) ? vm.editstate(whatsappAccount, ev) : vm.createOrEditWhatsappAccount($event, whatsappAccount)"
163 md-cell class="description">
164 {{whatsappAccount.description}}
167 <td md-cell class="actions">
169 <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="APP.MORE"
170 ng-click="$mdMenu.open($event)">
171 <md-icon md-font-icon="icon-dots-vertical"></md-icon>
174 <md-menu-content width="3">
179 <md-menu-item ng-if="vm.crudPermissions.canEdit">
180 <md-button ng-click="vm.editstate(whatsappAccount, $event )"
181 translate="WHATSAPP.EDIT_WHATSAPPACCOUNT">
191 <md-button ng-click="vm.interactionsgoto(whatsappAccount, $event )"
192 translate="WHATSAPP.INTERACTIONS_WHATSAPPACCOUNT">
193 Interactions WhatsappAccount
202 <md-button ng-click="vm.agentadddialog(whatsappAccount, $event )"
203 translate="WHATSAPP.AGENTADD_WHATSAPPACCOUNT">
204 AgentAdd WhatsappAccount
212 <md-menu-item ng-if="vm.crudPermissions.canDelete">
213 <md-button ng-click="vm.deleteconfirm(whatsappAccount, $event )"
214 translate="WHATSAPP.DELETE_WHATSAPPACCOUNT">
215 Delete WhatsappAccount
224 </md-table-container>
227 md-label="{page: '{{'APP.PAGE' | translate}}:', rowsPerPage: '{{'APP.ROWSPERPAGE' | translate}}:', of: '{{'APP.OF' | translate}}'}"
228 md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"
229 md-total="{{vm.whatsappAccounts.count}}" md-on-paginate="vm.getWhatsappAccounts" md-page-select>
230 </md-table-pagination>
232 <!-- / WHATSAPPACCOUNT TABLE -->
235 <!-- / NO RESULTS -->
241 <!-- ADD WHATSAPPACCOUNT BUTTON -->
242 <md-button ng-if="vm.crudPermissions.canEdit" class="md-fab md-accent add-item-button" id="add-whatsappAccount-button"
243 ng-click="vm.createOrEditWhatsappAccount($event)" aria-label="add whatsappAccount" translate
244 translate-attr-aria-label="WHATSAPP.ADD_WHATSAPPACCOUNT">
245 <md-icon md-font-icon="icon-plus"></md-icon>
247 <!-- / ADD WHATSAPPACCOUNT BUTTON -->