Added new Callback Comments campaign option

git-svn-id: svn://192.168.202.10@2199 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2014-11-24 17:24:38 +00:00
parent 8c45446971
commit 2302cc4498
4 changed files with 46 additions and 13 deletions
+3 -2
View File
@@ -93,8 +93,9 @@ OTHER CHANGES:
15. Added campaign options to minimize QC audited comments without closing the
frame, allow for the comments field to appear under all agent screen
tabs and the dispo screen, allow for the audited comments to be
displayed with managers in red and with a date/time stamp.
tabs and the dispo screen and the callback date select screen, allow
for the audited comments to be displayed with managers in red and with
a date/time stamp.
+11 -4
View File
@@ -364,10 +364,11 @@
# 141111-0658 - Removed several AJAX text outputs from QXZ output
# 141118-1231 - Formatting changes for QXZ output
# 141123-0933 - Added dispo_comments option input
# 141124-1136 - Added cbcomment_comments option input
#
$version = '2.10-260';
$build = '141123-0933';
$version = '2.10-261';
$build = '141124-1136';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=597;
$one_mysql_log=0;
@@ -606,6 +607,8 @@ if (isset($_GET["cid_lock"])) {$cid_lock=$_GET["cid_lock"];}
elseif (isset($_POST["cid_lock"])) {$cid_lock=$_POST["cid_lock"];}
if (isset($_GET["dispo_comments"])) {$dispo_comments=$_GET["dispo_comments"];}
elseif (isset($_POST["dispo_comments"])) {$dispo_comments=$_POST["dispo_comments"];}
if (isset($_GET["cbcomment_comments"])) {$cbcomment_comments=$_GET["cbcomment_comments"];}
elseif (isset($_POST["cbcomment_comments"])) {$cbcomment_comments=$_POST["cbcomment_comments"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
@@ -8633,7 +8636,7 @@ if ($ACTION == 'updateDISPO')
}
else
{
$stmt = "SELECT dispo_call_url,queuemetrics_callstatus_override from vicidial_campaigns vc,vicidial_live_agents vla where vla.campaign_id=vc.campaign_id and vla.user='$user';";
$stmt = "SELECT dispo_call_url,queuemetrics_callstatus_override,comments_dispo_screen,comments_callback_screen from vicidial_campaigns vc,vicidial_live_agents vla where vla.campaign_id=vc.campaign_id and vla.user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00284',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -8643,6 +8646,8 @@ if ($ACTION == 'updateDISPO')
$row=mysqli_fetch_row($rslt);
$dispo_call_url = $row[0];
$queuemetrics_callstatus_override = $row[1];
$comments_dispo_screen = $row[2];
$comments_callback_screen = $row[3];
}
### reset the API fields in vicidial_live_agents record
@@ -8668,8 +8673,10 @@ if ($ACTION == 'updateDISPO')
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00285',$user,$server_ip,$session_name,$one_mysql_log);}
}
$commentsSQL='';
if (strlen($dispo_comments)>0)
if ( (strlen($dispo_comments)>0) and ( ($comments_dispo_screen == 'ENABLED') or ($comments_dispo_screen == 'REPLACE_CALL_NOTES') ) )
{$commentsSQL = ",comments='$dispo_comments'";}
if ( (strlen($cbcomment_comments)>0) and ( ($comments_callback_screen == 'ENABLED') or ($comments_callback_screen == 'REPLACE_CB_NOTES') ) )
{$commentsSQL = ",comments='$cbcomment_comments'";}
$stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' $commentsSQL where lead_id='$lead_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
+31 -6
View File
@@ -450,10 +450,11 @@
# 141118-1229 - Formatting changes for QXZ output
# 141118-1439 - Added agent_email as webform and script variable
# 141121-1005 - Added new QC and comments campaign options
# 141124-1144 - Added new Callback Comments campaign option
#
$version = '2.10-421c';
$build = '141121-1005';
$version = '2.10-422c';
$build = '141124-1144';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=80;
$one_mysql_log=0;
@@ -10788,6 +10789,19 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{
document.getElementById("CallBackOnlyMe").disabled = false;
}
if ( (comments_callback_screen == 'ENABLED') || (comments_callback_screen == 'REPLACE_CB_NOTES') )
{
var cb_comment_output = "<table cellspacing=4 cellpadding=0><tr><td align=\"right\"><font class=\"body_text\"><?php echo $label_comments ?>: <br><span id='cbviewcommentsdisplay'><input type='button' id='CBViewCommentButton' onClick=\"ViewComments('ON','','cb')\" value='-<?php _QXZ("History"); ?>-'/></span></font></td><td align=\"left\"><font class=\"body_text\">";
cb_comment_output = cb_comment_output + "<textarea name=\"cbcomment_comments\" id=\"cbcomment_comments\" rows=\"2\" cols=\"100\" class=\"cust_form_text\" value=\"\">" + document.vicidial_form.dispo_comments.value + "</textarea>\n";
cb_comment_output = cb_comment_output + "</td></tr></table>\n";
document.getElementById("CBCommentsContent").innerHTML = cb_comment_output;
}
else
{
document.getElementById("CBCommentsContent").innerHTML = "<input type=\"hidden\" name=\"cbcomment_comments\" id=\"cbcomment_comments\" value=\"" + document.vicidial_form.dispo_comments.value + "\" />";
}
showDiv('CallBackSelectBox');
}
else
@@ -10812,8 +10826,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&orig_pass=" + orig_pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&vtiger_callback_id=" + vtiger_callback_id + "&phone_number=" + document.vicidial_form.phone_number.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&dial_method" + dial_method + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&CallBackLeadStatus=" + CallBackLeadStatus + "&comments=" + encodeURIComponent(CallBackCommenTs) + "&custom_field_names=" + custom_field_names + "&call_notes=" + encodeURIComponent(document.vicidial_form.call_notes_dispo.value) + "&dispo_comments=" + encodeURIComponent(document.vicidial_form.dispo_comments.value) + "&qm_dispo_code=" + DispoQMcsCODE + "&email_enabled=" + email_enabled + "&recording_id=" + VDDCU_recording_id + "&recording_filename=" + VDDCU_recording_filename + "&called_count=" + document.vicidial_form.called_count.value;
{
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&orig_pass=" + orig_pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&vtiger_callback_id=" + vtiger_callback_id + "&phone_number=" + document.vicidial_form.phone_number.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&dial_method" + dial_method + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&CallBackLeadStatus=" + CallBackLeadStatus + "&comments=" + encodeURIComponent(CallBackCommenTs) + "&custom_field_names=" + custom_field_names + "&call_notes=" + encodeURIComponent(document.vicidial_form.call_notes_dispo.value) + "&dispo_comments=" + encodeURIComponent(document.vicidial_form.dispo_comments.value) + "&cbcomment_comments=" + encodeURIComponent(document.vicidial_form.cbcomment_comments.value) + "&qm_dispo_code=" + DispoQMcsCODE + "&email_enabled=" + email_enabled + "&recording_id=" + VDDCU_recording_id + "&recording_filename=" + VDDCU_recording_filename + "&called_count=" + document.vicidial_form.called_count.value;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(DSupdate_query);
@@ -10883,6 +10897,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
document.vicidial_form.call_notes.value ='';
document.vicidial_form.call_notes_dispo.value ='';
document.vicidial_form.dispo_comments.value ='';
document.vicidial_form.cbcomment_comments.value ='';
VDCL_group_id = '';
fronter = '';
inOUT = 'OUT';
@@ -14910,6 +14925,8 @@ function phone_number_format(formatphone) {
{document.getElementById("otherviewcommentsdisplay").innerHTML = "<input type=\"button\" id='OtherViewCommentButton' onClick=\"ViewComments('OFF')\" value='<?php echo _QXZ("HIDE"); ?>' />";}
if (VCspanname == 'dispo')
{document.getElementById("dispoviewcommentsdisplay").innerHTML = "<input type=\"button\" id='DispoViewCommentButton' onClick=\"ViewComments('OFF','','dispo')\" value='<?php echo _QXZ("HIDE"); ?>' />";}
if (VCspanname == 'cb')
{document.getElementById("cbviewcommentsdisplay").innerHTML = "<input type=\"button\" id='CBViewCommentButton' onClick=\"ViewComments('OFF','','cb')\" value='<?php echo _QXZ("HIDE"); ?>' />";}
}
else
{
@@ -14931,7 +14948,9 @@ function phone_number_format(formatphone) {
document.vicidial_form.OtherViewCommentButton.value = document.vicidial_form.audit_comments_button.value;
}
if (VCspanname == 'dispo')
{document.getElementById("dispoviewcommentsdisplay").innerHTML = "<input type=\"button\" id='DispoViewCommentButton' onClick=\"ViewComments('ON')\" value='0' />";}
{document.getElementById("dispoviewcommentsdisplay").innerHTML = "<input type=\"button\" id='DispoViewCommentButton' onClick=\"ViewComments('ON','','dispo')\" value='0' />";}
if (VCspanname == 'cb')
{document.getElementById("cbviewcommentsdisplay").innerHTML = "<input type=\"button\" id='CBViewCommentButton' onClick=\"ViewComments('ON','','cb')\" value='0' />";}
}
}
@@ -16077,8 +16096,14 @@ if ($agent_display_dialable_leads > 0)
<?php
if ($agentonly_callbacks)
{echo "<input type=\"checkbox\" name=\"CallBackOnlyMe\" id=\"CallBackOnlyMe\" size=\"1\" value=\"0\" /> MY CALLBACK ONLY <br />";}
if ($comments_callback_screen != 'REPLACE_CB_NOTES')
{echo _QXZ("CB Comments:")." <input type=\"text\" name=\"CallBackCommenTsField\" id=\"CallBackCommenTsField\" size=\"50\" maxlength=\"255\" /><br /><br />\n";}
else
{echo "<input type=\"hidden\" name=\"CallBackCommenTsField\" id=\"CallBackCommenTsField\" value=\"\" /><br />\n";}
echo "<span id=\"CBCommentsContent\"><input type=\"hidden\" name=\"cbcomment_comments\" id=\"cbcomment_comments\" value=\"\" /></span><br />\n";
?>
<?php echo _QXZ("CB Comments:"); ?> <input type="text" name="CallBackCommenTsField" id="CallBackCommenTsField" size="50" maxlength="255" /><br /><br />
<a href="#" onclick="CallBackDatE_submit();return false;"><?php echo _QXZ("SUBMIT"); ?></a><br /><br />
<span id="CallBackDateContent"><?php echo "$CCAL_OUT" ?></span>
+1 -1
View File
@@ -1231,7 +1231,7 @@ if ($SSoutbound_autodial_active > 0)
<BR>
<A NAME="campaigns-comments_callback_screen">
<BR>
<B>Comments Callback Screen -</B> --THIS FEATURE IS CURRENTLY NON-FUNCTIONAL-- Setting this option to ENABLED will display the Comments field at the top of the callback scheduling screen. If the REPLACE_CB_NOTES option is selected, then the Comments field will replace the Callback Notes field on the callback scheduling screen. Default is DISABLED.
<B>Comments Callback Screen -</B> Setting this option to ENABLED will display the Comments field at the top of the callback scheduling screen. If the REPLACE_CB_NOTES option is selected, then the Comments field will replace the Callback Notes field on the callback scheduling screen. Default is DISABLED.
<BR>
<A NAME="campaigns-qc_comment_history">