Add order by Firstname or lastname requested by CountryCom LLC, thanks
This commit is contained in:
parent
afbb39b1d9
commit
8a0c17b319
@ -809,10 +809,14 @@ switch ($action) {
|
||||
$query = ORM::for_table('tbl_customers');
|
||||
$query->where("status", $filter);
|
||||
}
|
||||
if ($orderby == 'asc') {
|
||||
$query->order_by_asc($order);
|
||||
} else {
|
||||
$query->order_by_desc($order);
|
||||
if($order == 'lastname') {
|
||||
$query->order_by_expr("SUBSTR(fullname, INSTR(fullname, ' ')) $orderby");
|
||||
}else{
|
||||
if ($orderby == 'asc') {
|
||||
$query->order_by_asc($order);
|
||||
} else {
|
||||
$query->order_by_desc($order);
|
||||
}
|
||||
}
|
||||
if (_post('export', '') == 'csv') {
|
||||
$csrf_token = _post('csrf_token');
|
||||
|
@ -825,5 +825,7 @@
|
||||
"radius": "radius",
|
||||
"Max_30_days": "Maksimal 30 hari",
|
||||
"Information": "Informasi",
|
||||
"Export_and_Print_will_show_all_data_without_pagination": "Ekspor dan Cetak akan menampilkan semua data tanpa pagination"
|
||||
"Export_and_Print_will_show_all_data_without_pagination": "Ekspor dan Cetak akan menampilkan semua data tanpa pagination",
|
||||
"First_Name": "Nama depan",
|
||||
"Last_Name": "Nama Belakang"
|
||||
}
|
@ -36,6 +36,10 @@
|
||||
<select class="form-control" id="order" name="order">
|
||||
<option value="username" {if $order eq 'username' }selected{/if}>
|
||||
{Lang::T('Username')}</option>
|
||||
<option value="fullname" {if $order eq 'fullname' }selected{/if}>
|
||||
{Lang::T('First Name')}</option>
|
||||
<option value="lastname" {if $order eq 'lastname' }selected{/if}>
|
||||
{Lang::T('Last Name')}</option>
|
||||
<option value="created_at" {if $order eq 'created_at' }selected{/if}>
|
||||
{Lang::T('Created Date')}</option>
|
||||
<option value="balance" {if $order eq 'balance' }selected{/if}>
|
||||
@ -68,15 +72,12 @@
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="search" class="form-control"
|
||||
placeholder="{Lang::T('Search')}..." value="{$search}">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-primary" type="submit"><span
|
||||
class="fa fa-search"></span></button>
|
||||
<button class="btn btn-primary" type="submit" name="export" value="csv">
|
||||
class="fa fa-search"></span> {Lang::T('Search')}</button>
|
||||
<button class="btn btn-info" type="submit" name="export" value="csv">
|
||||
<span class="glyphicon glyphicon-download" aria-hidden="true"></span> CSV
|
||||
</button>
|
||||
</div>
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "2024.10.31"
|
||||
"version": "2024.11.1"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user