mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
new Core Component Function
- autocomplete and dropdown field for search oes and search functions with active and non active entries - possibility to dynamic styling of display switch, newButton in Tabulator, different editLabels - possibility to show/hide column company - possibility to show/hide to save function as copy
This commit is contained in:
@@ -11,4 +11,26 @@ class Funktion_model extends DB_Model
|
||||
$this->dbTable = 'public.tbl_funktion';
|
||||
$this->pk = 'funktion_kurzbz';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Functions by eventQuery string. Use with autocomplete event queries in Function Component
|
||||
* @param $eventQuery String
|
||||
* @return array
|
||||
*/
|
||||
public function getAutocompleteSuggestions($eventQuery)
|
||||
{
|
||||
$this->addSelect('funktion_kurzbz, beschreibung, aktiv');
|
||||
$this->addSelect("beschreibung AS label");
|
||||
$this->addOrder('beschreibung', 'ASC');
|
||||
|
||||
if($eventQuery === null)
|
||||
{
|
||||
return $this->load();
|
||||
}
|
||||
|
||||
return $this->loadWhere("
|
||||
funktion_kurzbz ILIKE '%". $this->escapeLike($eventQuery). "%'
|
||||
OR beschreibung ILIKE '%". $this->escapeLike($eventQuery). "%'
|
||||
");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user