commentsUpload.blade.php
4.51 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<div class="layout-app"><!-- row-app -->
<div class="row row-app">
<div class="col-md-12">
<div class="col-separator col-separator-first col-unscrollable box">
<div class=innerAll>
<div style='clear:both;margin:2% 0 0 1%;border: 2px solid #F5F5F5;padding:2%;border-radius: 5px;'>
<div>
<h5>
<div class='col-md-1'>
<label class='pull-right'>PB Code:</label>
</div>
<div class='col-md-2'>
<select class='form-control' id=client_select onchange='clientSelect();'>
<option value>Select</option>
<?php foreach($client as $c){echo "<option value='$c'>$c</option>";} ?>
</select>
</div>
<div class='col-md-1'>
<label class='pull-right'>Cust ID:</label>
</div>
<div class='col-md-2'>
<select class='form-control' id=clientcode_select onchange='clientCodeSelect();'>
</select>
</div>
</h5>
</div>
<br><br><br>
<div class="row" id='question_list'>
</div>
<br>
<div>
<label>Supervisor Recommendation: </label>
<textarea id='sup_recommend' name='sup_recommend' style='width:40%' maxlength=250></textarea>
</div>
<div class='container'>
<input type=button id='save' class='btn btn-danger' value='Save' style=' margin: 5px 0 5px 660px;'>
</div>
</div>
<div style='clear:both;margin:2% 0 0 1%;border: 2px solid #F5F5F5;padding:2%;border-radius: 5px;'>
<center><h4>Message Announcement</center>
<br>
<select id='usrname' class=select2multi multiple="" style="width: 30%;">
<option value></option>
<?php foreach($username as $user){;echo "<option value='$user'>$user</option>";} ?>
</select>
<textarea id='supvisor_msg' name='sup_recommend' style='width:40%;margin-left: 5%' maxlength=250 rows="5" placeholder="Type message here..."></textarea>
<div class='container'>
<button type="button" class="btn btn-warning" id='send' style=' margin: 15px 0 5px 770px;'>
<span class="glyphicon glyphicon-send"></span> Send
</button>
</div>
</div>
<script>
function clientSelect()
{
doAjax("record?action=callclient","client="+$("#client_select").val(),"","ajax_dialer_list","singlefail","POST", function(retstr){
var ccObj = JSON.parse(retstr.responseText);
$('#clientcode_select').empty();
$('#question_list').empty();
$('#clientcode_select').append("<option value=''>Select</option>");
for(var i in ccObj){
$('#clientcode_select').append("<option value='"+ccObj[i]['clientcode']+"'>"+ccObj[i]['clientcode']+"</option>");
}
});
}
function clientCodeSelect()
{
doAjax("record?action=questionlist","clientcode="+$("#clientcode_select").val(),"","","","POST", function(retrstr){
var quesObj = JSON.parse(retrstr.responseText);
$('#question_list').empty();
for(var i in quesObj){
if(quesObj[i]['questions']&&quesObj[i]['questions']!='questions')
{
$('#question_list').append("<div class='panel panel-default'>"+quesObj[i]['questions']+"</div>");
}
}
});
}
$('#save').click(function()
{
var sup_recommend = $('#sup_recommend').val();
var clientcode = $('#clientcode_select').val();
if(sup_recommend&&(clientcode!=null))
{
var postdata='clientcode='+clientcode;
postdata+='&supvisor_recommends='+sup_recommend;
doAjax('record?action=saverecommend',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST',function(retrstr){
simpleNotification('Success','topRight',"Comments has been saved successfully!");
});
}
else
{
alert('Please select proper details');
}
});
$('#send').click(function()
{
var agents = $('#usrname').val();
var message = $('#supvisor_msg').val();
if(agents&&message)
{
var postdata='agents='+agents;
postdata+='&message='+message;
doAjax('SupervisorMessage',postdata,'','','singlethis','POST',function(retrstr){
simpleNotification('Success','topRight',"Message sent successfully!");
$("#usrname").select2("val", "Select...");
$('#supvisor_msg').val('');
});
}
else
{
alert("Please insert something");
}
});
</script>
</div>
</div>
</div>
</div>
</div>