mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Added manager to custom report
This commit is contained in:
parent
5bb4c85ccb
commit
d7dc4ae0c0
|
@ -400,6 +400,10 @@ class ReportsController extends Controller
|
|||
$header[] = 'Employee No.';
|
||||
}
|
||||
|
||||
if ($request->has('manager')) {
|
||||
$header[] = trans('admin/users/table.manager');
|
||||
}
|
||||
|
||||
if ($request->has('department')) {
|
||||
$header[] = trans('general.department');
|
||||
}
|
||||
|
@ -613,6 +617,14 @@ class ReportsController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
if ($request->has('manager')) {
|
||||
if ($asset->checkedOutToUser()) {
|
||||
$row[] = (($asset->assignedto) && ($asset->assignedto->manager)) ? $asset->assignedto->manager->present()->fullName : '';
|
||||
} else {
|
||||
$row[] = ''; // Empty string if unassigned
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($request->has('department')) {
|
||||
if ($asset->checkedOutToUser()) {
|
||||
|
|
|
@ -221,6 +221,13 @@
|
|||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('manager', '1', '1', ['class' => 'minimal']) }}
|
||||
{{ trans('admin/users/table.manager') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('department', '1', '1', ['class' => 'minimal']) }}
|
||||
|
@ -231,6 +238,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
@if ($customfields->count() > 0)
|
||||
<div class="checkbox col-md-12">
|
||||
<h4>Custom Fields:</h4>
|
||||
|
|
Loading…
Reference in a new issue