5116ea5d21430e02313dd75a15239b0b038d7b08
[motion-next.git] /
1 <!-- MAIN -->
2 <md-toolbar class="md-table-toolbar md-default">
3   <div class="md-toolbar-tools">
4     <span class="md-subhead" translate="MOTIONDIALER.IVR_CAMPAIGNS"
5       >Ivr Campaigns</span
6     >
7     <div flex></div>
8     <ms-search-bar
9       on-search="vm.query.filter = query;"
10       on-collapse="vm.query.filter = undefined;"
11       debounce="300"
12     ></ms-search-bar>
13   </div>
14 </md-toolbar>
15
16 <!-- QUEUE TABLE -->
17 <md-table-container>
18   <table md-table multiple md-progress="vm.promise">
19     <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getCampaigns">
20       <tr md-row>
21         <th md-column>{{'MOTIONDIALER.NAME' | translate}}</th>
22         <th md-column>{{'MOTIONDIALER.TOTAL' | translate}}</th>
23         <th md-column>{{'MOTIONDIALER.TOTAL_MANAGED' | translate}}</th>
24         <th md-column>{{'MOTIONDIALER.LIMITED' | translate}}</th>
25         <th md-column>{{'MOTIONDIALER.ORIGINATED' | translate}}</th>
26         <th md-column>{{'MOTIONDIALER.MESSAGE' | translate}}</th>
27         <th md-column>{{'MOTIONDIALER.CALLYSQUAREPROJECT' | translate}}</th>
28         <th md-column>{{ 'MOTIONDIALER.TRUNK' | translate }}</th>
29         <th md-column>{{ 'MOTIONDIALER.ACTIVE' | translate }}</th>
30       </tr>
31     </thead>
32     <tbody md-body>
33       <tr md-row ng-hide="vm.campaigns">
34         <td md-cell colspan="8">
35           <div layout="row" layout-align="center center">
36             <span translate="MOTIONDIALER.NO_AVAILABLE_INFO"
37               >No Available Info</span
38             >
39           </div>
40         </td>
41       </tr>
42       <tr md-row ng-repeat="(id, campaign) in vm.campaigns">
43         <td md-cell>
44           <span>{{campaign.name}}</span>
45         </td>
46         <td md-cell>
47           <span class="font-size-20 grey-fg"
48             >{{campaign.ivrTotalCallsDays || 0}}</span
49           >
50         </td>
51         <td md-cell>
52           <span class="font-size-20 grey-fg"
53             >{{campaign.ivrAnswerCallsDay || 0}} ({{(campaign.ivrTotalCallsDays)
54             ? (campaign.ivrAnswerCallsDay || 0) *
55             100/(campaign.ivrTotalCallsDays ) : 0 | number:1}}%)</span
56           >
57         </td>
58         <td md-cell>
59           <span class="font-size-20 grey-fg">{{campaign.limitCalls || 0}}</span>
60         </td>
61         <td md-cell>
62           <span class="font-size-20 grey-fg">{{campaign.originated || 0}}</span>
63         </td>
64         <td md-cell>
65           <span class="font-size-20 grey-fg"
66             >{{campaign.message ? ('MOTIONDIALER.'+campaign.message | translate)
67             : '--'}}</span
68           >
69         </td>
70         <td md-cell>
71           <span class="font-size-20 grey-fg"
72             >{{campaign.dialQueueProject || '--'}}</span
73           >
74         </td>
75         <td md-cell>
76           <span class="font-size-16 grey-fg"
77             >{{campaign.Trunk ? campaign.Trunk.name : '--'}}</span
78           >
79         </td>
80         <td md-cell>
81           <md-icon
82             md-colors="{color: {{campaign.active ? '\'green\'' : '\'red\''}}}"
83             md-font-icon="{{campaign.active ? 'icon-check' : 'icon-close'}}"
84           ></md-icon>
85         </td>
86         <td md-cell class="actions" ng-if="vm.crudPermissions.canEdit">
87           <md-menu>
88             <md-button
89               class="md-icon-button"
90               aria-label="More"
91               translate
92               translate-attr-aria-label="MOTIONDIALER.MORE"
93               ng-click="$mdMenu.open($event)"
94             >
95               <md-icon md-font-icon="icon-dots-vertical"></md-icon>
96             </md-button>
97             <md-menu-content width="3">
98               <md-menu-item>
99                 <md-button
100                   ng-click="vm.createOrEditIvrCampaign($event, campaign)"
101                   translate="MOTIONDIALER.EDIT_CAMPAIGN"
102                 >
103                   Edit Campaign
104                 </md-button>
105               </md-menu-item>
106             </md-menu-content>
107           </md-menu>
108         </td>
109       </tr>
110     </tbody>
111   </table>
112 </md-table-container>
113
114 <md-table-pagination
115   md-label="{page: '{{'MOTIONDIALER.PAGE' | translate}}:', rowsPerPage: '{{'MOTIONDIALER.ROWSPERPAGE' | translate}}:', of: '{{'MOTIONDIALER.OF' | translate}}'}"
116   md-limit="vm.query.limit"
117   md-limit-options="[10, 15, 20, 50, 100, 250]"
118   md-page="vm.query.page"
119   md-total="{{vm.count}}"
120   md-on-paginate="vm.getCampaigns"
121   md-page-select
122 ></md-table-pagination>
123 <!-- / QUEUE TABLE -->
124 <!-- / MAIN -->