1 <md-dialog class="queueCampaign-dialog" aria-label="New QueueCampaign">
2 <form name="queueCampaignForm" class="md-inline-form" novalidate>
3 <md-toolbar class="md-accent md-hue-2">
5 class="md-toolbar-tools"
7 layout-align="space-between center"
9 <span class="title">{{ vm.title | translate }}</span>
10 <md-button class="md-icon-button" ng-click="vm.closeDialog()">
12 md-font-icon="icon-close"
13 aria-label="Close dialog"
19 <md-dialog-content ms-scroll>
20 <div class="error-list">
22 ng-repeat="error in vm.errors"
25 layout-align="space-between center"
28 <span class="message">{{error.message}}</span>
29 <span class="type">({{error.type}})</span>
31 <md-button class="md-icon-button">
33 md-font-icon="icon-alert-box"
34 aria-label="alert error"
40 <md-input-container class="md-block">
41 <label translate="MOTIONDIALER.NAME">Name</label>
45 ng-model="vm.queueCampaign.name"
46 ng-pattern="/^[A-Za-z0-9\.\_]+$/i"
49 ng-disabled="!vm.newQueueCampaign"
52 <div class="hint"><span translate="MOTIONDIALER.HELP.NAME"></span></div>
54 ng-messages="queueCampaignForm['name'].$error"
55 ng-show="queueCampaignForm['name'].$touched"
58 <div ng-message="required">
59 <span translate="MOTIONDIALER.ERRORS.NAME_REQUIRED"
60 >Name field is required</span
63 <div ng-message="pattern">
65 translate="MOTIONDIALER.ERRORS.NAME_MUST_VALID_PATTERN"
66 translate-values="{ regex: '/^[A-Za-z0-9\.\_]+$/i' }"
67 >Name must be valid pattern
72 <md-input-container class="md-block">
73 <md-switch ng-model="vm.queueCampaign.dialActive" aria-label="Active"
74 ><span translate="MOTIONDIALER.ACTIVE">Active</span></md-switch
77 <md-input-container class="md-block">
78 <label translate="MOTIONDIALER.TRUNK">Trunk</label>
79 <md-select name="TrunkId" ng-model="vm.queueCampaign.TrunkId" required>
82 ng-repeat="TrunkId in vm.trunks"
83 ng-disabled="TrunkId.canSelect === false"
84 >{{ TrunkId.name }}</md-option
88 ng-messages="queueCampaignForm['TrunkId'].$error"
89 ng-show="queueCampaignForm['TrunkId'].$touched"
92 <div ng-message="required">
93 <span translate="MOTIONDIALER.ERRORS.TRUNK_REQUIRED"
94 >Trunk field is required</span
100 ng-if="vm.queueCampaign.dialMethod != 'preview'"
103 <label translate="MOTIONDIALER.INTERVAL">Interval</label>
106 ng-model="vm.queueCampaign.IntervalId"
110 ng-value="IntervalId.id"
111 ng-repeat="IntervalId in vm.interval"
112 ng-disabled="IntervalId.canSelect === false"
113 >{{ IntervalId.name }}</md-option
117 ng-messages="queueCampaignForm['IntervalId'].$error"
118 ng-show="queueCampaignForm['IntervalId'].$touched"
121 <div ng-message="required">
122 <span translate="MOTIONDIALER.ERRORS.INTERVAL_REQUIRED"
123 >Interval field is required</span
127 </md-input-container>
128 <md-input-container class="md-block">
129 <label translate="MOTIONDIALER.CHECKDUPLICATE">CheckDuplicate</label>
131 name="dialCheckDuplicateType"
132 ng-model="vm.queueCampaign.dialCheckDuplicateType"
135 <md-option ng-value="'always'">
136 {{ 'MOTIONDIALER.ALWAYS' | translate }}
139 <md-option ng-value="'never'">
140 {{ 'MOTIONDIALER.NEVER' | translate }}
143 <md-option ng-value="'onlyIfOpen'">
144 {{ 'MOTIONDIALER.ONLY_IF_OPEN' | translate }}
148 ng-messages="queueCampaignForm['dialCheckDuplicateType'].$error"
149 ng-show="queueCampaignForm['dialCheckDuplicateType'].$touched"
152 <div ng-message="required">
153 <span translate="MOTIONDIALER.ERRORS.CHECKDUPLICATE_REQUIRED"
154 >CheckDuplicate field is required</span
158 </md-input-container>
159 <md-input-container class="md-block">
160 <label translate="MOTIONDIALER.METHOD">Method</label>
163 ng-model="vm.queueCampaign.dialMethod"
166 <md-option ng-value="'progressive'">Progressive</md-option>
167 <md-option ng-value="'power'">PowerDialing</md-option>
168 <md-option ng-value="'predictive'">Predictive</md-option>
169 <md-option ng-value="'preview'">Preview</md-option>
170 <md-option ng-value="'booked'">BookedProgressive</md-option>
173 <span translate="MOTIONDIALER.HELP.METHOD"></span>
176 ng-messages="queueCampaignForm['dialMethod'].$error"
177 ng-show="queueCampaignForm['dialMethod'].$touched"
180 <div ng-message="required">
181 <span translate="MOTIONDIALER.ERRORS.METHOD_REQUIRED"
182 >Method field is required</span
186 </md-input-container>
188 ng-if="vm.queueCampaign.dialMethod == 'power'"
191 <span translate="MOTIONDIALER.POWERLEVEL">PowerLevel</span>
193 <span translate="MOTIONDIALER.HELP.POWERLEVEL"></span>
198 ng-model="vm.queueCampaign.dialPowerLevel"
204 </md-input-container>
206 ng-if="vm.queueCampaign.dialMethod == 'predictive'"
209 <label translate="MOTIONDIALER.PREDICTIVEOPTIMIZATION"
210 >PredictiveOptimization</label
213 name="dialPredictiveOptimization"
214 ng-model="vm.queueCampaign.dialPredictiveOptimization"
216 <md-option ng-value="'agentBusyFactor'">
217 {{ 'MOTIONDIALER.AGENTBUSYFACTOR' | translate }}
220 <md-option ng-value="'dropRate'">
221 {{ 'MOTIONDIALER.DROPRATE' | translate }}
225 <span translate="MOTIONDIALER.HELP.PREDICTIVEOPTIMIZATION"></span>
228 ng-messages="queueCampaignForm['dialPredictiveOptimization'].$error"
229 ng-show="queueCampaignForm['dialPredictiveOptimization'].$touched"
232 <div ng-message="required">
234 translate="MOTIONDIALER.ERRORS.PREDICTIVEOPTIMIZATION_REQUIRED"
235 >PredictiveOptimization field is required</span
239 </md-input-container>
241 ng-if="vm.queueCampaign.dialMethod == 'predictive'"
244 <span translate="MOTIONDIALER.PREDICTIVEOPTIMIZATIONPERCENTAGE"
245 >PredictiveOptimizationPercentage</span
249 translate="MOTIONDIALER.HELP.PREDICTIVEOPTIMIZATIONPERCENTAGE"
255 ng-model="vm.queueCampaign.dialPredictiveOptimizationPercentage"
261 </md-input-container>
263 ng-if="vm.queueCampaign.dialMethod == 'predictive'"
266 <span translate="MOTIONDIALER.PREDICTIVEINTERVAL"
267 >PredictiveInterval</span
270 <span translate="MOTIONDIALER.HELP.PREDICTIVEINTERVAL"></span>
275 ng-model="vm.queueCampaign.dialPredictiveInterval"
281 </md-input-container>
283 ng-if="vm.queueCampaign.dialMethod != 'preview'"
286 <label translate="MOTIONDIALER.MAXCONCURRENTCALLS"
287 >MaxConcurrentCalls</label
291 name="dialLimitQueue"
292 ng-model="vm.queueCampaign.dialLimitQueue"
299 <span translate="MOTIONDIALER.HELP.MAXCONCURRENTCALLS"></span>
302 ng-messages="queueCampaignForm['dialLimitQueue'].$error"
303 ng-show="queueCampaignForm['dialLimitQueue'].$touched"
306 <div ng-message="required">
307 <span translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_REQUIRED"
308 >MaxConcurrentCalls field is required</span
311 <div ng-message="min">
313 translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
314 >MaxConcurrentCalls must be a valid greater or equal than</span
318 <div ng-message="max">
320 translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_MUST_BE_LESS_THAN_OR_EQUAL_TO"
321 >MaxConcurrentCalls must be a valid greater or equal than</span
326 </md-input-container>
328 ng-if="vm.queueCampaign.dialMethod === 'progressive' || vm.queueCampaign.dialMethod === 'predictive' || vm.queueCampaign.dialMethod === 'power'"
331 <label translate="MOTIONDIALER.QUEUETIMEOUT">QueueTimeout</label>
334 name="dialQueueTimeout"
335 ng-model="vm.queueCampaign.dialQueueTimeout"
342 <span translate="MOTIONDIALER.HELP.QUEUETIMEOUT"></span>
345 ng-messages="queueCampaignForm['dialQueueTimeout'].$error"
346 ng-show="queueCampaignForm['dialQueueTimeout'].$touched"
349 <div ng-message="required">
350 <span translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_REQUIRED"
351 >QueueTimeout field is required</span
354 <div ng-message="min">
356 translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
357 >QueueTimeout must be a valid greater or equal than</span
361 <div ng-message="max">
363 translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO"
364 >QueueTimeout must be a valid greater or equal than</span
369 </md-input-container>
370 <md-input-container class="md-block">
371 <label translate="MOTIONDIALER.AGENTTIMEOUT">AgentTimeout</label>
375 ng-model="vm.queueCampaign.timeout"
381 <span translate="MOTIONDIALER.HELP.AGENTTIMEOUT"></span>
384 ng-messages="queueCampaignForm['timeout'].$error"
385 ng-show="queueCampaignForm['timeout'].$touched"
388 <div ng-message="required">
389 <span translate="MOTIONDIALER.ERRORS.AGENTTIMEOUT_REQUIRED"
390 >AgentTimeout field is required</span
393 <div ng-message="min">
395 translate="MOTIONDIALER.ERRORS.AGENTTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
396 >AgentTimeout must be a valid greater or equal than</span
401 </md-input-container>
402 <md-input-container class="md-block">
403 <label translate="MOTIONDIALER.DESCRIPTION">Description</label>
407 ng-model="vm.queueCampaign.description"
411 ng-messages="queueCampaignForm['description'].$error"
412 ng-show="queueCampaignForm['description'].$touched"
415 <div ng-message="required">
416 <span translate="MOTIONDIALER.ERRORS.DESCRIPTION_REQUIRED"
417 >Description field is required</span
421 </md-input-container>
423 <div class="error-list">
425 ng-repeat="error in vm.errors"
428 layout-align="space-between center"
431 <span class="message">{{error.message}}</span>
432 <span class="type">({{error.type}})</span>
434 <md-button class="md-icon-button">
436 md-font-icon="icon-alert-box"
437 aria-label="alert error"
447 layout-align="space-between center"
448 ng-if="!vm.crudPermissions.readOnly"
450 <div layout="row" layout-align="start center">
453 ng-if="vm.crudPermissions.canEdit && !vm.newQueueCampaign"
454 ng-click="vm.saveQueueCampaign()"
455 class="send-button md-accent md-raised"
456 ng-disabled="queueCampaignForm.$invalid || queueCampaignForm.$pristine"
458 translate="MOTIONDIALER.SAVE"
459 translate-attr-aria-label="MOTIONDIALER.SAVE"
466 ng-if="vm.crudPermissions.canEdit && vm.newQueueCampaign"
467 ng-click="vm.addNewQueueCampaign()"
468 class="send-button md-accent md-raised"
469 ng-disabled="queueCampaignForm.$invalid"
471 translate="MOTIONDIALER.ADD_QUEUECAMPAIGN"
472 translate-attr-aria-label="MOTIONDIALER.ADD_QUEUECAMPAIGN"
479 class="md-icon-button"
480 ng-if="vm.crudPermissions.canDelete && !vm.newQueueCampaign"
481 ng-click="vm.deleteQueueCampaign($event)"
484 translate-attr-aria-label="MOTIONDIALER.DELETE"
486 <md-icon md-font-icon="icon-delete"></md-icon>
488 ><span translate="MOTIONDIALER.DELETE">DELETE</span></md-tooltip