diff --git a/system/controllers/map.php b/system/controllers/map.php index 053019f..21c95ca 100644 --- a/system/controllers/map.php +++ b/system/controllers/map.php @@ -5,7 +5,7 @@ * by https://t.me/ibnux **/ - _admin(); +_admin(); $ui->assign('_system_menu', 'map'); $action = $routes['1']; @@ -22,14 +22,16 @@ switch ($action) { $customerData = []; foreach ($c as $customer) { - $customerData[] = [ - 'id' => $customer->id, - 'name' => $customer->fullname, - 'balance' => $customer->balance, - 'address' => $customer->address, - 'info' => Lang::T("Username") . ": " . $customer->username . " - " . Lang::T("Full Name") . ": " . $customer->fullname . " - " . Lang::T("Email") . ": " . $customer->email . " - " . Lang::T("Phone") . ": " . $customer->phonenumber . " - " . Lang::T("Service Type") . ": " . $customer->service_type, - 'coordinates' => '[' . $customer->coordinates . ']', - ]; + if (!empty($customer->coordinates)) { + $customerData[] = [ + 'id' => $customer->id, + 'name' => $customer->fullname, + 'balance' => $customer->balance, + 'address' => $customer->address, + 'info' => Lang::T("Username") . ": " . $customer->username . " - " . Lang::T("Full Name") . ": " . $customer->fullname . " - " . Lang::T("Email") . ": " . $customer->email . " - " . Lang::T("Phone") . ": " . $customer->phonenumber . " - " . Lang::T("Service Type") . ": " . $customer->service_type, + 'coordinates' => '[' . $customer->coordinates . ']', + ]; + } } $ui->assign('customers', $customerData); diff --git a/ui/ui/map-customer.tpl b/ui/ui/map-customer.tpl index 9192c86..0744cd2 100644 --- a/ui/ui/map-customer.tpl +++ b/ui/ui/map-customer.tpl @@ -1,18 +1,19 @@ {include file="sections/header.tpl"} -
+
{literal} - + } + {/literal} -{include file="sections/footer.tpl"} +{include file="sections/footer.tpl"} \ No newline at end of file