diff --git a/CHANGELOG.md b/CHANGELOG.md index 725e801c..56dbabf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ # CHANGELOG +## 2024.4.29 + +- Maps Pagination +- Maps Search +- Fix extend logic +- Fix logic customer recharge to not delete when customer not change the plan + ## 2024.4.23 - Fix Pagination Voucher diff --git a/system/autoload/Paginator.php b/system/autoload/Paginator.php index 24766ae6..85441b8c 100644 --- a/system/autoload/Paginator.php +++ b/system/autoload/Paginator.php @@ -20,7 +20,6 @@ class Paginator } $url .= '&p='; $totalReq = $query->count(); - $next = $page + 1; $lastpage = ceil($totalReq / $per_page); $lpm1 = $lastpage - 1; $limit = $per_page; diff --git a/system/controllers/map.php b/system/controllers/map.php index 526ed8ca..9ef08270 100644 --- a/system/controllers/map.php +++ b/system/controllers/map.php @@ -17,8 +17,14 @@ if (empty($action)) { switch ($action) { case 'customer': - - $c = ORM::for_table('tbl_customers')->find_many(); + if(!empty(_req('search'))){ + $search = _req('search'); + $query = ORM::for_table('tbl_customers')->whereRaw("coordinates != '' AND fullname LIKE '%$search%' OR username LIKE '%$search%' OR email LIKE '%$search%' OR phonenumber LIKE '%$search%'")->order_by_desc('fullname'); + $c = Paginator::findMany($query, ['search' => $search], 50); + }else{ + $query = ORM::for_table('tbl_customers')->where_not_equal('coordinates',''); + $c = Paginator::findMany($query, ['search'=>''], 50); + } $customerData = []; foreach ($c as $customer) { @@ -34,7 +40,7 @@ switch ($action) { ]; } } - + $ui->assign('search', $search); $ui->assign('customers', $customerData); $ui->assign('xheader', ''); $ui->assign('_title', Lang::T('Customer Geo Location Information')); diff --git a/ui/ui/bandwidth.tpl b/ui/ui/bandwidth.tpl index 8ec665dd..b07d074e 100644 --- a/ui/ui/bandwidth.tpl +++ b/ui/ui/bandwidth.tpl @@ -1,58 +1,65 @@ {include file="sections/header.tpl"} -
-
-
-
{Lang::T('Bandwidth Plans')}
-
-
-
- -
-   -
-
- - - - - - - - - - - {foreach $d as $ds} - - - - - - - {/foreach} - -
{Lang::T('Bandwidth Name')}{Lang::T('Rate')}{Lang::T('Burst')}{Lang::T('Manage')}
{$ds['name_bw']}{$ds['rate_down']} {$ds['rate_down_unit']} / {$ds['rate_up']} {$ds['rate_up_unit']}{$ds['burst']} - {Lang::T('Edit')} - -
-
- {include file="pagination.tpl"} +
+
+
+
{Lang::T('Bandwidth Plans')}
+
+
+
+
+
+  
+
+ + + + + + + + + + + {foreach $d as $ds} + + + + + + + {/foreach} + +
{Lang::T('Bandwidth Name')}{Lang::T('Rate')}{Lang::T('Burst')}{Lang::T('Manage')}
{$ds['name_bw']}{$ds['rate_down']} {$ds['rate_down_unit']} / {$ds['rate_up']} {$ds['rate_up_unit']} + {$ds['burst']} + {Lang::T('Edit')} + +
+
+ {include file="pagination.tpl"}
+
+
+
+
{include file="sections/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/customers-map.tpl b/ui/ui/customers-map.tpl index a4291f2d..f02b83c0 100644 --- a/ui/ui/customers-map.tpl +++ b/ui/ui/customers-map.tpl @@ -1,8 +1,24 @@ {include file="sections/header.tpl"} - -
+ + + +
+ +{include file="pagination.tpl"} {literal}