Show the time since last agent call

This commit is contained in:
FusionPBX 2023-12-14 17:11:08 -07:00 committed by GitHub
parent eee9006c1f
commit 7a0aa3c4e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 8 deletions

View File

@ -425,6 +425,31 @@ $text['label-strategy']['zh-cn'] = "战略";
$text['label-strategy']['ja-jp'] = "ストラテジー";
$text['label-strategy']['ko-kr'] = "전략";
$text['label-last_bridge_end']['en-us'] = "Last Call";
$text['label-last_bridge_end']['en-gb'] = "Last Call";
$text['label-last_bridge_end']['ar-eg'] = "";
$text['label-last_bridge_end']['de-at'] = "";
$text['label-last_bridge_end']['de-ch'] = "";
$text['label-last_bridge_end']['de-de'] = "";
$text['label-last_bridge_end']['el-gr'] = "";
$text['label-last_bridge_end']['es-cl'] = "";
$text['label-last_bridge_end']['es-mx'] = "";
$text['label-last_bridge_end']['fr-ca'] = "";
$text['label-last_bridge_end']['fr-fr'] = "";
$text['label-last_bridge_end']['he-il'] = "";
$text['label-last_bridge_end']['it-it'] = "";
$text['label-last_bridge_end']['nl-nl'] = "";
$text['label-last_bridge_end']['pl-pl'] = "";
$text['label-last_bridge_end']['pt-br'] = "";
$text['label-last_bridge_end']['pt-pt'] = "";
$text['label-last_bridge_end']['ro-ro'] = "";
$text['label-last_bridge_end']['ru-ru'] = "";
$text['label-last_bridge_end']['sv-se'] = "";
$text['label-last_bridge_end']['uk-ua'] = "";
$text['label-last_bridge_end']['zh-cn'] = "";
$text['label-last_bridge_end']['ja-jp'] = "";
$text['label-last_bridge_end']['ko-kr'] = "";
$text['label-status_change']['en-us'] = "Status Change";
$text['label-status_change']['en-gb'] = "Status Change";
$text['label-status_change']['ar-eg'] = "تغيير الوضع";

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2021
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -160,6 +160,7 @@
echo "<th title=\"".$text['description-status']."\">".$text['label-status']."</th>\n";
echo "<th title=\"".$text['description-state']."\">".$text['label-state']."</th>\n";
echo "<th>".$text['label-status_change']."</th>\n";
echo "<th>".$text['label-last_bridge_end']."</th>\n";
echo "<th class='center'>".$text['label-missed']."</th>\n";
echo "<th class='center'>".$text['label-answered']."</th>\n";
echo "<th>".$text['label-tier_state']."</th>\n";
@ -218,13 +219,9 @@
$talk_time = $agent_row['talk_time'];
$ready_time = $agent_row['ready_time'];
$last_status_change_seconds = time() - $last_status_change;
$last_status_change_length_hour = floor($last_status_change_seconds/3600);
$last_status_change_length_min = floor($last_status_change_seconds/60 - ($last_status_change_length_hour * 60));
$last_status_change_length_sec = $last_status_change_seconds - (($last_status_change_length_hour * 3600) + ($last_status_change_length_min * 60));
$last_status_change_length_min = sprintf("%02d", $last_status_change_length_min);
$last_status_change_length_sec = sprintf("%02d", $last_status_change_length_sec);
$last_status_change_length = $last_status_change_length_hour.':'.$last_status_change_length_min.':'.$last_status_change_length_sec;
//format the seconds to hh:mm:ss
$last_status_change_length = format_seconds(time() - $last_status_change);
$last_bridge_end_length = format_seconds(time() - $last_bridge_end);
if (permission_exists('call_center_agent_edit')) {
$list_row_url = "../call_centers/call_center_agent_edit.php?id=".$agent_uuid;
@ -243,6 +240,7 @@
echo "<td>".escape($status)."</td>\n";
echo "<td>".escape($state)."</td>\n";
echo "<td>".escape($last_status_change_length)."</td>\n";
echo "<td>".escape($last_bridge_end_length)."</td>\n";
echo "<td class='center'>".escape($no_answer_count)."</td>\n";
echo "<td class='center'>".escape($calls_answered)."</td>\n";
echo "<td>".escape($tier_state)."</td>\n";