3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-03-29 11:56:19 +00:00

Added #6489: show asset assignments under user assignments (#7293)

* Add a setting to show assets assigned to other assets #6489

* Update user's views to show assets assigned to other assets #6489

* Add ukrainian and russian translation for the feature #6489 in settings
This commit is contained in:
Valentyn Tulub
2019-12-06 20:57:48 +02:00
committed by snipe
parent 3fbfb0c658
commit 6ad1f51673
12 changed files with 144 additions and 8 deletions

View File

@ -42,13 +42,11 @@ class ViewAssetsController extends Controller
$userlog = $user->userlog->load('item', 'user', 'target');
if (isset($user->id)) {
return view('account/view-assets', compact('user', 'userlog'));
return view('account/view-assets', compact('user', 'userlog'))
->with('settings', Setting::getSettings());
} else {
// Prepare the error message
$error = trans('admin/users/message.user_not_found', compact('id'));
// Redirect to the user management page
return redirect()->route('users.index')->with('error', $error);
return redirect()->route('users.index')->with('error', trans('admin/users/message.user_not_found', compact('id')));
}
// Redirect to the user management page
return redirect()->route('users.index')