Add agent state to indicate wrap up time

This commit is contained in:
FusionPBX 2024-10-07 11:39:28 -06:00 committed by GitHub
parent b9a0cdf4e7
commit 7ecfe96381
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 5 deletions

View File

@ -221,9 +221,18 @@
$talk_time = $agent_row['talk_time'];
$ready_time = $agent_row['ready_time'];
//calcudate the length since status change and bridge end
$last_status_change_length = time() - $last_status_change;
$last_bridge_end_length = time() - $last_bridge_end;
//set the state to wrap up time
if ($last_bridge_end_length < $wrap_up_time) {
$state = 'Wrap Up Time';
}
//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);
$last_status_change_length_formatted = format_seconds($last_status_change_length);
$last_bridge_end_length_formatted = format_seconds($last_bridge_end_length);
if (permission_exists('call_center_agent_edit')) {
$list_row_url = "../call_centers/call_center_agent_edit.php?id=".$agent_uuid;
@ -241,8 +250,8 @@
echo "<td>".escape($agent_extension)."</td>\n";
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>".escape($last_status_change_length_formatted)."</td>\n";
echo "<td>".escape($last_bridge_end_length_formatted)."</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";
@ -389,4 +398,4 @@
}
?>
?>