mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
omnishell multiselect
This commit is contained in:
parent
990ad339d3
commit
e561b1f906
@ -132,6 +132,32 @@ function agents_get_agent_id_by_alias($alias)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return seconds left to contact again with agent.
|
||||||
|
*
|
||||||
|
* @param integer $id_agente Target agent
|
||||||
|
*
|
||||||
|
* @return integer|null Seconds left.
|
||||||
|
*/
|
||||||
|
function agents_get_next_contact_time_left(int $id_agente)
|
||||||
|
{
|
||||||
|
$last_contact = false;
|
||||||
|
|
||||||
|
if ($id_agente > 0) {
|
||||||
|
$last_contact = db_get_value_sql(
|
||||||
|
sprintf(
|
||||||
|
'SELECT format(intervalo,2) - (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(IF(ultimo_contacto > ultimo_contacto_remoto, ultimo_contacto, ultimo_contacto_remoto))) as "val"
|
||||||
|
FROM `tagente`
|
||||||
|
WHERE id_agente = %d ',
|
||||||
|
$id_agente
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $last_contact;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an agent.
|
* Creates an agent.
|
||||||
*
|
*
|
||||||
|
@ -25,6 +25,32 @@
|
|||||||
height: 100px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.element-target-big:hover {
|
||||||
|
box-shadow: 0 0 10px -5px #424242;
|
||||||
|
}
|
||||||
|
|
||||||
|
.element-target-big:before {
|
||||||
|
content: attr(data-label);
|
||||||
|
position: relative;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
color: #373737;
|
||||||
|
font-weight: bolder;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
font-size: 1.8em;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
overflow: hidden;
|
||||||
|
font-family: "lato-bolder", "Open Sans", sans-serif;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container-target a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
.status-normal {
|
.status-normal {
|
||||||
background-color: #add570;
|
background-color: #add570;
|
||||||
}
|
}
|
||||||
@ -156,6 +182,12 @@ ul.wizard {
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-class.action-buttons.mw120px.textright.sorting_disabled,
|
||||||
|
.textright {
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Discovery css global
|
* Discovery css global
|
||||||
*/
|
*/
|
||||||
|
@ -68,14 +68,7 @@ if (is_ajax()) {
|
|||||||
if ($refresh_contact) {
|
if ($refresh_contact) {
|
||||||
$id_agente = get_parameter('id_agente', 0);
|
$id_agente = get_parameter('id_agente', 0);
|
||||||
if ($id_agente > 0) {
|
if ($id_agente > 0) {
|
||||||
$last_contact = db_get_value_sql(
|
$last_contact = agents_get_next_contact_time_left($id_agente);
|
||||||
sprintf(
|
|
||||||
'SELECT format(intervalo,2) - (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(IF(ultimo_contacto > ultimo_contacto_remoto, ultimo_contacto, ultimo_contacto_remoto))) as "val"
|
|
||||||
FROM `tagente`
|
|
||||||
WHERE id_agente = %d ',
|
|
||||||
$id_agente
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
$progress = agents_get_next_contact($id_agente);
|
$progress = agents_get_next_contact($id_agente);
|
||||||
if ($progress < 0 || $progress > 100) {
|
if ($progress < 0 || $progress > 100) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user