autcomplete gefixed

This commit is contained in:
ma0048
2025-10-06 10:20:21 +02:00
parent 81725a0fe9
commit 9309a48e97
4 changed files with 17 additions and 9 deletions
@@ -109,11 +109,14 @@ class Gruppe extends FHCAPI_Controller
}
public function getAllSearch($query = null)
public function getAllSearch()
{
$query = $this->input->get('query');
if (is_null($query))
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
$query_words = explode(' ', urldecode($query));
$query_words = explode(' ', $query);
$this->_ci->GruppeModel->addSelect('gruppe_kurzbz,
studiengang_kz,
@@ -177,12 +180,14 @@ class Gruppe extends FHCAPI_Controller
$this->terminateWithSuccess($all_gruppen);
}
public function getBenutzerSearch($query = null)
public function getBenutzerSearch()
{
$query = $this->input->get('query');
if (is_null($query))
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
$query_words = explode(' ', urldecode($query));
$query_words = explode(' ', $query);
$this->_ci->PersonModel->addSelect('vorname, nachname, uid, semester, UPPER(CONCAT(tbl_studiengang.typ, tbl_studiengang.kurzbz)) as studiengang');
$this->_ci->PersonModel->addJoin('public.tbl_benutzer', 'person_id');
@@ -208,11 +208,14 @@ class Lektor extends FHCAPI_Controller
$this->terminateWithSuccess(getData($this->_ci->LehrfunktionModel->load()));
}
public function getLektorenSearch($query = null)
public function getLektorenSearch()
{
$query = $this->input->get('query');
if (is_null($query))
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
$query_words = explode(' ', urldecode($query));
$query_words = explode(' ', $query);
$this->_ci->MitarbeiterModel->addSelect('uid, person_id, vorname, nachname');
$this->_ci->MitarbeiterModel->addJoin('public.tbl_benutzer', 'uid = mitarbeiter_uid');
+2 -2
View File
@@ -41,7 +41,7 @@ export default {
{
return {
method: 'get',
url: '/api/frontend/v1/lv/gruppe/getBenutzerSearch/' + encodeURIComponent(query)
url: `/api/frontend/v1/lv/gruppe/getBenutzerSearch?query=${encodeURIComponent(query)}`
};
},
@@ -49,7 +49,7 @@ export default {
{
return {
method: 'get',
url: '/api/frontend/v1/lv/gruppe/getAllSearch/' + encodeURIComponent(query)
url: `/api/frontend/v1/lv/gruppe/getAllSearch?query=${encodeURIComponent(query)}`
};
},
+1 -1
View File
@@ -12,7 +12,7 @@ export default {
{
return {
method: 'get',
url: '/api/frontend/v1/lv/lektor/getLektorenSearch/' + encodeURIComponent(query)
url: `/api/frontend/v1/lv/lektor/getLektorenSearch?query=${encodeURIComponent(query)}`
};
},