From 2302cc449846dca587e3dc80cff062e4c186cef6 Mon Sep 17 00:00:00 2001 From: mattf Date: Mon, 24 Nov 2014 17:24:38 +0000 Subject: [PATCH] Added new Callback Comments campaign option git-svn-id: svn://192.168.202.10@2199 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/UPGRADE | 5 ++-- agc_2-X/trunk/www/agc/vdc_db_query.php | 15 ++++++++--- agc_2-X/trunk/www/agc/vicidial.php | 37 +++++++++++++++++++++----- agc_2-X/trunk/www/vicidial/help.php | 2 +- 4 files changed, 46 insertions(+), 13 deletions(-) diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index f093a63e..a2e745ce 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -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. diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index 20ec91d8..de9883a1 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -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";} $rslt=mysql_to_mysqli($stmt, $link); diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 5c8fb352..7a5a28b3 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -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 = "
:
"; + cb_comment_output = cb_comment_output + "\n"; + cb_comment_output = cb_comment_output + "
\n"; + document.getElementById("CBCommentsContent").innerHTML = cb_comment_output; + } + else + { + document.getElementById("CBCommentsContent").innerHTML = ""; + } + 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 = "";} if (VCspanname == 'dispo') {document.getElementById("dispoviewcommentsdisplay").innerHTML = "";} + if (VCspanname == 'cb') + {document.getElementById("cbviewcommentsdisplay").innerHTML = "";} } 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 = "";} + {document.getElementById("dispoviewcommentsdisplay").innerHTML = "";} + if (VCspanname == 'cb') + {document.getElementById("cbviewcommentsdisplay").innerHTML = "";} } } @@ -16077,8 +16096,14 @@ if ($agent_display_dialable_leads > 0) MY CALLBACK ONLY
";} + + if ($comments_callback_screen != 'REPLACE_CB_NOTES') + {echo _QXZ("CB Comments:")."

\n";} + else + {echo "
\n";} + + echo "
\n"; ?> -



diff --git a/agc_2-X/trunk/www/vicidial/help.php b/agc_2-X/trunk/www/vicidial/help.php index 00c91b4d..0fdf2f0e 100644 --- a/agc_2-X/trunk/www/vicidial/help.php +++ b/agc_2-X/trunk/www/vicidial/help.php @@ -1231,7 +1231,7 @@ if ($SSoutbound_autodial_active > 0)

-Comments Callback Screen - --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. +Comments Callback Screen - 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.