Merge branch 'main' into 'dev/anadir_ficheros_presu'

Main

See merge request jjimenez/safekat!262
This commit is contained in:
2024-06-05 09:47:04 +00:00
5 changed files with 62 additions and 21 deletions

View File

@ -19,11 +19,27 @@ class UserModel extends ShieldUserModel
];
}
/*protected $validationRules = [
"email" => [
"label" => "RolesPermisos.email",
"rules" => "required|max_length[150]",
protected $validationRules = [
"username" => [
"label" => "correo duplicado",
"rules" => "is_unique[users.username]",
]
];*/
];
public function getComerciales(){
$builder = $this->db
->table("users" . " t1")
->select(
"t1.id AS id, CONCAT(t1.first_name, ' ', t1.last_name) AS text"
);
$builder->where('t1.deleted_at', null);
$builder->where("t2.group", "comercial");
$builder->join("auth_groups_users t2", "t1.id = t2.user_id", "left");
return $builder->get()->getResult();
}
}