mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-30 07:02:20 -08:00
Merge pull request #10433 from inietov/features/adding_title_to_custom_report_master
Add title column to custom reports on master branch
This commit is contained in:
commit
ace4a00e29
|
@ -515,6 +515,10 @@ class ReportsController extends Controller
|
|||
$header[] = trans('general.department');
|
||||
}
|
||||
|
||||
if ($request->filled('title')) {
|
||||
$header[] = trans('admin/users/table.title');
|
||||
}
|
||||
|
||||
if ($request->filled('status')) {
|
||||
$header[] = trans('general.status');
|
||||
}
|
||||
|
@ -754,7 +758,6 @@ class ReportsController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if ($request->filled('department')) {
|
||||
if ($asset->checkedOutToUser()) {
|
||||
$row[] = (($asset->assignedto) && ($asset->assignedto->department)) ? $asset->assignedto->department->name : '';
|
||||
|
@ -763,6 +766,14 @@ class ReportsController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
if ($request->filled('title')) {
|
||||
if ($asset->checkedOutToUser()) {
|
||||
$row[] = ($asset->assignedto) ? $asset->assignedto->jobtitle : '';
|
||||
} else {
|
||||
$row[] = ''; // Empty string if unassigned
|
||||
}
|
||||
}
|
||||
|
||||
if ($request->filled('status')) {
|
||||
$row[] = ($asset->assetstatus) ? $asset->assetstatus->name.' ('.$asset->present()->statusMeta.')' : '';
|
||||
}
|
||||
|
|
|
@ -235,9 +235,13 @@
|
|||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('title', '1', '1', ['class' => 'minimal']) }}
|
||||
{{ trans('admin/users/table.title') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
@if ($customfields->count() > 0)
|
||||
<div class="checkbox col-md-12">
|
||||
|
|
Loading…
Reference in a new issue