1 <md-dialog class="agent-dialog" aria-label="agent dispose">
2 <form name="disposition" class="md-inline-form" novalidate>
3 <md-toolbar class="md-background-bg">
5 class="md-toolbar-tools"
7 layout-align="space-between center"
9 <span class="title" translate="DASHBOARDS.DISPOSE"></span>
11 class="md-icon-button"
12 ng-click="vm.closeDialog()"
13 ng-if="!vm.call.mandatoryDisposition"
16 md-font-icon="icon-close"
17 aria-label="Close dialog"
22 <md-dialog-content ms-scroll>
23 <div ng-if="!vm.isReschedule">
24 <md-input-container class="md-block">
25 <label translate="DASHBOARDS.DISPOSITION">Disposition</label>
28 ng-model="vm.firstLevelDisposition"
29 ng-change="vm.onDispositionChange('first')"
33 ng-value="disposition"
34 ng-repeat="disposition in vm.dispositions | filter: { level: 'first' }"
36 {{ disposition.name }}</md-option
39 ng-value="globalDisposition"
40 ng-repeat="globalDisposition in vm.globalDispositions | filter: { level: 'first' }"
42 {{ globalDisposition.name }}</md-option
46 ng-messages="dispositionForm.disposition.$error"
47 ng-show="dispositionForm.disposition.$touched"
50 <div ng-message="required">
51 <span translate="DASHBOARDS.ERRORS.DISPOSITION_REQUIRED"
52 >Disposition field is required</span
58 ng-if="vm.firstLevelDisposition && vm.anySecondLevelDisposition"
60 layout-align="start center"
62 <md-input-container class="md-block" flex>
63 <label translate="DASHBOARDS.SECOND_LEVEL_DISPOSITION"
64 >Second Level Disposition</label
67 name="secondLevelDisposition"
68 ng-model="vm.secondLevelDisposition"
69 ng-change="vm.onDispositionChange('second')"
72 ng-value="disposition"
73 ng-repeat="disposition in vm.dispositions | filter: { level: 'second', ParentId: vm.firstLevelDisposition.id }"
75 {{ disposition.name }}</md-option
78 ng-value="globalDisposition"
79 ng-repeat="globalDisposition in vm.globalDispositions | filter: { level: 'second', ParentId: vm.firstLevelDisposition.id }"
81 {{ globalDisposition.name }}</md-option
86 ng-if="vm.secondLevelDisposition"
87 ng-click="vm.clearDispositionSelection('second')"
88 class="md-icon-button"
91 md-font-icon="icon-cancel"
92 aria-label="Clear second level disposition selection"
98 ng-if="vm.secondLevelDisposition && vm.anyThirdLevelDisposition"
100 layout-align="start center"
102 <md-input-container class="md-block" flex>
103 <label translate="DASHBOARDS.THIRD_LEVEL_DISPOSITION"
104 >Third Level Disposition</label
107 name="thirdLevelDisposition"
108 ng-model="vm.thirdLevelDisposition"
109 ng-change="vm.onDispositionChange('third')"
112 ng-value="disposition"
113 ng-repeat="disposition in vm.dispositions | filter: { level: 'third', ParentId: vm.secondLevelDisposition.id }"
115 {{ disposition.name }}</md-option
118 ng-value="globalDisposition"
119 ng-repeat="globalDisposition in vm.globalDispositions | filter: { level: 'third', ParentId: vm.secondLevelDisposition.id }"
121 {{ globalDisposition.name }}</md-option
124 </md-input-container>
126 ng-if="vm.thirdLevelDisposition"
127 ng-click="vm.clearDispositionSelection('third')"
128 class="md-icon-button"
131 md-font-icon="icon-cancel"
132 aria-label="Clear third level disposition selection"
137 <md-input-container class="md-block">
138 <label translate="DASHBOARDS.NOTE">Note</label>
145 </md-input-container>
147 <div ng-if="vm.isReschedule">
149 <div flex class="md-block">
154 mdp-placeholder="Date"
155 mdp-format="YYYY-MM-DD"
156 mdp-min-date="vm.hopper.minDate"
157 ng-model="vm.hopper.dateTime"
160 ng-messages="disposition.date.$error"
161 ng-show="disposition.date.$touched"
164 <div ng-message="required">
165 <span translate="DASHBOARDS.ERRORS.DATE_REQUIRED"
166 >Date is required</span
169 <div ng-message="format">
170 <span translate="DASHBOARDS.ERRORS.DATE_INVALID"
171 >Date is invalid</span
178 <div flex class="md-block">
183 mdp-placeholder="Time"
184 mdp-format="HH:mm:ss"
185 mdp-auto-switch="true"
186 ng-model="vm.hopper.dateTime"
189 ng-messages="disposition.time.$error"
190 ng-show="disposition.time.$touched"
193 <div ng-message="required">
194 <span translate="DASHBOARDS.ERRORS.TIME_REQUIRED"
195 >Time is required</span
198 <div ng-message="format">
199 <span translate="DASHBOARDS.ERRORS.TIME_INVALID"
200 >Time is invalid</span
207 <md-input-container ng-if="!vm.dialerCall" class="md-block">
208 <label translate="DASHBOARDS.CAMPAIGN">Campaign</label>
209 <md-select name="queueCampaign" ng-model="vm.queueCampaign" required>
211 ng-value="queueCampaign"
212 ng-repeat="queueCampaign in vm.queueCampaigns.rows"
214 {{ queueCampaign.name }} ({{ queueCampaign.dialActive ? 'Active' :
215 'Not Active' }})</md-option
219 ng-messages="disposition.queueCampaign.$error"
220 ng-show="disposition.queueCampaign.$touched"
223 <div ng-message="required">
224 <span translate="DASHBOARDS.ERRORS.CAMPAIGN_REQUIRED"
225 >Campaign field is required</span
229 </md-input-container>
232 <md-dialog-actions ng-if="!vm.isReschedule" layout="row">
234 ng-disabled="disposition.$invalid || disposition.$pristine"
235 class="send-button md-raised md-accent"
236 ng-click="vm.saveDisposition()"
238 {{(vm.selectedDisposition.name ? 'DASHBOARDS.DISPOSE' :
239 'DASHBOARDS.SAVE') | translate}}
242 class="send-button md-raised md-primary"
243 translate="DASHBOARDS.RESCHEDULE"
244 ng-click="vm.saveDisposition('reschedule')"
249 class="send-button md-accent md-raised"
250 translate="DASHBOARDS.RECALLME"
251 ng-click="vm.saveDisposition('recallme')"
257 ng-if="vm.hasBlackLists"
258 class="md-raised md-warn"
259 translate="DASHBOARDS.BLACKLIST"
260 ng-click="vm.saveDisposition('blacklist')"
266 ng-if="vm.isReschedule"
268 layout-align="space-between center"
270 <div layout="row" layout-align="start center">
273 ng-click="vm.saveReschedule()"
274 class="send-button md-accent md-raised"
275 ng-disabled="disposition.$invalid || disposition.$pristine || vm.disable"
277 translate="DASHBOARDS.SAVE"
278 translate-attr-aria-label="DASHBOARDS.SAVE"