diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 45806435e6..d3d4438843 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -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.')' : ''; } diff --git a/resources/views/reports/custom.blade.php b/resources/views/reports/custom.blade.php index 7bd1ba424e..afee0fcedd 100644 --- a/resources/views/reports/custom.blade.php +++ b/resources/views/reports/custom.blade.php @@ -235,9 +235,13 @@ - - - +