Next contact fixes

This commit is contained in:
fbsanchez 2019-06-03 13:11:00 +02:00
parent 13086b596c
commit 551a21ed86
1 changed files with 6 additions and 1 deletions

View File

@ -75,11 +75,16 @@ if (is_ajax()) {
);
$progress = agents_get_next_contact($id_agente);
$last_contact = ($d['intervalo'] * (100 - $progress) / 100);
if ($progress < 0 || $progress > 100) {
$progress = 100;
}
echo json_encode(
[
'progress' => $progress,
'last_contact' => ($d['intervalo'] * (100 - $progress) / 100),
'last_contact' => $last_contact,
]
);
}