| Line 138... |
Line 138... |
| 138 |
|
138 |
|
| 139 |
<table id="rbm-call-target-table" class="table table-bordered table-striped">
|
139 |
<table id="rbm-call-target-table" class="table table-bordered table-striped">
|
| 140 |
<thead>
|
140 |
<thead>
|
| 141 |
<tr>
|
141 |
<tr>
|
| 142 |
<th>RBM Name</th>
|
142 |
<th>RBM Name</th>
|
| 143 |
#*<th style="background-color: #17a2b8; color: white;">Agent Status</th>
|
143 |
<th style="background-color: #17a2b8; color: white;">Agent Status</th>
|
| 144 |
<th style="background-color: #17a2b8; color: white;">Time in Status</th>*#
|
144 |
<th style="background-color: #17a2b8; color: white;">Time in Status</th>
|
| 145 |
<th>Partner Count</th>
|
145 |
<th>Partner Count</th>
|
| 146 |
<th>(Ach/Tgt)</th>
|
146 |
<th>(Ach/Tgt)</th>
|
| 147 |
<th>Calling Target</th>
|
147 |
<th>Calling Target</th>
|
| 148 |
<th>Called</th>
|
148 |
<th>Called</th>
|
| 149 |
<th class="highlight-plan-today">Plan Today</th>
|
149 |
<th class="highlight-plan-today">Plan Today</th>
|
| Line 199... |
Line 199... |
| 199 |
#set($adjustedTotalTarget = $totalTodayTarget + $totalMovedToFuture)
|
199 |
#set($adjustedTotalTarget = $totalTodayTarget + $totalMovedToFuture)
|
| 200 |
#set($adjustedTotalAchieved = $totalValueAchieved + $totalMovedToFuture)
|
200 |
#set($adjustedTotalAchieved = $totalValueAchieved + $totalMovedToFuture)
|
| 201 |
|
201 |
|
| 202 |
<tr>
|
202 |
<tr>
|
| 203 |
<td><strong>TOTAL</strong></td>
|
203 |
<td><strong>TOTAL</strong></td>
|
| 204 |
#*<td>-</td>
|
204 |
<td>-</td>
|
| 205 |
<td>-</td>*#
|
205 |
<td>-</td>
|
| 206 |
<td><strong>$totalPartnerCount</strong></td>
|
206 |
<td><strong>$totalPartnerCount</strong></td>
|
| 207 |
<td><strong><span class="lakh">$totalArrAchieved</span> / <span class="lakh">$totalArrTarget</span></strong>
|
207 |
<td><strong><span class="lakh">$totalArrAchieved</span> / <span class="lakh">$totalArrTarget</span></strong>
|
| 208 |
</td>
|
208 |
</td>
|
| 209 |
<td class="highlight-target"><strong>$adjustedTotalTarget</strong></td>
|
209 |
<td class="highlight-target"><strong>$adjustedTotalTarget</strong></td>
|
| 210 |
<td class="highlight-achieved currency"><strong>$adjustedTotalAchieved</strong></td>
|
210 |
<td class="highlight-achieved currency"><strong>$adjustedTotalAchieved</strong></td>
|
| Line 222... |
Line 222... |
| 222 |
#set($rowTarget = $model.getTodayTargetOfCall() + $model.getMovedToFuture())
|
222 |
#set($rowTarget = $model.getTodayTargetOfCall() + $model.getMovedToFuture())
|
| 223 |
#set($rowAchieved = $model.getValueTargetAchieved() + $model.getMovedToFuture())
|
223 |
#set($rowAchieved = $model.getValueTargetAchieved() + $model.getMovedToFuture())
|
| 224 |
#set($agentStatus = $agentStatusByAuthId.get($model.getAuthId()))
|
224 |
#set($agentStatus = $agentStatusByAuthId.get($model.getAuthId()))
|
| 225 |
<tr>
|
225 |
<tr>
|
| 226 |
<td>$model.getRbmName()</td>
|
226 |
<td>$model.getRbmName()</td>
|
| 227 |
#*<td class="agent-status-cell" data-authid="$model.getAuthId()">
|
227 |
<td class="agent-status-cell" data-authid="$model.getAuthId()">
|
| 228 |
#if($agentStatus && $agentStatus.getAgentStatus())
|
228 |
#if($agentStatus && $agentStatus.getAgentStatus())
|
| 229 |
#if($agentStatus.getAgentStatus() == "On Call")
|
229 |
#if($agentStatus.getAgentStatus() == "On Call")
|
| 230 |
<span class="badge" style="background-color: #28a745; color: white;">$agentStatus.getAgentStatus()</span>
|
230 |
<span class="badge" style="background-color: #28a745; color: white;">$agentStatus.getAgentStatus()</span>
|
| 231 |
#elseif($agentStatus.getAgentStatus() == "Available")
|
231 |
#elseif($agentStatus.getAgentStatus() == "Available")
|
| 232 |
<span class="badge" style="background-color: #17a2b8; color: white;">$agentStatus.getAgentStatus()</span>
|
232 |
<span class="badge" style="background-color: #17a2b8; color: white;">$agentStatus.getAgentStatus()</span>
|
| Line 247... |
Line 247... |
| 247 |
#if($agentStatus && $agentStatus.getTimeInStatus())
|
247 |
#if($agentStatus && $agentStatus.getTimeInStatus())
|
| 248 |
$agentStatus.getTimeInStatus()
|
248 |
$agentStatus.getTimeInStatus()
|
| 249 |
#else
|
249 |
#else
|
| 250 |
-
|
250 |
-
|
| 251 |
#end
|
251 |
#end
|
| 252 |
</td>*#
|
252 |
</td>
|
| 253 |
<td>$model.getPartnerCount()</td>
|
253 |
<td>$model.getPartnerCount()</td>
|
| 254 |
<td>
|
254 |
<td>
|
| 255 |
#if($arrAchievedByAuthId && $arrAchievedByAuthId.get($model.getAuthId()))
|
255 |
#if($arrAchievedByAuthId && $arrAchievedByAuthId.get($model.getAuthId()))
|
| 256 |
<span class="lakh">$arrAchievedByAuthId.get($model.getAuthId())</span>
|
256 |
<span class="lakh">$arrAchievedByAuthId.get($model.getAuthId())</span>
|
| 257 |
#else
|
257 |
#else
|
| Line 407... |
Line 407... |
| 407 |
.catch(function () {
|
407 |
.catch(function () {
|
| 408 |
document.getElementById('calledDetailsContent').innerHTML = '<p>Error loading details. Please try again.</p>';
|
408 |
document.getElementById('calledDetailsContent').innerHTML = '<p>Error loading details. Please try again.</p>';
|
| 409 |
});
|
409 |
});
|
| 410 |
}
|
410 |
}
|
| 411 |
|
411 |
|
| 412 |
/* Agent Status columns commented out - uncomment when needed
|
- |
|
| 413 |
// Auto-refresh agent status every 30 seconds
|
412 |
// Auto-refresh agent status every 30 seconds
|
| 414 |
function refreshAgentStatus() {
|
413 |
function refreshAgentStatus() {
|
| 415 |
fetch('/indent/rbm_call_target/get_agent_statuses')
|
414 |
fetch('/indent/rbm_call_target/get_agent_statuses')
|
| 416 |
.then(function (response) {
|
415 |
.then(function (response) {
|
| 417 |
return response.json();
|
416 |
return response.json();
|
| Line 463... |
Line 462... |
| 463 |
// Refresh every 20 seconds
|
462 |
// Refresh every 20 seconds
|
| 464 |
setInterval(refreshAgentStatus, 20000);
|
463 |
setInterval(refreshAgentStatus, 20000);
|
| 465 |
|
464 |
|
| 466 |
// Initial refresh after page load
|
465 |
// Initial refresh after page load
|
| 467 |
setTimeout(refreshAgentStatus, 2000);
|
466 |
setTimeout(refreshAgentStatus, 2000);
|
| 468 |
*/
|
- |
|
| 469 |
|
467 |
|
| 470 |
// Download All Call Data by Date
|
468 |
// Download All Call Data by Date
|
| 471 |
function downloadCallData() {
|
469 |
function downloadCallData() {
|
| 472 |
var selectedDate = document.getElementById('downloadDate').value;
|
470 |
var selectedDate = document.getElementById('downloadDate').value;
|
| 473 |
if (!selectedDate) {
|
471 |
if (!selectedDate) {
|