mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Add employee number option to custom report
This commit is contained in:
parent
1d2ae84572
commit
45c789021e
|
@ -561,6 +561,9 @@ class ReportsController extends Controller
|
|||
if (e(Input::get('username')) == '1') {
|
||||
$header[] = 'Username';
|
||||
}
|
||||
if (e(Input::get('employee_num')) == '1') {
|
||||
$header[] = 'Employee No.';
|
||||
}
|
||||
if (e(Input::get('status')) == '1') {
|
||||
$header[] = 'Status';
|
||||
}
|
||||
|
@ -679,6 +682,14 @@ class ReportsController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
if (e(Input::get('employee_num')) == '1') {
|
||||
if ($asset->assigneduser) {
|
||||
$row[] = '"' .e($asset->assigneduser->employee_num). '"';
|
||||
} else {
|
||||
$row[] = ''; // Empty string if unassigned
|
||||
}
|
||||
}
|
||||
|
||||
if (e(Input::get('status')) == '1') {
|
||||
if (( $asset->status_id == '0' ) && ( $asset->assigned_to == '0' )) {
|
||||
$row[] = trans('general.ready_to_deploy');
|
||||
|
|
|
@ -128,6 +128,13 @@
|
|||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('employee_num', '1') }}
|
||||
{{ trans('admin/users/table.employee_num') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('status', '1') }}
|
||||
|
@ -168,7 +175,7 @@
|
|||
|
||||
|
||||
<div class="col-md-7">
|
||||
<p>Select the fields you'd like to include in your custom report, and click Generate. The file (report.csv) will download automatically, and you can open it in Excel.</p>
|
||||
<p>Select the fields you'd like to include in your custom report, and click Generate. The file (YYYY-mm-dd-his-custom-asset-report.csv) will download automatically, and you can open it in Excel.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue