From dd5c5a90c8a4c27ddcdb526bf8003a0abca469d5 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 31 Mar 2020 13:39:31 -0600 Subject: [PATCH] Update call_center_agent_status.php --- app/call_centers/call_center_agent_status.php | 63 ++++++++++--------- 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/app/call_centers/call_center_agent_status.php b/app/call_centers/call_center_agent_status.php index ccebf8822c..5443987868 100644 --- a/app/call_centers/call_center_agent_status.php +++ b/app/call_centers/call_center_agent_status.php @@ -135,7 +135,7 @@ } //remove rows from the http post array where the status has not changed - if (count($_POST['agents']) > 0) { + if (count($_POST['agents']) > 0 && !$per_queue_login) { foreach($_POST['agents'] as $key => $row) { foreach($agents as $k => $field) { if ($field['agent_name'] === $row['agent_name'] && $field['agent_status'] === $row['agent_status']) { @@ -302,19 +302,22 @@ echo "
\n"; echo "\n"; - echo $text['description-call_center_agent_status']."\n"; - echo "

\n"; + if (count($_POST['agents']) > 0 && !$per_queue_login) { + echo $text['description-call_center_agent_status']."\n"; + echo "

\n"; + } echo "
\n"; echo "\n"; echo "\n"; echo " \n"; - echo " \n"; -// echo " \n"; + if (!$per_queue_login) { + echo " \n"; + } echo " \n"; if ($per_queue_login) { - echo " \n"; + echo " \n"; } echo "\n"; @@ -324,39 +327,41 @@ $onclick = "onclick=\"cycle('agents[".$x."][agent_status]');\""; $html = "\n"; $html .= " \n"; -// $html .= " \n"; - $html .= " \n"; + + if (!$per_queue_login) { + $html .= " \n"; + } $html .= " \n"; if ($per_queue_login) { $html .= "
".$text['label-agent']."".$text['label-status']."".$text['label-options']."".$text['label-status']." ".$text['label-queues']."".$text['label-options']."
".escape($row['agent_name'])." ".escape($row['agent_status'])." "; - $html .= " \n"; - $html .= " \n"; - $html .= " \n"; - $html .= " \n"; - $html .= " \n"; -// $html .= " \n"; - $html .= " "; + $html .= " \n"; + $html .= " \n"; + $html .= " \n"; + $html .= " \n"; + $html .= " \n"; + //$html .= " \n"; + $html .= "  "; if (is_array($row['queues'])) { - $html .= " \n"; -// $html .= " \n"; -// $html .= " \n"; -// $html .= " \n"; -// $html .= " \n"; -// $html .= " \n"; + $html .= "
".$text['label-queue']."".$text['label-status']."".$text['label-options']."
\n"; + $html .= " \n"; + $html .= " \n"; + $html .= " \n"; + $html .= " \n"; + $html .= " \n"; foreach ($row['queues'] as $queue) { $x++; $onclick = "onclick=\"cycle('agents[".$x."][agent_status]');\""; $html .= " \n"; $html .= " \n"; -// $html .= " \n"; + $html .= " \n"; $html .= "
".$text['label-queue']."".$text['label-status']."".$text['label-options']."
".$queue['queue_name']."\n"; -// if ($queue['queue_status'] == "Available") { -// $html .= " ".$text['option-available']."\n"; -// } -// if ($queue['queue_status'] == "Logged Out") { -// $html .= " ".$text['option-logged_out']."\n"; -// } -// $html .= " \n"; + if ($queue['queue_status'] == "Available") { + $html .= " ".$text['option-available']."\n"; + } + if ($queue['queue_status'] == "Logged Out") { + $html .= " ".$text['option-logged_out']."\n"; + } + $html .= " "; $html .= " \n"; $html .= " \n";