Fixed #4938 - default sort order

This commit is contained in:
snipe 2018-02-01 17:17:56 -06:00
parent d2587337e4
commit b3a6ec2804
5 changed files with 6 additions and 2 deletions

View file

@ -46,7 +46,7 @@ class ReportsController extends Controller
];
$sort = in_array($request->input('sort'), $allowed_columns) ? e($request->input('sort')) : 'created_at';
$order = $request->input('order') === 'asc' ? 'desc' : 'asc';
$order = ($request->input('order') == 'asc') ? 'asc' : 'desc';
$offset = request('offset', 0);
$limit = request('limit', 50);
$total = $actionlogs->count();

View file

@ -167,7 +167,6 @@
class="table table-striped snipe-table"
name="activityReport"
id="table"
data-sort-order="desc"
data-height="400"
data-show-export="false"
data-url="{{ route('api.activity.index', ['limit' => 25]) }}">

View file

@ -79,6 +79,8 @@
class="table table-striped snipe-table"
id="table"
data-advanced-search="true"
data-sort-order="name"
data-sort-order="asc"
data-show-export="true"
data-cookie="true"
data-id-table="advancedTable"

View file

@ -19,6 +19,7 @@
data-toolbar="#toolbar"
class="table table-striped snipe-table"
id="table"
data-sort-order="desc"
data-url="{{ route('api.activity.index') }}"
data-cookie="true"
data-cookie-id-table="activityReportTable">

View file

@ -61,6 +61,8 @@
name="users"
data-toolbar="#toolbar"
data-toggle="table"
data-sort-order="name"
data-sort-order="asc"
class="table table-striped snipe-table"
id="table"
data-url="{{ route('api.users.index',