| Line 256... |
Line 256... |
| 256 |
.then(function (response) {
|
256 |
.then(function (response) {
|
| 257 |
return response.json();
|
257 |
return response.json();
|
| 258 |
})
|
258 |
})
|
| 259 |
.then(function (data) {
|
259 |
.then(function (data) {
|
| 260 |
if (data && data.length > 0) {
|
260 |
if (data && data.length > 0) {
|
| 261 |
var html = '<table class="table table-bordered table-sm"><thead><tr><th>S.No</th><th style="width: 200px;">Party Name</th><th>Code</th><th style="width: 350px;>Remark</th><th>Remark Time</th><th>Call Status</th><th>Call Duration</th><th>Call Date/Time</th><th>Recording</th></tr></thead><tbody>';
|
261 |
var html = '<table class="table table-bordered table-sm"><thead><tr><th>S.No</th><th style="width: 200px;">Party Name</th><th>Code</th><th style="width: 350px;">Remark</th><th>Remark Time</th><th>Call Status</th><th>Call Duration</th><th>Call Date/Time</th><th>Recording</th></tr></thead><tbody>';
|
| 262 |
for (var i = 0; i < data.length; i++) {
|
262 |
for (var i = 0; i < data.length; i++) {
|
| 263 |
var recordingHtml = '-';
|
263 |
var recordingHtml = '-';
|
| 264 |
if (data[i].recordingUrl) {
|
264 |
if (data[i].recordingUrl) {
|
| 265 |
recordingHtml = '<audio controls style="width:150px;height:30px;"><source src="' + data[i].recordingUrl + '" type="audio/mpeg">Your browser does not support audio.</audio>';
|
265 |
recordingHtml = '<a href="' + data[i].recordingUrl + '" target="_blank" class="btn btn-sm btn-outline-primary">Play</a>';
|
| 266 |
}
|
266 |
}
|
| 267 |
html += '<tr><td>' + (i + 1) + '</td><td>' + data[i].partyName + '</td><td>' + data[i].code + '</td><td>' + data[i].remark + '- ' + (data[i].message || '-') + '</td><td>' + data[i].time + '</td><td>' + (data[i].callStatus || '-') + '</td><td>' + (data[i].callDuration || '-') + '</td><td>' + (data[i].callDateTime || '-') + '</td><td>' + recordingHtml + '</td></tr>';
|
267 |
html += '<tr><td>' + (i + 1) + '</td><td>' + data[i].partyName + '</td><td>' + data[i].code + '</td><td>' + data[i].remark + '- ' + (data[i].message || '-') + '</td><td>' + data[i].time + '</td><td>' + (data[i].callStatus || '-') + '</td><td>' + (data[i].callDuration || '-') + '</td><td>' + (data[i].callDateTime || '-') + '</td><td>' + recordingHtml + '</td></tr>';
|
| 268 |
}
|
268 |
}
|
| 269 |
html += '</tbody></table>';
|
269 |
html += '</tbody></table>';
|
| 270 |
document.getElementById('calledDetailsContent').innerHTML = html;
|
270 |
document.getElementById('calledDetailsContent').innerHTML = html;
|