From f1d363403f31e446f555209ce91f294151350590 Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 17 Sep 2020 03:34:45 +0000 Subject: [PATCH] Added the ability to modify the status of any call or agent log in the Admin Modify Lead page. Must use new 'Modify Leads' options to enable for a user. git-svn-id: svn://192.168.202.10@3296 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/UPGRADE | 4 + agc_2-X/trunk/www/vicidial/admin.php | 7 +- .../trunk/www/vicidial/admin_modify_lead.php | 406 +++++++++++++++--- .../trunk/www/vicidial/help_documentation.txt | 4 +- agc_2-X/trunk/www/vicidial/qc_api.php | 2 +- 5 files changed, 368 insertions(+), 55 deletions(-) diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index a02a165d..428cc25b 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -530,6 +530,10 @@ OTHER CHANGES: 149. Added Screen Colors option to set the submit button color on the admin screens and reports. +150. Added the ability to modify the status of any call or agent log in the + Admin Modify Lead page. Must use new 'Modify Leads' options to enable + for a user. + diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 11a8b24e..740fcc31 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -4708,12 +4708,13 @@ else # 200816-0912 - Removed the ability to delete the 'default' DID entry # 200912-1649 - Added more get_call_launch PREVIEW_ options # 200913-0820 - Added UNSELECTED options for campaign alt_number_dialing +# 200916-0922 - Added more modify_leads options for users(modify log statuses) # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time -$admin_version = '2.14-768a'; -$build = '200913-0820'; +$admin_version = '2.14-769a'; +$build = '200916-0922'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -22803,7 +22804,7 @@ if ($ADD==3) echo ""._QXZ("Modify Lists").": $NWB#users-modify_sections$NWE\n"; echo ""._QXZ("Delete Lists").": $NWB#users-delete_lists$NWE\n"; echo ""._QXZ("Load Leads").": $NWB#users-load_leads$NWE\n"; - echo ""._QXZ("Modify Leads").": $NWB#users-modify_leads$NWE\n"; + echo ""._QXZ("Modify Leads").": $NWB#users-modify_leads$NWE\n"; echo ""._QXZ("GDPR-Compliant Export Delete Leads").": \n"; + $messagesHTML .= _QXZ("information modified")."

\n"; + $messagesHTML .= ""._QXZ("Go back to the lead modification page")."

\n"; + $messagesHTML .= "
\n"; if ( ($dispo != $status) and ($dispo == 'CBHOLD') ) { @@ -1224,7 +1466,7 @@ if ($end_call > 0) if ($DB) {echo "|$stmtB|\n";} $rslt=mysql_to_mysqli($stmtB, $link); - echo "
"._QXZ("vicidial_callback record inactivated").": $lead_id
\n"; + $messagesHTML .= "
"._QXZ("vicidial_callback record inactivated").": $lead_id
\n"; } if ( ($dispo != $status) and ( ($dispo == 'CALLBK') or ($scheduled_callback == 'Y') ) ) { @@ -1233,7 +1475,7 @@ if ($end_call > 0) if ($DB) {echo "|$stmtC|\n";} $rslt=mysql_to_mysqli($stmtC, $link); - echo "
"._QXZ("vicidial_callback record inactivated").": $lead_id
\n"; + $messagesHTML .= "
"._QXZ("vicidial_callback record inactivated").": $lead_id
\n"; } if ( ($dispo != $status) and ($status == 'CBHOLD') ) @@ -1271,7 +1513,7 @@ if ($end_call > 0) if ($DB) {echo "|$stmtE|\n";} $rslt=mysql_to_mysqli($stmtE, $link); - echo "
"._QXZ("Scheduled Callback added").": $lead_id - $phone_number
\n"; + $messagesHTML .= "
"._QXZ("Scheduled Callback added").": $lead_id - $phone_number
\n"; } } @@ -1283,7 +1525,7 @@ if ($end_call > 0) if ($DB) {echo "|$stmtF|\n";} $rslt=mysql_to_mysqli($stmtF, $link); - echo "
"._QXZ("Lead added to DNC List").": $lead_id - $phone_number
\n"; + $messagesHTML .= "
"._QXZ("Lead added to DNC List").": $lead_id - $phone_number
\n"; } ### update last record in vicidial_log table if (($dispo != $status) and ($modify_logs > 0)) @@ -1329,7 +1571,7 @@ if ($end_call > 0) } else { - echo _QXZ("you do not have permission to modify this lead")." $lead_id       $list_id       $NOW_TIME\n

