| Line 436... |
Line 436... |
| 436 |
var rowStyle = '';
|
436 |
var rowStyle = '';
|
| 437 |
var recordingHtml = '-';
|
437 |
var recordingHtml = '-';
|
| 438 |
|
438 |
|
| 439 |
// Check if this is a break log entry
|
439 |
// Check if this is a break log entry
|
| 440 |
if (data[i].breakLog) {
|
440 |
if (data[i].breakLog) {
|
| - |
|
441 |
var status = (data[i].breakStatus || '').toLowerCase();
|
| - |
|
442 |
if (status.indexOf('available') >= 0) {
|
| 441 |
rowStyle = 'style="background-color: #f8d7da; color: #721c24; font-weight: bold;"';
|
443 |
rowStyle = 'style="background-color: #d4edda; color: #155724;"'; // Light green
|
| - |
|
444 |
} else if (status.indexOf('trying') >= 0) {
|
| - |
|
445 |
rowStyle = 'style="background-color: #fff3cd; color: #856404;"'; // Light yellow
|
| - |
|
446 |
} else if (status.indexOf('logged out') >= 0 || status.indexOf('logout') >= 0) {
|
| - |
|
447 |
rowStyle = 'style="background-color: #e2e3e5; color: #383d41;"'; // Light grey
|
| - |
|
448 |
} else if (status.indexOf('break') >= 0) {
|
| - |
|
449 |
rowStyle = 'style="background-color: #ffe5cc; color: #c45200;"'; // Light orange
|
| - |
|
450 |
} else {
|
| - |
|
451 |
rowStyle = 'style="background-color: #f8f9fa; color: #333;"'; // Default light
|
| - |
|
452 |
}
|
| 442 |
html += '<tr ' + rowStyle + '><td>' + (i + 1) + '</td><td colspan="4"><i class="fa fa-coffee"></i> ' + (data[i].breakStatus || 'On Break') + '</td><td>' + (data[i].callDuration || '-') + '</td><td>' + (data[i].callDateTime || '-') + '</td><td>-</td></tr>';
|
453 |
html += '<tr ' + rowStyle + '><td>' + (i + 1) + '</td><td colspan="4"><i class="fa fa-coffee"></i> ' + (data[i].breakStatus || 'On Break') + '</td><td>' + (data[i].callDuration || '-') + '</td><td>' + (data[i].callDateTime || '-') + '</td><td>-</td></tr>';
|
| 443 |
} else {
|
454 |
} else {
|
| 444 |
if (data[i].recordingUrl) {
|
455 |
if (data[i].recordingUrl) {
|
| 445 |
recordingHtml = '<audio controls style="width: 150px; height: 30px;"><source src="' + data[i].recordingUrl + '" type="audio/mpeg">Your browser does not support audio.</audio>';
|
456 |
recordingHtml = '<audio controls style="width: 150px; height: 30px;"><source src="' + data[i].recordingUrl + '" type="audio/mpeg">Your browser does not support audio.</audio>';
|
| 446 |
}
|
457 |
}
|
| Line 588... |
Line 599... |
| 588 |
var rowStyle = '';
|
599 |
var rowStyle = '';
|
| 589 |
var recordingHtml = '-';
|
600 |
var recordingHtml = '-';
|
| 590 |
|
601 |
|
| 591 |
// Check if this is a break log entry
|
602 |
// Check if this is a break log entry
|
| 592 |
if (data[i].breakLog) {
|
603 |
if (data[i].breakLog) {
|
| - |
|
604 |
var status = (data[i].breakStatus || '').toLowerCase();
|
| - |
|
605 |
if (status.indexOf('available') >= 0) {
|
| 593 |
rowStyle = 'style="background-color: #f8d7da; color: #721c24; font-weight: bold;"';
|
606 |
rowStyle = 'style="background-color: #d4edda; color: #155724;"'; // Light green
|
| - |
|
607 |
} else if (status.indexOf('trying') >= 0) {
|
| - |
|
608 |
rowStyle = 'style="background-color: #fff3cd; color: #856404;"'; // Light yellow
|
| - |
|
609 |
} else if (status.indexOf('logged out') >= 0 || status.indexOf('logout') >= 0) {
|
| - |
|
610 |
rowStyle = 'style="background-color: #e2e3e5; color: #383d41;"'; // Light grey
|
| - |
|
611 |
} else if (status.indexOf('break') >= 0) {
|
| - |
|
612 |
rowStyle = 'style="background-color: #ffe5cc; color: #c45200;"'; // Light orange
|
| - |
|
613 |
} else {
|
| - |
|
614 |
rowStyle = 'style="background-color: #f8f9fa; color: #333;"'; // Default light
|
| - |
|
615 |
}
|
| 594 |
html += '<tr ' + rowStyle + '><td>' + (i + 1) + '</td><td colspan="4"><i class="fa fa-coffee"></i> ' + (data[i].breakStatus || 'On Break') + '</td><td>' + (data[i].callDuration || '-') + '</td><td>' + (data[i].callDateTime || '-') + '</td><td>-</td></tr>';
|
616 |
html += '<tr ' + rowStyle + '><td>' + (i + 1) + '</td><td colspan="4"><i class="fa fa-coffee"></i> ' + (data[i].breakStatus || 'On Break') + '</td><td>' + (data[i].callDuration || '-') + '</td><td>' + (data[i].callDateTime || '-') + '</td><td>-</td></tr>';
|
| 595 |
} else {
|
617 |
} else {
|
| 596 |
if (data[i].recordingUrl) {
|
618 |
if (data[i].recordingUrl) {
|
| 597 |
recordingHtml = '<audio controls style="width: 150px; height: 30px;"><source src="' + data[i].recordingUrl + '" type="audio/mpeg">Your browser does not support audio.</audio>';
|
619 |
recordingHtml = '<audio controls style="width: 150px; height: 30px;"><source src="' + data[i].recordingUrl + '" type="audio/mpeg">Your browser does not support audio.</audio>';
|
| 598 |
}
|
620 |
}
|