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:
ma0068
2025-05-21 15:34:43 +02:00
parent 12415279d1
commit c26bb98960
12 changed files with 1891 additions and 608 deletions
@@ -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). "%'
");
}
}