\n"; + $messagesHTML .= _QXZ("you do not have permission to modify this lead")." $lead_id       $list_id       $NOW_TIME\n

\n"; } } else @@ -1341,7 +1583,7 @@ else if ($DB) {echo "|$stmtK|\n";} $rslt=mysql_to_mysqli($stmtK, $link); - echo "
"._QXZ("vicidial_callback record changed to ANYONE")."
\n"; + $messagesHTML .= "
"._QXZ("vicidial_callback record changed to ANYONE")."
\n"; } if ($CBchangeANYtoUSER == 'YES') { @@ -1350,7 +1592,7 @@ else if ($DB) {echo "|$stmtM|\n";} $rslt=mysql_to_mysqli($stmtM, $link); - echo "
"._QXZ("vicidial_callback record changed to USERONLY, user").": $CBuser
\n"; + $messagesHTML .= "
"._QXZ("vicidial_callback record changed to USERONLY, user").": $CBuser
\n"; } if ($CBchangeDATE == 'YES') @@ -1362,7 +1604,7 @@ else if ($DB) {echo "|$stmtN|\n";} $rslt=mysql_to_mysqli($stmtN, $link); - echo "
"._QXZ("vicidial_callback record changed to")." $appointment_date $appointment_time $CBstatus
\n"; + $messagesHTML .= "
"._QXZ("vicidial_callback record changed to")." $appointment_date $appointment_time $CBstatus
\n"; } if ( (strlen($stmtK)>10) or (strlen($stmtL)>10) or (strlen($stmtM)>10) or (strlen($stmtN)>10) ) @@ -1430,12 +1672,13 @@ else $u=0; $call_log = ''; $log_campaign = ''; + $HTML_inline_script = ''; while ($logs_to_print > $u) { $row=mysqli_fetch_row($rslt); if (strlen($log_campaign)<1) {$log_campaign = $row[3];} if (preg_match("/1$|3$|5$|7$|9$/i", $u)) - {$bgcolor="bgcolor=\"#$SSstd_row2_background\"";} + {$bgcolor="bgcolor=\"#$SSstd_row2_background\"";} else {$bgcolor="bgcolor=\"#$SSstd_row1_background\"";} @@ -1444,7 +1687,13 @@ else $call_log .= "$u"; $call_log .= "$row[4]"; $call_log .= " $row[7]\n"; - $call_log .= " $row[8]\n"; + if ( ($LOGmodify_leads == '3') or ($LOGmodify_leads == '4') ) + { + $call_log .= "$row[8]\n"; + $HTML_inline_script .= "vicidial_log_mod[$u] = \"Call Date: $row[4]
Lead ID: $row[1]
Current Status: $row[8]
\";\n"; + } + else + {$call_log .= " $row[8]\n";} $call_log .= " $row[11] \n"; $call_log .= " $row[3] \n"; $call_log .= " $row[2] \n"; @@ -1542,7 +1791,13 @@ else $agent_log .= " $row[9] \n"; $agent_log .= " $row[11] \n"; $agent_log .= " $row[13] \n"; - $agent_log .= "   $row[14] \n"; + if ( ($LOGmodify_leads == '3') or ($LOGmodify_leads == '4') ) + { + $agent_log .= "   $row[14]\n"; + $HTML_inline_script .= "vicidial_agent_log_mod[$y] = \"Event Date: $row[3]
Lead ID: $row[4]
Current Status: $row[14]
\";\n"; + } + else + {$agent_log .= " $row[14]\n";} $agent_log .= "   $row[15] \n"; $agent_log .= "   $row[17] \n"; @@ -1572,7 +1827,13 @@ else $closer_log .= "$y"; $closer_log .= "$row[4]"; $closer_log .= " $row[7]\n"; - $closer_log .= " $row[8]\n"; + if ( ($LOGmodify_leads == '3') or ($LOGmodify_leads == '4') ) + { + $closer_log .= "$row[8]\n"; + $HTML_inline_script .= "vicidial_closer_log_mod[$y] = \"Call Date: $row[4]
Lead ID: $row[1]
Current Status: $row[8]
\";\n"; + } + else + {$closer_log .= " $row[8]\n";} $closer_log .= " $row[11] \n"; $closer_log .= " $row[3] \n"; $closer_log .= " $row[2] \n"; @@ -1625,7 +1886,13 @@ else $call_log .= "$u"; $call_log .= "$row[4]"; $call_log .= " $row[7]\n"; - $call_log .= " $row[8]\n"; + if ( ($LOGmodify_leads == '3') or ($LOGmodify_leads == '4') ) + { + $call_log .= "$row[8]\n"; + $HTML_inline_script .= "vicidial_log_archive_mod[$u] = \"Call Date: $row[4]
Lead ID: $row[1]
Current Status: $row[8]
\";\n"; + } + else + {$call_log .= " $row[8]\n";} $call_log .= " $row[11] \n"; $call_log .= " $row[3] \n"; $call_log .= " $row[2] \n"; @@ -1711,7 +1978,13 @@ else $agent_log .= " $row[9] \n"; $agent_log .= " $row[11] \n"; $agent_log .= " $row[13] \n"; - $agent_log .= "   $row[14] \n"; + if ( ($LOGmodify_leads == '3') or ($LOGmodify_leads == '4') ) + { + $agent_log .= "   $row[14]\n"; + $HTML_inline_script .= "vicidial_agent_log_archive_mod[$y] = \"Event Date: $row[3]
Lead ID: $row[4]
Current Status: $row[14]
\";\n"; + } + else + {$agent_log .= " $row[14]\n";} $agent_log .= "   $row[15] \n"; $agent_log .= "   $row[17] \n"; @@ -1741,7 +2014,13 @@ else $closer_log .= "$y"; $closer_log .= "$row[4]"; $closer_log .= " $row[7]\n"; - $closer_log .= " $row[8]\n"; + if ( ($LOGmodify_leads == '3') or ($LOGmodify_leads == '4') ) + { + $closer_log .= "$row[8]\n"; + $HTML_inline_script .= "vicidial_closer_log_archive_mod[$y] = \"Call Date: $row[4]
Lead ID: $row[1]
Current Status: $row[8]
\";\n"; + } + else + {$closer_log .= " $row[8]\n";} $closer_log .= " $row[11] \n"; $closer_log .= " $row[3] \n"; $closer_log .= " $row[2] \n"; @@ -1888,6 +2167,27 @@ else $list_id=$select_list; } + if (strlen($HTML_inline_script) > 0) + { + echo "$HTML_inline_script\n"; + } + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + echo "
\n"; + echo "
\n"; + + $short_header=1; + + require("admin_header.php"); + + echo "
\n"; + echo "$messagesHTML\n"; + + if ($lead_id == 'NEW') {echo "
"._QXZ("Add A New Lead")."\n";} else @@ -1979,7 +2279,7 @@ else echo ""._QXZ("Country")." :   \n"; echo " "._QXZ("Date of Birth").": \n"; - if ( ($LOGmodify_leads == '1') or ($lead_id == 'NEW') ) + if ( ($LOGmodify_leads == '1') or ($LOGmodify_leads == '3') or ($lead_id == 'NEW') ) { echo "$label_phone_number : \n"; echo "$label_phone_code : \n"; @@ -2078,6 +2378,7 @@ else $stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses $selectableSQL order by status"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); + $statuses_listMODLOG=''; $statuses_list=''; $o=0; @@ -2089,6 +2390,7 @@ else {$statuses_list .= "\n"; $DS++;} else {$statuses_list .= "\n";} + $statuses_listMODLOG .= ""; $o++; } @@ -2105,6 +2407,7 @@ else {$statuses_list .= "\n"; $DS++;} else {$statuses_list .= "\n";} + $statuses_listMODLOG .= ""; if ($rowx[0] == 'CBHOLD') {$CBhold_set++;} $o++; } @@ -2124,6 +2427,7 @@ else {$statuses_list .= "\n"; $DS++;} else {$statuses_list .= "\n";} + $statuses_listMODLOG .= ""; if ($rowx[0] == 'CBHOLD') {$CBhold_set++;} $o++; } @@ -2153,6 +2457,10 @@ else { echo "\n"; } + + if ( ($LOGmodify_leads == '3') or ($LOGmodify_leads == '4') ) + {echo "$statuses_listMODLOG\n";} + echo "\n"; echo "


