Merge branch 'ent-9716-14429-no-se-ve-primer-ultimo-evento-al-agrupar-por-extra-id' into 'develop'

fix timestamp modal event grouped by extra id pandora_enterprise#9716

See merge request artica/pandorafms!5229
This commit is contained in:
Daniel Rodriguez 2022-11-22 09:20:47 +00:00
commit 1a77ee9ce4
1 changed files with 14 additions and 6 deletions

View File

@ -4693,22 +4693,30 @@ function events_page_general($event)
$data = [];
$data[0] = __('Timestamp');
if ($group_rep == 1 && $event['event_rep'] > 1) {
$data[1] = __('First event').': '.date($config['date_format'], $event['timestamp_first']).'<br>'.__('Last event').': '.date($config['date_format'], $event['timestamp_last']);
if ($event['event_rep'] > 1) {
$data[1] = __('First event').': ';
$data[1] .= date($config['date_format'], $event['timestamp_first']);
$data[1] .= '<br>';
$data[1] .= __('Last event').': ';
$data[1] .= date($config['date_format'], $event['timestamp_last']);
} else {
$data[1] = date($config['date_format'], $event['utimestamp']);
}
$table_general->data[] = $data;
// $event['owner_user'] = $event['id_usuario'];
$data = [];
$data[0] = __('Owner');
if (empty($event['owner_user'])) {
if (empty($event['owner_user']) === true) {
$data[1] = '<i>'.__('N/A').'</i>';
} else {
$user_owner = db_get_value('fullname', 'tusuario', 'id_user', $event['owner_user']);
if (empty($user_owner)) {
$user_owner = db_get_value(
'fullname',
'tusuario',
'id_user',
$event['owner_user']
);
if (empty($user_owner) === true) {
$user_owner = $event['owner_user'];
}