diff --git a/modules/viste/actions.php b/modules/viste/actions.php index 3a628b382..3d04066af 100644 --- a/modules/viste/actions.php +++ b/modules/viste/actions.php @@ -93,6 +93,7 @@ switch (filter('op')) { if (check_query($post['query'][$c])) { $array = [ + 'name' => $post['name'][$c], 'idgruppo' => $post['gruppo'][$c], 'idmodule' => $id_record, 'clause' => $post['query'][$c], diff --git a/modules/viste/edit.php b/modules/viste/edit.php index bddd458b2..e464c52d4 100644 --- a/modules/viste/edit.php +++ b/modules/viste/edit.php @@ -217,7 +217,7 @@ if (!empty($options) && $options != 'custom') {
-
+
@@ -351,8 +351,8 @@ if (!empty($options) && $options != 'custom') { echo '">

- '.tr('Filtro _NUM_', [ - '_NUM_' => $num, + '.tr('Filtro: _NAME_', [ + '_NAME_' => $additional['name'], ]).'

'; if ($editable) { @@ -368,16 +368,25 @@ if (!empty($options) && $options != 'custom') { echo '
-
+ +
+
+ {[ "type": "textarea", "label": "'.tr('Query').'", "name": "query['.$num.']", "value": "'.prepareToField($additional['clause']).'"'; + if (!$editable) { + echo ', "readonly": "1"'; + } + echo ' ]} +
+
+ +
+ + +
+ {[ "type": "text", "label": "'.tr('Name').'", "name": "name['.$num.']", "value": "'.$additional['name'].'" ]} +
-
- {[ "type": "textarea", "label": "'.tr('Query').'", "name": "query['.$num.']", "value": "'.prepareToField($additional['clause']).'"'; - if (!$editable) { - echo ', "readonly": "1"'; - } - echo ' ]} -
{[ "type": "select", "label": "'.tr('Gruppo').'", "name": "gruppo['.$num.']", "values": "query=SELECT id, nome AS descrizione FROM zz_groups ORDER BY id ASC", "value": "'.$additional['idgruppo'].'"'; @@ -402,8 +411,8 @@ if (!empty($options) && $options != 'custom') {
-
- +
+
@@ -419,11 +428,18 @@ if (!empty($options) && $options != 'custom') {

'.tr('Nuovo filtro').'

+ +
+
+ {[ "type": "textarea", "label": "'.tr('Query').'", "name": "query[-id-]" ]} +
+
+
- {[ "type": "textarea", "label": "'.tr('Query').'", "name": "query[-id-]" ]} + {[ "type": "text", "label": "'.tr('Nome').'", "name": "name[-id-]" ]}
@@ -431,7 +447,7 @@ if (!empty($options) && $options != 'custom') {
- {[ "type": "select", "label": "'.tr('Posizione').'", "name": "position[-id-]", "list=\"0\":\"'.tr('WHERE').'\",\"1\": \"'.tr('HAVING').'\"" ]} + {[ "type": "select", "label": "'.tr('Posizione').'", "name": "position[-id-]", "values": "list=\"0\":\"'.tr('WHERE').'\",\"1\": \"'.tr('HAVING').'\"", "value": "" ]}
diff --git a/update/2_4_1.sql b/update/2_4_1.sql index 701096fcf..130b952b1 100644 --- a/update/2_4_1.sql +++ b/update/2_4_1.sql @@ -13,4 +13,10 @@ ALTER TABLE `an_anagrafiche` ADD `pec` VARCHAR(255) NOT NULL AFTER `email`; ALTER TABLE `an_nazioni` ADD `iso2` VARCHAR(2) NOT NULL AFTER `nome`; -- ISO 2 per ITALIA (https://it.wikipedia.org/wiki/ISO_3166-1_alpha-2) -UPDATE `an_nazioni` SET `iso2` = 'IT' WHERE `an_nazioni`.`nome` = 'ITALIA'; \ No newline at end of file +UPDATE `an_nazioni` SET `iso2` = 'IT' WHERE `an_nazioni`.`nome` = 'ITALIA'; + +-- Aggiunto name per i filtri +ALTER TABLE `zz_group_module` ADD `name` VARCHAR(255) NOT NULL AFTER `idmodule`; + +UPDATE `zz_group_module` SET `name` = 'Mostra interventi ai tecnici coinvolti' WHERE `zz_group_module`.`id` = 1; +UPDATE `zz_group_module` SET `name` = 'Mostra interventi ai clienti coinvolti' WHERE `zz_group_module`.`id` = 5; \ No newline at end of file