Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2023-10-30 13:06:50 +00:00
commit 1da6b6a4d5
2 changed files with 104 additions and 0 deletions

View file

@ -528,6 +528,30 @@ class ReportsController extends Controller
$header[] = trans('admin/users/table.title'); $header[] = trans('admin/users/table.title');
} }
if ($request->filled('phone')) {
$header[] = trans('admin/users/table.phone');
}
if ($request->filled('user_address')) {
$header[] = trans('general.user') .' '. trans('general.address');
}
if ($request->filled('user_city')) {
$header[] = trans('general.user') .' '. trans('general.city');
}
if ($request->filled('user_state')) {
$header[] = trans('general.user') .' '. trans('general.state');
}
if ($request->filled('user_country')) {
$header[] = trans('general.user') .' '. trans('general.country');
}
if ($request->filled('user_zip')) {
$header[] = trans('general.user') .' '. trans('general.zip');
}
if ($request->filled('status')) { if ($request->filled('status')) {
$header[] = trans('general.status'); $header[] = trans('general.status');
} }
@ -828,6 +852,54 @@ class ReportsController extends Controller
} }
} }
if ($request->filled('phone')) {
if ($asset->checkedOutToUser()) {
$row[] = ($asset->assignedto) ? $asset->assignedto->phone : '';
} else {
$row[] = ''; // Empty string if unassigned
}
}
if ($request->filled('user_address')) {
if ($asset->checkedOutToUser()) {
$row[] = ($asset->assignedto) ? $asset->assignedto->address : '';
} else {
$row[] = ''; // Empty string if unassigned
}
}
if ($request->filled('user_city')) {
if ($asset->checkedOutToUser()) {
$row[] = ($asset->assignedto) ? $asset->assignedto->city : '';
} else {
$row[] = ''; // Empty string if unassigned
}
}
if ($request->filled('user_state')) {
if ($asset->checkedOutToUser()) {
$row[] = ($asset->assignedto) ? $asset->assignedto->state : '';
} else {
$row[] = ''; // Empty string if unassigned
}
}
if ($request->filled('user_country')) {
if ($asset->checkedOutToUser()) {
$row[] = ($asset->assignedto) ? $asset->assignedto->country : '';
} else {
$row[] = ''; // Empty string if unassigned
}
}
if ($request->filled('user_zip')) {
if ($asset->checkedOutToUser()) {
$row[] = ($asset->assignedto) ? $asset->assignedto->zip : '';
} else {
$row[] = ''; // Empty string if unassigned
}
}
if ($request->filled('status')) { if ($request->filled('status')) {
$row[] = ($asset->assetstatus) ? $asset->assetstatus->name.' ('.$asset->present()->statusMeta.')' : ''; $row[] = ($asset->assetstatus) ? $asset->assetstatus->name.' ('.$asset->present()->statusMeta.')' : '';
} }

View file

@ -221,6 +221,38 @@
{{ trans('admin/users/table.title') }} {{ trans('admin/users/table.title') }}
</label> </label>
<!-- new -->
<label class="form-control">
{{ Form::checkbox('phone', '1', '1') }}
{{ trans('admin/users/table.phone') }}
</label>
<label class="form-control">
{{ Form::checkbox('user_address', '1', '1') }}
{{ trans('general.address') }}
</label>
<label class="form-control">
{{Form::checkbox('user_city', '1', '1')}}
{{ trans('general.city') }}
</label>
<label class="form-control">
{{Form::checkbox('user_state', '1', '1')}}
{{ trans('general.state') }}
</label>
<label class="form-control">
{{Form::checkbox('user_country', '1', '1')}}
{{ trans('general.country') }}
</label>
<label class="form-control">
{{Form::checkbox('user_zip', '1', '1')}}
{{ trans('general.zip') }}
</label>
@if ($customfields->count() > 0) @if ($customfields->count() > 0)