mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
add a warning message if asset tag not found
This commit is contained in:
parent
b804791ff6
commit
ad794248fe
|
@ -483,7 +483,9 @@ class AssetsController extends Controller
|
||||||
|
|
||||||
// If not a unique result, redirect to the index view
|
// If not a unique result, redirect to the index view
|
||||||
if ($assets->count() != 1) {
|
if ($assets->count() != 1) {
|
||||||
return redirect()->route('hardware.index')->with('search', $tag);
|
return redirect()->route('hardware.index')
|
||||||
|
->with('search', $tag)
|
||||||
|
->with('warning', trans('admin/hardware/message.does_not_exist_var', [ 'asset_tag' => $tag ]));
|
||||||
}
|
}
|
||||||
$asset = $assets->first();
|
$asset = $assets->first();
|
||||||
$this->authorize('view', $asset);
|
$this->authorize('view', $asset);
|
||||||
|
|
Loading…
Reference in a new issue