-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathView.html
431 lines (394 loc) · 23.5 KB
/
View.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
[JavaScript:{ jsname: "AngularJS" }]
[JavaScript:{ path: "~/DesktopModules/CTLiteAdmin/Resources/js/nwsc-dnn-bs.js"}]
[JavaScript:{ path: "~/DesktopModules/CTLiteAdmin/Resources/js/01-ctliteadmin-controllers.js"}]
[JavaScript:{ path: "~/DesktopModules/CTLiteAdmin/Resources/js/02-ctliteadmin-dispatcher-directive.js"}]
[JavaScript:{ path: "~/DesktopModules/CTLiteAdmin/Resources/js/02-ctliteadmin-dpcode-directive.js"}]
[JavaScript:{ path: "~/DesktopModules/CTLiteAdmin/Resources/js/02-ctliteadmin-region-directive.js"}]
[JavaScript:{ path: "~/DesktopModules/CTLiteAdmin/Resources/js/02-ctliteadmin-ctcall-directive.js"}]
[JavaScript:{ path: "~/DesktopModules/CTLiteAdmin/Resources/js/02-ctliteadmin-detail-directive.js"}]
[JavaScript:{ path: "~/DesktopModules/CTLiteAdmin/Resources/js/03-ctliteadmin-app.js"}]
[Css:{path: "~/DesktopModules/CTLiteAdmin/Resources/css/sortorder-widget.css"}]
<div nwsc-app="myCTLAdminApp" id="[ModuleContext:ModuleId]" data-modulepath="/DesktopModules/CTLiteAdmin/"
ng-init="vm.init(true)" ng-controller="mainController as vm">
<div ng-switch on="vm.show">
<!-- Always show this section-->
<table width="100%" class="table table-striped ">
<tr>
<td align="Center">
<a class="btn btn-primary " ng-click="vm.openCalls()">Open Calls</a>
</td>
<td align="Center">
<a class="btn btn-primary " ng-click="vm.todayCalls()">All Calls</a>
</td>
<td align="Center">
<a class="btn btn-primary " ng-click="vm.adminDispatchers()">Dispatcher Administration</a>
</td>
<td align="Center">
<a class="btn btn-primary " ng-click="vm.adminCitys()">Region Administration</a>
</td>
<td align="Center">
<a class="btn btn-primary " ng-click="vm.adminDPCodes()">Dispatch Code Administration</a>
</td>
<td>
<a class="btn btn-warning " ng-click="vm.cancel()">Cancel</a>
</td>
<td></td>
</tr>
</table>
<!-- Default View Begin -->
<div ng-switch-when="default"></div>
<!-- End Default View -->
<!-- Open Calls View Begin -->
<div ng-switch-when="opencalls">
<p></p>
<h2>Open Calls</h2>
<label>Search: <input ng-model="vm.searchText"></label>
<add-edit-ctcall name="Add Call" title="Add New Call"
save-function="vm.createUpdateCall"
refresh-ctcalls="vm.getAllOpenCalls"
city-list="vm.citys"
ng-show="vm.EditMode "></add-edit-ctcall>
<table width="100%" class="table table-striped">
<tr>
<th align="left" >
<a ng-click="vm.order('CallDate')">Call Date</a>
<span class="sortorder" ng-show="vm.predicate === 'CallDate'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="left" >
<a ng-click="vm.order('CallType')">Call Type</a>
<span class="sortorder" ng-show="vm.predicate === 'CallType'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="left" >
<a ng-click="vm.order('CallerName')">Caller Name</a>
<span class="sortorder" ng-show="vm.predicate === 'CallerName'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="left">
<a ng-click="vm.order('CallBackNumber')">Call Back Number</a>
<span class="sortorder" ng-show="vm.predicate === 'CallBackNumber'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="justify">Action</th>
</tr>
<tr ng-repeat="opencall in vm.opencalls | orderBy:vm.predicate:vm.reverse | filter:vm.searchText ">
<td><small>{{opencall.CallDate | date: 'MM/dd/yyyy hh:mm a '}}</small></td>
<td ><small>{{opencall.CallType}}</small></td>
<td ><small>{{opencall.CallerName}}</small></td>
<td ><small>{{opencall.CallBackNumber}}</small></td>
<td align="justify"><small>
<add-edit-ctcall name="Edit" title="Edit Call"
save-function="vm.createUpdateCall"
refresh-ctcalls="vm.getAllOpenCalls"
edit-ctcall="opencall"
city-list="vm.citys"
ng-show="vm.EditMode "
style="float: left; margin-right: 10px;"></add-edit-ctcall>
<a ng-click="vm.reviewCallDetails(opencall, $index)" ng-show="vm.EditMode" href="javascript:void(0);">Dispatch</a>
<a ng-click="vm.deleteCtOpencall(opencall, $index)" ng-show="vm.EditMode" href="javascript:void(0);"> Delete </a>
</small>
</td>
</tr>
</table>
</div>
<!-- End Open Calls View -->
<!-- Todays Calls View Begin -->
<div ng-switch-when="calls">
<p></p>
<h2>All Calls</h2>
<label>Search: <input ng-model="vm.searchText"></label>
<add-edit-ctcall name="Add Call" title="Add New Call"
save-function="vm.createUpdateCall"
refresh-ctcalls="vm.getAllCalls"
city-list="vm.citys"
ng-show="vm.EditMode "></add-edit-ctcall>
<table width="100%" class="table table-striped">
<tr>
<th align="left">
<a ng-click="vm.order('CallDate')">Call Date</a>
<span class="sortorder" ng-show="vm.predicate === 'CallDate'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="left">
<a ng-click="vm.order('CallDate')">Call Time</a>
<span class="sortorder" ng-show="vm.predicate === 'CallDate'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="left">
<a ng-click="vm.order('CallType')"> Call Type </a>
<span class="sortorder" ng-show="vm.predicate === 'CallType'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="left">
<a ng-click="vm.order('CallerName')"> Caller Name </a>
<span class="sortorder" ng-show="vm.predicate === 'CallerName'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="left">
<a ng-click="vm.order('CallerAddress')"> Caller Address </a>
<span class="sortorder" ng-show="vm.predicate === 'CallerAddress'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="left">
<a ng-click="vm.order('CallBackNumber')"> Call Back Number </a>
<span class="sortorder" ng-show="vm.predicate === 'CallBackNumber'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="left">
<a ng-click="vm.order('CrossStreet')"> Cross Street </a>
<span class="sortorder" ng-show="vm.predicate === 'CrossStreet'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="left">
<a ng-click="vm.order('CallerCity')"> City </a>
<span class="sortorder" ng-show="vm.predicate === 'CallerCity'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="left">
<a ng-click="vm.order('UtilityType')"> Utility Type </a>
<span class="sortorder" ng-show="vm.predicate === 'UtilityType'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="left">
<a ng-click="vm.order('DispatchFlag')"> Dispatch Flag </a>
<span class="sortorder" ng-show="vm.predicate === 'DispatchFlag'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="justify">Action</th>
</tr>
<tr ng-repeat="call in vm.calls | orderBy:vm.predicate:vm.reverse | filter:vm.searchText">
<td><small>{{call.CallDate | date: 'MM/dd/yyyy'}}</small></td>
<td><small>{{call.CallDate | date: 'hh:mm a'}}</small></td>
<td><small>{{call.CallType}}</small></td>
<td><small>{{call.CallerName}}</small></td>
<td><small>{{call.CallerAddress}}</small></td>
<td><small>{{call.CallBackNumber}}</small></td>
<td><small>{{call.CrossStreet}}</small></td>
<td><small>{{call.CallerCity}}</small></td>
<td><small>{{call.UtilityType}}</small></td>
<td align="center"><small>{{call.DispatchFlag}}</small></td>
<td align="justify"> <small>
<add-edit-ctcall name="Edit" title="Edit Call"
save-function="vm.createUpdateCall"
refresh-ctcalls="vm.getAllCalls"
edit-ctcall="call"
city-list="vm.citys"
ng-show="vm.EditMode "
style="float: left; margin-right: 10px;"></add-edit-ctcall>
<a ng-click="vm.reviewCallDetails(call, $index)" ng-show="vm.EditMode" href="javascript:void(0);">Dispatch</a>
<a ng-click="vm.deleteCtcall(call, $index)" ng-show="vm.EditMode" href="javascript:void(0);">Delete</a>
</small>
</td>
</tr>
</table>
</div>
<!-- End Todays Calls View -->
<!-- Todays Call Details View Begin -->
<div ng-switch-when="details">
<p></p>
<h2>Call Details</h2>
<table width="100%" class="table table-striped">
<tr>
<th width="20%" align="left" >Call Information</th>
<th width="80%">Dispatch Data</th>
</tr>
<tr>
<!-- Call Details -->
<td width="25%" align="left" valign="top" >
<ul>
<li>
<span>CSR: {{vm.ctcalls.CSR}}</span>
</li>
<li>
<span>Call Type: {{vm.ctcalls.CallType}}</span>
</li>
<li>
<span>Call ID: {{vm.ctcalls.CallId}}</span>
</li>
<li>
<span>Call Type: {{vm.ctcalls.CallType}}</span>
</li>
<li>
<span>Name: {{vm.ctcalls.CallerName}}</span>
</li>
<li>
<span>Address: {{vm.ctcalls.CallerAddress}}</span>
</li>
<li>
<span>City: {{vm.ctcalls.CallerCity}}</span>
</li>
<li>
<span>Region: {{vm.ctcalls.Region}}</span>
</li>
<li>
<span>Utility: {{vm.ctcalls.UtilityType}}</span>
</li>
<li>
<span>Call Back #: {{vm.ctcalls.CallBackNumber}}</span>
</li>
<li>
<span>Comments: {{vm.ctcalls.Comments}}</span>
</li>
<li>
<span>Cross Street: {{vm.ctcalls.CrossStreet}}</span>
</li>
<li>
<span>Call Date: {{vm.ctcalls.CallDate | date: 'MM/dd/yyyy hh:mm a'}}</span>
</li>
</ul>
</td>
<!-- Dispatch Details -->
<td width="100%" valign="top">
<add-edit-ctdetail name="Add Details" title="Add Details"
save-function="vm.createUpdateDetail"
edit-call="vm.ctcalls"
refresh-calldetails="vm.getAllCallDetails"
dispatcher-list="vm.dispatchers"
dispatchcode-list="vm.dpcodes"
ng-show="vm.EditMode "
style="float: left; margin-right: 10px;"></add-edit-ctdetail>
<table width="100%" class="table table-striped">
<tr>
<th>Dispatch Code</th>
<th>Dispatch Date</th>
<th>Comments</th>
<th>Dispatcher</th>
<th>Action</th>
</tr>
<tr ng-repeat="calldetail in vm.calldetails">
<td><small>{{calldetail.DispatchCode}}</small></td>
<td><small>{{calldetail.DispatchTime | date: 'MM/dd/yyyy hh:mm a'}}</small></td>
<td><small>{{calldetail.Comments}}</small></td>
<td title="Contact #: {{calldetail.DispatcherPhone}}" ><small>{{calldetail.Dispatcher}}</small></td>
<td align="justify">
<small>
<add-edit-ctdetail name="Edit" title="Edit Details"
save-function="vm.createUpdateDetail"
edit-call="vm.ctcalls"
edit-details="calldetail"
refresh-calldetails="vm.getAllCallDetails"
dispatcher-list="vm.dispatchers"
dispatchcode-list="vm.dpcodes"
ng-show="vm.EditMode "
style="float: left; margin-right: 10px;"></add-edit-ctdetail>
<a ng-click="vm.deleteCtcalldetails(calldetail, $index)" ng-show="vm.EditMode" href="javascript:void(0);">Delete</a>
</small>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- End Call Details View -->
<!-- Begin Administer Dispatchers -->
<div ng-switch-when="dispatch">
<p></p>
<h2>Dispatcher Details</h2>
<label>Search: <input ng-model="vm.searchText"></label>
<add-edit-dispatcher name="Add Dispatcher" title="Add New Dispatcher"
save-function="vm.createUpdateDispatcher"
refresh-dispatchers="vm.getAllDispatchers"
ng-show="vm.EditMode "></add-edit-dispatcher>
<table width="75%" class="table table-striped">
<tr width="75%">
<th align="justify">
<a ng-click="vm.order('DispatcherName')">Dispatcher</a>
<span class="sortorder" ng-show="vm.predicate === 'DispatcherName'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="justify">
<a ng-click="vm.order('CellPhone')">Contact Phone</a>
<span class="sortorder" ng-show="vm.predicate === 'CellPhone'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="justify">
<a ng-click="vm.order('HomePhone')">Home Phone</a>
<span class="sortorder" ng-show="vm.predicate === 'HomePhone'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="justify">
<a ng-click="vm.order('AltPhone')">Alternate Phone</a>
<span class="sortorder" ng-show="vm.predicate === 'AltPhone'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="justify" >Action</th>
<th></th>
</tr>
<tr ng-repeat="dispatcher in vm.dispatchers | orderBy:vm.predicate:vm.reverse | filter:vm.searchText">
<td>{{dispatcher.DispatcherName}}</td>
<td>{{dispatcher.CellPhone}}</td>
<td>{{dispatcher.HomePhone}}</td>
<td>{{dispatcher.AltPhone}}</td>
<td align="justify">
<add-edit-dispatcher name="Edit" title="Edit Dispatcher"
save-function="vm.createUpdateDispatcher"
refresh-dispatchers="vm.getAllDispatchers"
edit-dispatcher="dispatcher"
ng-show="vm.EditMode "
style="float: left; margin-right: 10px;"></add-edit-dispatcher>
<a ng-click="vm.deleteDispatcher(dispatcher, $index)" ng-show="vm.EditMode" href="javascript:void(0);">Delete</a>
</td>
</tr>
</table>
</div>
<!-- End Administer Dispatchers -->
<!-- Begin Administrer Dispatch Codes -->
<div ng-switch-when="dpcode">
<p></p>
<h2>Dispatch Code Details</h2>
<label>Search: <input ng-model="vm.searchText"></label>
<add-edit-dpcode name="Add Dispatch Code" title="Add New Dispatch Code"
save-function="vm.createUpdateDPCode"
refresh-dpcodes="vm.getAllDPCodes"
ng-show="vm.EditMode "></add-edit-dpcode>
<table align="center" width="50%" class="table table-striped">
<tr>
<th align="justify">
<a ng-click="vm.order('DispatchCodeName')">Dispatch Code Name</a>
<span class="sortorder" ng-show="vm.predicate === 'DispatchCodeName'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="justify">Action</th>
</tr>
<tr ng-repeat="dpcode in vm.dpcodes | orderBy:vm.predicate:vm.reverse | filter:vm.searchText">
<td>{{dpcode.DispatchCodeName}}</td>
<td align="justify">
<add-edit-dpcode name="Edit" title="Edit Dispatch Code"
save-function="vm.createUpdateDPCode"
refresh-dpcodes="vm.getAllDPCodes"
edit-entity="dpcode"
ng-show="vm.EditMode "
style="float: left; margin-right: 10px;"></add-edit-dpcode>
<a ng-click="vm.deleteDPCode(dpcode, $index)" ng-show="vm.EditMode" href="javascript:void(0);">Delete</a>
</td>
</tr>
</table>
</div>
<!-- End Administer Dispatch Codes -->
<!-- Begin Administrer Regions -->
<div ng-switch-when="regions">
<p></p>
<h2>Region Details</h2>
<label>Search: <input ng-model="vm.searchText"></label>
<add-edit-region name="Add Region" title="Add New Region"
save-region="vm.createUpdateCity"
refresh-regions="vm.getAllCitys"
ng-show="vm.EditMode "></add-edit-region>
<table width="90%" class="table table-striped">
<tr>
<th align="justify">
<a ng-click="vm.order('CityName')">City Name</a>
<span class="sortorder" ng-show="vm.predicate === 'CityName'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="justify">
<a ng-click="vm.order('RegionName')">Region Name</a>
<span class="sortorder" ng-show="vm.predicate === 'RegionName'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="justify">
<a ng-click="vm.order('UtilityType')">Utility Type</a>
<span class="sortorder" ng-show="vm.predicate === 'UtilityType'" ng-class="{reverse:vm.reverse}"></span>
</th>
<th align="justify">Action</th>
</tr>
<tr ng-repeat="city in vm.citys | orderBy:vm.predicate:vm.reverse | filter:vm.searchText ">
<td>{{city.CityName}}</td>
<td>{{city.RegionName}}</td>
<td>{{city.UtilityType}}</td>
<td align="justify">
<add-edit-region name="Edit" title="Edit Region"
save-region="vm.createUpdateCity"
refresh-regions="vm.getAllCitys"
edit-region="city"
ng-show="vm.EditMode "
style="float: left; margin-right: 10px;"></add-edit-region>
<a ng-click="vm.deleteCity(city, $index)" ng-show="vm.EditMode" href="javascript:void(0);">Delete</a>
</td>
</tr>
</table>
</div>
<!-- End Administer Regions -->
</div>
</div>