Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2022-08-02 20:00:13 -07:00
commit eadb36cb26
2 changed files with 24 additions and 13 deletions

View file

@ -552,6 +552,10 @@ class ReportsController extends Controller
$header[] = trans('general.updated_at');
}
if ($request->filled('deleted_at')) {
$header[] = trans('general.deleted');
}
if ($request->filled('last_audit_date')) {
$header[] = trans('general.last_audit');
}
@ -586,7 +590,6 @@ class ReportsController extends Controller
}
if ($request->filled('by_rtd_location_id')) {
\Log::debug('RTD location should match: '.$request->input('by_rtd_location_id'));
$assets->where('assets.rtd_location_id', $request->input('by_rtd_location_id'));
}
@ -607,7 +610,6 @@ class ReportsController extends Controller
}
if ($request->filled('by_dept_id')) {
\Log::debug('Only users in dept '.$request->input('by_dept_id'));
$assets->CheckedOutToTargetInDepartment($request->input('by_dept_id'));
}
@ -642,13 +644,13 @@ class ReportsController extends Controller
if (($request->filled('next_audit_start')) && ($request->filled('next_audit_end'))) {
$assets->whereBetween('assets.next_audit_date', [$request->input('next_audit_start'), $request->input('next_audit_end')]);
}
if($request->filled('exclude_archived')){
if ($request->filled('exclude_archived')) {
$assets->notArchived();
}
if($request->input('deleted_assets') == '1'){
if ($request->input('deleted_assets') == '1') {
$assets->withTrashed();
}
if($request->input('deleted_assets') == '0'){
if ($request->input('deleted_assets') == '0') {
$assets->onlyTrashed();
}
@ -816,6 +818,10 @@ class ReportsController extends Controller
$row[] = ($asset->updated_at) ? $asset->updated_at : '';
}
if ($request->filled('deleted_at')) {
$row[] = ($asset->deleted_at) ? $asset->deleted_at : '';
}
if ($request->filled('last_audit_date')) {
$row[] = ($asset->last_audit_date) ? $asset->last_audit_date : '';
}

View file

@ -178,6 +178,13 @@
{{ trans('general.updated_at') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('deleted_at', '1', '1', ['class' => 'minimal']) }}
{{ trans('general.deleted') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('last_audit_date', '1', '1', ['class' => 'minimal']) }}
@ -354,16 +361,14 @@
<div class="col-md-9 col-md-offset-3">
<br>
<label for= "deleted_assets">
{{ Form::radio('deleted_assets', '', true, ['aria-label'=>'deleted_assets', 'class'=>'minimal'])}}
{{ trans('general.exclude_deleted') }}
{{ Form::radio('deleted_assets', '', true, ['aria-label'=>'deleted_assets', 'class'=>'minimal', 'id'=>'deleted_assets_exclude_deleted'])}}
<label for="deleted_assets_exclude_deleted">{{ trans('general.exclude_deleted') }}</label>
<br>
{{ Form::radio('deleted_assets', '1', old('deleted_assets'), ['aria-label'=>'deleted_assets','class' => 'minimal']) }}
{{ trans('general.include_deleted') }}
{{ Form::radio('deleted_assets', '1', old('deleted_assets'), ['aria-label'=>'deleted_assets','class' => 'minimal', 'id'=>'deleted_assets_include_deleted']) }}
<label for="deleted_assets_include_deleted">{{ trans('general.include_deleted') }}</label>
<br>
{{ Form::radio('deleted_assets', '0', old('deleted_assets'), ['aria-label'=>'deleted_assets','class' => 'minimal']) }}
{{ trans('general.only_deleted') }}
</label>
{{ Form::radio('deleted_assets', '0', old('deleted_assets'), ['aria-label'=>'deleted_assets','class' => 'minimal','id'=>'deleted_assets_only_deleted']) }}
<label for="deleted_assets_only_deleted">{{ trans('general.only_deleted') }}</label>
</div>
</div>