Fix ajax select fasce orarie

This commit is contained in:
MatteoPistorello 2022-06-01 15:44:25 +02:00
parent 075f6bccfd
commit 9bed55a029
2 changed files with 4 additions and 1 deletions

View File

@ -20,7 +20,7 @@
include_once __DIR__.'/../../../core.php';
switch ($resource) {
case 'fasce_orarie':
case 'eventi':
$query = 'SELECT id, nome AS descrizione FROM zz_events |where| ORDER BY nome ASC';
foreach ($elements as $element) {

View File

@ -26,6 +26,9 @@ switch ($resource) {
foreach ($elements as $element) {
$filter[] = 'id='.prepare($element);
}
if (empty($filter)) {
$where[] = 'in_fasceorarie.deleted_at IS NULL';
}
if (!empty($search)) {
$search_fields[] = 'nome LIKE '.prepare('%'.$search.'%');