| Line 10... |
Line 10... |
| 10 |
</div>
|
10 |
</div>
|
| 11 |
</div>
|
11 |
</div>
|
| 12 |
|
12 |
|
| 13 |
<div class="row" style="margin-bottom:10px;">
|
13 |
<div class="row" style="margin-bottom:10px;">
|
| 14 |
<div class="col-lg-12" style="display:flex; gap:10px; align-items:center; flex-wrap:wrap;">
|
14 |
<div class="col-lg-12" style="display:flex; gap:10px; align-items:center; flex-wrap:wrap;">
|
| - |
|
15 |
<label style="margin:0;">Category:</label>
|
| - |
|
16 |
<select id="dayViewCategory" class="form-control input-sm" style="width:140px;">
|
| - |
|
17 |
<option value="$categoryId">Sales</option>
|
| - |
|
18 |
</select>
|
| - |
|
19 |
<label style="margin:0;">Level:</label>
|
| - |
|
20 |
<select id="dayViewLevel" class="form-control input-sm" style="width:140px;">
|
| - |
|
21 |
<option value="">All Levels</option>
|
| - |
|
22 |
#foreach($lvl in $escalationTypes)
|
| - |
|
23 |
<option value="$lvl">$lvl</option>
|
| - |
|
24 |
#end
|
| - |
|
25 |
</select>
|
| 15 |
<label style="margin:0;">Date:</label>
|
26 |
<label style="margin:0;">Date:</label>
|
| 16 |
<input type="date" id="dayViewDate" class="form-control input-sm" style="width:160px;">
|
27 |
<input type="date" id="dayViewDate" class="form-control input-sm" style="width:160px;">
|
| 17 |
<button class="btn btn-primary btn-sm" id="dayViewLoad">Load</button>
|
28 |
<button class="btn btn-primary btn-sm" id="dayViewLoad">Load</button>
|
| 18 |
<span id="dayViewSummary" style="color:#777; font-size:12px; margin-left:10px;"></span>
|
29 |
<span id="dayViewSummary" style="color:#777; font-size:12px; margin-left:10px;"></span>
|
| 19 |
</div>
|
30 |
</div>
|
| Line 70... |
Line 81... |
| 70 |
alert('Pick a date');
|
81 |
alert('Pick a date');
|
| 71 |
return;
|
82 |
return;
|
| 72 |
}
|
83 |
}
|
| 73 |
$('#dayViewRows').html('<tr><td colspan="8" style="text-align:center;">Loading...</td></tr>');
|
84 |
$('#dayViewRows').html('<tr><td colspan="8" style="text-align:center;">Loading...</td></tr>');
|
| 74 |
$('#dayViewSummary').text('');
|
85 |
$('#dayViewSummary').text('');
|
| - |
|
86 |
var params = {startDate: d, endDate: d};
|
| - |
|
87 |
var cat = $('#dayViewCategory').val();
|
| - |
|
88 |
var lvl = $('#dayViewLevel').val();
|
| - |
|
89 |
if (cat) params.categoryId = cat;
|
| - |
|
90 |
if (lvl) params.escalationType = lvl;
|
| 75 |
$.get(context + '/beatPlan/scheduledList', {startDate: d, endDate: d}).done(function (r) {
|
91 |
$.get(context + '/beatPlan/scheduledList', params).done(function (r) {
|
| 76 |
var data = r.response || r;
|
92 |
var data = r.response || r;
|
| 77 |
renderDayViewRows(data.rows || []);
|
93 |
renderDayViewRows(data.rows || []);
|
| 78 |
$('#dayViewSummary').text((data.rows || []).length + ' beats scheduled on ' + data.startDate);
|
94 |
$('#dayViewSummary').text((data.rows || []).length + ' beats scheduled on ' + data.startDate);
|
| 79 |
}).fail(function (xhr) {
|
95 |
}).fail(function (xhr) {
|
| 80 |
$('#dayViewRows').html('<tr><td colspan="8" style="color:#d9534f; text-align:center;">Error: ' + (xhr.responseText || xhr.statusText) + '</td></tr>');
|
96 |
$('#dayViewRows').html('<tr><td colspan="8" style="color:#d9534f; text-align:center;">Error: ' + (xhr.responseText || xhr.statusText) + '</td></tr>');
|