This commit is contained in:
2021-08-16 22:13:08 -04:00
parent 740de41139
commit 49374254e4
24 changed files with 466 additions and 58 deletions

View File

@ -70,11 +70,19 @@ class Operador extends Agente {
$output = [
'input' => $data,
'operador' => $operador->as_array(),
'new' => $found,
'new' => !$found,
'created' => $created
];
return $output;
}
public function addProyecto($data) {
$data['agente'] = $this->findAgenteTipo('operador')->id;
$pa = ProyectoAgente::add($data);
return [
'operador' => $this->as_array(),
'proyecto_agente' => $pa
];
}
public function as_array() {
$arr = parent::as_array();