\n"; diff --git a/agc_2-X/trunk/www/vicidial/help_documentation.txt b/agc_2-X/trunk/www/vicidial/help_documentation.txt index 28e377e8..9654963b 100644 --- a/agc_2-X/trunk/www/vicidial/help_documentation.txt +++ b/agc_2-X/trunk/www/vicidial/help_documentation.txt @@ -1,4 +1,4 @@ -# version: 202000913082001 +# version: 202000916092201 users-user User ID This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length. users-pass Password This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters. users-force_change_password Force Change Password If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage. Default is N. @@ -71,7 +71,7 @@ users-modify_servers Modify Servers This setting will allow access for the users-modify_statuses Modify Statuses This setting will allow access for the user to modify the following sections - system statuses, status groups, status categories, CID groups and VM message groups. users-ast_delete_phones AGC Delete Phones This option if set to 1 allows the user to delete phone entries in the astGUIclient admin pages. users-delete_scripts Delete Scripts This option if set to 1 allows the user to delete Campaign scripts in the script modification screen. -users-modify_leads Modify Leads This option if set to 1 allows the user to modify leads in the admin section lead search results page. If this option is set to 2, the admin user can modify all lead fields except for the phone number and alt number fields. +users-modify_leads Modify Leads This option if set to 1 or 3 allows the user to modify leads in the admin section lead search results page. If this option is set to 2 or 4, the admin user can modify all lead fields except for the phone number and alt number fields. This option if set to 3 or 4 allows the user to modify the log statuses of the logs shown in the modify lead admin screen. users-export_gdpr_leads GDPR-Compliant Export Delete Leads This setting if enabled will allow for the complete download and/or deletion of all customer data for a particular lead, in compliance with the General Data Protection Regulation (GDPR). Default is 0 for disabled. A setting of 1 will enable downloading data, and a setting of 2 will enable not just downloading, but also deletion of data, including any recordings.
You are not allowed to set this user setting higher than the current system setting. users-modify_email_accounts Modify Email Accounts This option if set to 1 allows the user to modify email accounts in the email account management page. users-change_agent_campaign Change Agent Campaign This option if set to 1 allows the user to alter the campaign that an agent is logged into while they are logged into it. diff --git a/agc_2-X/trunk/www/vicidial/qc_api.php b/agc_2-X/trunk/www/vicidial/qc_api.php index e1803e09..bf1707a5 100644 --- a/agc_2-X/trunk/www/vicidial/qc_api.php +++ b/agc_2-X/trunk/www/vicidial/qc_api.php @@ -423,7 +423,7 @@ if ($function == 'external_dial_lead') } if ($agent_ready > 0) { - $stmt = "select count(*) from vicidial_users where user='$agent_user' and agentcall_manual='1';"; + $stmt = "select count(*) from vicidial_users where user='$agent_user' and agentcall_manual>='1';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt);