falta update servicios

This commit is contained in:
2025-01-12 21:47:39 +01:00
parent f93251b7bf
commit c6d1d06d8a
24 changed files with 1395 additions and 669 deletions

View File

@ -239,4 +239,25 @@ class Tarifaextra extends \App\Controllers\GoBaseController
}
}
public function getSelect2()
{
if ($this->request->isAJAX()) {
$query = $this->model->builder()->select(
[
"id",
"nombre as name"
]
)->where("deleted_at", null)
->where("mostrar_en_presupuesto", 1);
if ($this->request->getGet("q")) {
$query->groupStart()
->orLike("tarifa_extra.nombre", $this->request->getGet("q"))
->groupEnd();
}
return $this->response->setJSON($query->get()->getResultObject());
} else {
return $this->failUnauthorized('Invalid request', 403);
}
}
}