campaignwise.blade.php
4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<style>#logtable.td{vertical-align:top;padding:20px;}#logtable.tr{height:28px;overflow-y:hidden;}
/*#logtable.table thead tr{
display:block;
}
#logtable.table tbody{
display:block;
height:500px;
overflow:auto;//set tbody to auto
}*/
</style>
<div class=innerAll>
<h4 style="float:left;width:50%;margin:10px 0;">Campaign Report </small></h4>
<div style="float:right;width:50%">
@if(Auth::user()->username=='admin')
<button class="pull-right btn btn-sm btn-default" onclick='dlAgentlogXls();return false;' title='Download'><i class='fa fa-download'></i> Download</button>
@endif
</div>
<div style="clear:both"></div>
<hr style="margin-bottom: 5px;">
<div>
Search <input id=filter name="filter" type="text" style="border:1px solid #efefef; padding: 2px 10px;">
Date: From <input size=10 id='modfrom' name='modfrom' type='text' value='<?php echo date("Y-m-d",$logdate); ?>' />
<select id="modtime" style="border:1px solid #efefef;">
<?php
foreach (range(0,23) as $hour) {
$selected = ($hour == $logtime) ? "selected" : "";
echo "<option value='$hour' $selected>".str_pad($hour, 2, "0", STR_PAD_LEFT) . ":00</option>";
}
?>
</select>
To <input size=10 id='modto' name='modto' type='text' value='<?php echo date("Y-m-d",$logdateto); ?>'/>
<select id="modtimeto" style="border:1px solid #efefef;">
<?php
foreach (range(0,23) as $hour) {
$selected = ($hour == $logtimeto) ? "selected" : "";
echo "<option value='$hour' $selected>".str_pad($hour, 2, "0", STR_PAD_LEFT) . ":00</option>";
}
?></select>
<input type="button" value='Submit' class="btn btn-xs btn-info">
</div>
<div style="clear:both"></div>
<hr style="margin:5px;">
<div style="overflow: auto; margin-top: 10px;">
<table id=logtable class='footable table table-striped table-bordered table-white table-primary footable-loaded' style='font-size:12px; margin:0; border:1px solid #BBB;'>
<thead>
<th>Campaign</th>
<th>Dials</th>
<th>Connects</th>
<th>Contacts</th>
<th>Callbacks</th>
<th>Sales</th>
<th>No Answer</th>
<th>Busy</th>
<th>Sit Tones</th>
<th>Abandoned</th>
<th>Connect %</th>
<th>No Answer %</th>
<th>Busy %</th>
<th>Sit Tones %</th>
<th>Abandoned %</th>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div id=dialoglog></div>
</div>
<script>
$(document).ready(function() {
if(!$('#dialoglog').hasClass('ui-dialog-content'))
{
$('#dialoglog').dialog({
autoOpen: false,
width: '70%',
buttons: {
"Ok": function() {
$(this).dialog("close");
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
}
waitKeyUpRun("filter",function() { filter2(document.getElementById('filter'), 'logTableData') },"2000");
$('#modfrom').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
$('#modto').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'});
});
function dataString()
{
return 'logdate='+$("#modfrom").val()+'&logtime='+$("#modtime").val()+'&logdateto='+$("#modto").val()+'&logtimeto='+$("#modtimeto").val()+'&campaign='+$("#campaign").val();
}
function statusLogReloadFun(sortby)
{
var sortstr='';if(sortby!="")sortstr="&sort="+sortby
var searchStr = dataString();
doAjax('dialer/campaignwise?'+searchStr+sortstr,'','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');
}
function dlAgentlogXls()
{
var searchStr = dataString();
//window.open('dialer/agenttime?dllogxls=1&'+searchStr);
return false;
}
</script>