Subversion Repositories SmartDukaan

Rev

Rev 35703 | Rev 35712 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35703 Rev 35711
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>Party Name</th><th>Code</th><th>Remark</th><th>Message</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>Party Name</th><th>Code</th><th>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 = '<audio controls style="width:150px;height:30px;"><source src="' + data[i].recordingUrl + '" type="audio/mpeg">Your browser does not support audio.</audio>';
266
                            }
266
                            }
267
                            html += '<tr><td>' + (i + 1) + '</td><td>' + data[i].partyName + '</td><td>' + data[i].code + '</td><td>' + data[i].remark + '</td><td>' + (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;
271
                    } else {
271
                    } else {
272
                        document.getElementById('calledDetailsContent').innerHTML = '<p>No called partners found.</p>';
272
                        document.getElementById('calledDetailsContent').innerHTML = '<p>No called partners found.</p>';