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