|
|
|
@ -103,6 +103,18 @@ class SupervisorModel extends Model
|
|
|
|
|
return $this->read($this->query, $data)->fetchAll(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function findAllAgentesPBX($queue = null) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
$data = []; |
|
|
|
|
$this->query = "SELECT * FROM pbx_supervisor_agentes WHERE 1=1 "; |
|
|
|
|
if ($queue) { |
|
|
|
|
$this->query .= " AND fila = :queue "; |
|
|
|
|
$data['queue'] = $queue; |
|
|
|
|
} |
|
|
|
|
return $this->read($this->query, $data)->fetchAll(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function findByAgent($matricula) |
|
|
|
|
{ |
|
|
|
|
$this->query = "SELECT * FROM " . self::USUARIOS . " WHERE matricula = :matricula;"; |
|
|
|
@ -322,10 +334,10 @@ class SupervisorModel extends Model
|
|
|
|
|
return $this->update($this->query, $data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function deleteAgent($matricula) |
|
|
|
|
public function deleteAgentPbx($matricula) |
|
|
|
|
{ |
|
|
|
|
$data = []; |
|
|
|
|
$this->query = "DELETE FROM " . self::SUPERVISOR_AGENTE . " WHERE matricula = :matricula"; |
|
|
|
|
$this->query = "DELETE FROM pbx_supervisor_agentes WHERE matricula = :matricula"; |
|
|
|
|
$data['matricula'] = $matricula; |
|
|
|
|
return $this->delete($this->query, $data); |
|
|
|
|
} |
|
|
|
|