#11118 Fix conditional. Don't show anything if don't exists GIS data

This commit is contained in:
miguel angel rasteu 2023-05-08 10:10:25 +02:00
parent 37d0cff221
commit dab73a6972
1 changed files with 3 additions and 4 deletions

View File

@ -517,14 +517,13 @@ $data_opcional->class = 'floating_form';
$agentAdditionalContent = '';
// Position Information.
if ((bool) $config['activate_gis'] === true) {
$data_opcional->data['agent_position'][0] = __('Position (Long, Lat)');
$dataPositionAgent = gis_get_data_last_position_agent(
$agent['id_agente']
);
if ($dataPositionAgent === false) {
$data_opcional->data['agent_position'][1] = __('There is no GIS data.');
} else {
if ($dataPositionAgent === true) {
$data_opcional->data['agent_position'][0] = __('Position (Long, Lat)');
$dataOptionalOutput = html_print_anchor(
[
'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=gis&id_agente='.$id_agente,