Subversion Repositories SmartDukaan

Rev

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

Rev 35731 Rev 35763
Line 275... Line 275...
275
                .then(function (response) {
275
                .then(function (response) {
276
                    return response.json();
276
                    return response.json();
277
                })
277
                })
278
                .then(function (data) {
278
                .then(function (data) {
279
                    if (data && data.length > 0) {
279
                    if (data && data.length > 0) {
280
                        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>';
280
                        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>Call Status</th><th>Call Duration</th><th>Call Date/Time</th><th>Recording</th></tr></thead><tbody>';
281
                        for (var i = 0; i < data.length; i++) {
281
                        for (var i = 0; i < data.length; i++) {
282
                            var recordingHtml = '-';
282
                            var recordingHtml = '-';
283
                            if (data[i].recordingUrl) {
283
                            if (data[i].recordingUrl) {
284
                                recordingHtml = '<audio controls style="width: 150px; height: 30px;"><source src="' + data[i].recordingUrl + '" type="audio/mpeg">Your browser does not support audio.</audio>';
284
                                recordingHtml = '<audio controls style="width: 150px; height: 30px;"><source src="' + data[i].recordingUrl + '" type="audio/mpeg">Your browser does not support audio.</audio>';
285
                            }
285
                            }
286
                            html += '<tr><td>' + (i + 1) + '</td><td>' + data[i].partyName + '</td><td>' + data[i].code + '</td><td>' + data[i].remark + '- &nbsp;' + (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>';
286
                            html += '<tr><td>' + (i + 1) + '</td><td>' + data[i].partyName + '</td><td>' + data[i].code + '</td><td>' + data[i].remark + '- &nbsp;' + (data[i].message || '-') + '</td><td>' + (data[i].callStatus || '-') + '</td><td>' + (data[i].callDuration || '-') + '</td><td>' + (data[i].callDateTime || '-') + '</td><td>' + recordingHtml + '</td></tr>';
287
                        }
287
                        }
288
                        html += '</tbody></table>';
288
                        html += '</tbody></table>';
289
                        document.getElementById('calledDetailsContent').innerHTML = html;
289
                        document.getElementById('calledDetailsContent').innerHTML = html;
290
                    } else {
290
                    } else {
291
                        document.getElementById('calledDetailsContent').innerHTML = '<p>No called partners found.</p>';
291
                        document.getElementById('calledDetailsContent').innerHTML = '<p>No called partners found.</p>';
Line 320... Line 320...
320
                .then(function (response) {
320
                .then(function (response) {
321
                    return response.json();
321
                    return response.json();
322
                })
322
                })
323
                .then(function (data) {
323
                .then(function (data) {
324
                    if (data && data.length > 0) {
324
                    if (data && data.length > 0) {
325
                        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>';
325
                        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>Call Status</th><th>Call Duration</th><th>Call Date/Time</th><th>Recording</th></tr></thead><tbody>';
326
                        for (var i = 0; i < data.length; i++) {
326
                        for (var i = 0; i < data.length; i++) {
327
                            var recordingHtml = '-';
327
                            var recordingHtml = '-';
328
                            if (data[i].recordingUrl) {
328
                            if (data[i].recordingUrl) {
329
                                recordingHtml = '<audio controls style="width: 150px; height: 30px;"><source src="' + data[i].recordingUrl + '" type="audio/mpeg">Your browser does not support audio.</audio>';
329
                                recordingHtml = '<audio controls style="width: 150px; height: 30px;"><source src="' + data[i].recordingUrl + '" type="audio/mpeg">Your browser does not support audio.</audio>';
330
                            }
330
                            }
331
                            html += '<tr><td>' + (i + 1) + '</td><td>' + data[i].partyName + '</td><td>' + data[i].code + '</td><td>' + data[i].remark + '- &nbsp;' + (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>';
331
                            html += '<tr><td>' + (i + 1) + '</td><td>' + data[i].partyName + '</td><td>' + data[i].code + '</td><td>' + data[i].remark + '- &nbsp;' + (data[i].message || '-') + '</td><td>' + (data[i].callStatus || '-') + '</td><td>' + (data[i].callDuration || '-') + '</td><td>' + (data[i].callDateTime || '-') + '</td><td>' + recordingHtml + '</td></tr>';
332
                        }
332
                        }
333
                        html += '</tbody></table>';
333
                        html += '</tbody></table>';
334
                        document.getElementById('calledDetailsContent').innerHTML = html;
334
                        document.getElementById('calledDetailsContent').innerHTML = html;
335
                    } else {
335
                    } else {
336
                        document.getElementById('calledDetailsContent').innerHTML = '<p>No called partners found for selected date.</p>';
336
                        document.getElementById('calledDetailsContent').innerHTML = '<p>No called partners found for selected date.</p>';