Fixes presenter issue on user history
This commit is contained in:
parent
a59db7062d
commit
da2d9b2374
2 changed files with 6 additions and 7 deletions
|
@ -25,8 +25,10 @@ class ReportsController extends Controller
|
||||||
$actionlogs = $actionlogs->TextSearch(e($request->input('search')));
|
$actionlogs = $actionlogs->TextSearch(e($request->input('search')));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->has('user_id')) {
|
if (($request->has('target_type')) && ($request->has('target_id'))) {
|
||||||
$actionlogs = $actionlogs->where('target_id','=',$request->input('user_id'))->where('target_type','=','App\\Models\\User');
|
$actionlogs = $actionlogs->where('target_id','=',$request->input('target_id'))
|
||||||
|
->where('target_type','=',"App\\Models\\".ucwords($request->input('target_type')));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($request->has('item_type')) && ($request->has('item_id'))) {
|
if (($request->has('item_type')) && ($request->has('item_id'))) {
|
||||||
|
|
|
@ -434,7 +434,7 @@
|
||||||
name="userActivityReport"
|
name="userActivityReport"
|
||||||
id="table4
|
id="table4
|
||||||
data-sort-order="desc"
|
data-sort-order="desc"
|
||||||
data-url="{{ route('api.activity.index', ['user_id' => $user->id]) }}">
|
data-url="{{ route('api.activity.index', ['target_id' => $user->id, 'target_type' => 'user']) }}">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-field="icon" style="width: 40px;" class="hidden-xs" data-formatter="iconFormatter"></th>
|
<th data-field="icon" style="width: 40px;" class="hidden-xs" data-formatter="iconFormatter"></th>
|
||||||
|
@ -457,6 +457,7 @@
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('moar_scripts')
|
@section('moar_scripts')
|
||||||
|
@include ('partials.bootstrap-table', ['simple_view' => true])
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
//binds to onchange event of your input field
|
//binds to onchange event of your input field
|
||||||
|
@ -515,7 +516,3 @@ $(function () {
|
||||||
|
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('moar_scripts')
|
|
||||||
@include ('partials.bootstrap-table')
|
|
||||||
@stop
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue