Merge branch 'ent-12390-item-heatmap-se-rompe-al-no-elegir-grupo' into 'develop'

Ent 12390 item heatmap se rompe al no elegir grupo

See merge request artica/pandorafms!6652
This commit is contained in:
Rafael Ameijeiras 2023-12-13 12:17:10 +00:00
commit 645c2d886a
2 changed files with 10 additions and 2 deletions

View File

@ -549,8 +549,12 @@ class Heatmap
global $config;
$filter_group = '';
if (empty($this->filter) === false && current($this->filter) != -1) {
if (empty($this->filter) === false && current($this->filter) != -1
&& implode(',', $this->filter) !== ''
) {
$filter_group = 'AND am.id_module_group IN ('.implode(',', $this->filter).')';
} else {
return false;
}
$filter_name = '';

View File

@ -320,6 +320,10 @@ class HeatmapWidget extends Widget
$module_groups[$module_group['id_mg']] = $module_group['name'];
}
if (empty($values['module_groups'][0]) === true) {
$values['module_groups'][0] = 0;
}
$inputs[] = [
'label' => __('Module group'),
'style' => ($values['type'] === '2') ? '' : 'display:none',
@ -332,7 +336,7 @@ class HeatmapWidget extends Widget
'return' => true,
'multiple' => true,
'nothing' => __('Not assigned'),
'nothing_value' => 0,
'nothing_value' => '0',
],
];