From a02a04d6016815eeeb4770b8081113be390c4e55 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Nov 2022 16:34:57 -0800 Subject: [PATCH] fixes a regression with the csv assigned to fields --- app/Http/Controllers/ReportsController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 45c87ac31c..5e6ce4fca9 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -763,7 +763,7 @@ class ReportsController extends Controller if ($request->filled('username')) { // Only works if we're checked out to a user, not anything else. if ($asset->checkedOutToUser()) { - $row[] = ($asset->assignedTo) ? $asset->assignedTo->username : ''; + $row[] = ($asset->assignedto) ? $asset->assignedto->username : ''; } else { $row[] = ''; // Empty string if unassigned } @@ -772,7 +772,7 @@ class ReportsController extends Controller if ($request->filled('employee_num')) { // Only works if we're checked out to a user, not anything else. if ($asset->checkedOutToUser()) { - $row[] = ($asset->assignedTo) ? $asset->assignedTo->employee_num : ''; + $row[] = ($asset->assignedto) ? $asset->assignedto->employee_num : ''; } else { $row[] = ''; // Empty string if unassigned } @@ -780,7 +780,7 @@ class ReportsController extends Controller if ($request->filled('manager')) { if ($asset->checkedOutToUser()) { - $row[] = (($asset->assignedTo) && ($asset->assignedTo->manager)) ? $asset->assignedTo->manager->present()->fullName : ''; + $row[] = (($asset->assignedto) && ($asset->assignedto->manager)) ? $asset->assignedto->manager->present()->fullName : ''; } else { $row[] = ''; // Empty string if unassigned } @@ -788,7 +788,7 @@ class ReportsController extends Controller if ($request->filled('department')) { if ($asset->checkedOutToUser()) { - $row[] = (($asset->assignedTo) && ($asset->assignedTo->department)) ? $asset->assignedTo->department->name : ''; + $row[] = (($asset->assignedto) && ($asset->assignedto->department)) ? $asset->assignedto->department->name : ''; } else { $row[] = ''; // Empty string if unassigned } @@ -796,7 +796,7 @@ class ReportsController extends Controller if ($request->filled('title')) { if ($asset->checkedOutToUser()) { - $row[] = ($asset->assignedTo) ? $asset->assignedTo->jobtitle : ''; + $row[] = ($asset->assignedto) ? $asset->assignedto->jobtitle : ''; } else { $row[] = ''; // Empty string if unassigned }