mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Added location address to custom asset report export
This commit is contained in:
parent
5f1ec550ec
commit
115d6e29df
|
@ -494,6 +494,14 @@ class ReportsController extends Controller
|
||||||
if ($request->has('location')) {
|
if ($request->has('location')) {
|
||||||
$header[] = trans('admin/hardware/table.location');
|
$header[] = trans('admin/hardware/table.location');
|
||||||
}
|
}
|
||||||
|
if ($request->has('location_address')) {
|
||||||
|
$header[] = trans('general.address');
|
||||||
|
$header[] = trans('general.address');
|
||||||
|
$header[] = trans('general.city');
|
||||||
|
$header[] = trans('general.state');
|
||||||
|
$header[] = trans('general.country');
|
||||||
|
$header[] = trans('general.zip');
|
||||||
|
}
|
||||||
|
|
||||||
if ($request->has('assigned_to')) {
|
if ($request->has('assigned_to')) {
|
||||||
$header[] = trans('admin/hardware/table.checkoutto');
|
$header[] = trans('admin/hardware/table.checkoutto');
|
||||||
|
@ -662,6 +670,16 @@ class ReportsController extends Controller
|
||||||
$row[] = ($asset->location) ? $asset->location->present()->name() : '';
|
$row[] = ($asset->location) ? $asset->location->present()->name() : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($request->has('location_address')) {
|
||||||
|
$row[] = ($asset->location) ? $asset->location->address : '';
|
||||||
|
$row[] = ($asset->location) ? $asset->location->address2 : '';
|
||||||
|
$row[] = ($asset->location) ? $asset->location->city : '';
|
||||||
|
$row[] = ($asset->location) ? $asset->location->state : '';
|
||||||
|
$row[] = ($asset->location) ? $asset->location->country : '';
|
||||||
|
$row[] = ($asset->location) ? $asset->location->zip : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($request->has('assigned_to')) {
|
if ($request->has('assigned_to')) {
|
||||||
$row[] = ($asset->checkedOutToUser() && $asset->assigned) ? e($asset->assigned->getFullNameAttribute()) : ($asset->assigned ? e($asset->assigned->display_name) : '');
|
$row[] = ($asset->checkedOutToUser() && $asset->assigned) ? e($asset->assigned->getFullNameAttribute()) : ($asset->assigned ? e($asset->assigned->display_name) : '');
|
||||||
$row[] = ($asset->checkedOutToUser() && $asset->assigned) ? 'user' : e($asset->assignedType());
|
$row[] = ($asset->checkedOutToUser() && $asset->assigned) ? 'user' : e($asset->assignedType());
|
||||||
|
|
|
@ -115,6 +115,12 @@
|
||||||
{{ trans('general.location') }}
|
{{ trans('general.location') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="checkbox col-md-12">
|
||||||
|
<label>
|
||||||
|
{{ Form::checkbox('location_address', '1', '1', ['class' => 'minimal']) }}
|
||||||
|
{{ trans('general.address') }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('assigned_to', '1', '1', ['class' => 'minimal']) }}
|
{{ Form::checkbox('assigned_to', '1', '1', ['class' => 'minimal']) }}
|
||||||
|
|
Loading…
Reference in a new issue