mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
This commit is contained in:
parent
2e0a7abbe9
commit
8e60767c00
|
@ -367,14 +367,30 @@ class ReportsController extends Controller
|
|||
|
||||
if (($activity->user) && ($activity->action_type=="uploaded") && ($activity->itemType()=="user")) {
|
||||
$activity_target = '<a href="'.route('view/user', $activity->target_id).'">'.$activity->user->fullName().'</a>';
|
||||
} elseif (($activity->item) && ($activity->target_type === "App\Models\Asset")) {
|
||||
} elseif ($activity->target_type === "App\Models\Asset") {
|
||||
if($activity->target) {
|
||||
$activity_target = '<a href="'.route('view/hardware', $activity->target_id).'">'.$activity->target->showAssetName().'</a>';
|
||||
} else {
|
||||
$activity_target = "Unknown Item";
|
||||
}
|
||||
} elseif ( $activity->target_type === "App\Models\User") {
|
||||
if($activity->target()) {
|
||||
$activity_target = '<a href="'.route('view/user', $activity->target_id).'">'.$activity->target->fullName().'</a>';
|
||||
} else {
|
||||
$activity_target = 'Unknown User';
|
||||
}
|
||||
} elseif ($activity->action_type=='requested') {
|
||||
if ($activity->user) {
|
||||
$activity_target = '<a href="'.route('view/user', $activity->user_id).'">'.$activity->user->fullName().'</a>';
|
||||
} else {
|
||||
$activity_target = 'Unknown User';
|
||||
}
|
||||
} else {
|
||||
if($activity->target) {
|
||||
$activity_target = $activity->target->id;
|
||||
} else {
|
||||
$activity_target = "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue