mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Fixed only undeployed assets in checkout to list
This commit is contained in:
parent
ab9729c39a
commit
3ecaa99990
|
@ -282,7 +282,8 @@ class AssetsController extends Controller
|
||||||
'assets.name',
|
'assets.name',
|
||||||
'assets.asset_tag',
|
'assets.asset_tag',
|
||||||
'assets.model_id',
|
'assets.model_id',
|
||||||
]))->with('model')->RTD();
|
'assets.status_id'
|
||||||
|
])->with('model', 'assetstatus')->NotArchived());
|
||||||
|
|
||||||
|
|
||||||
if ($request->has('search')) {
|
if ($request->has('search')) {
|
||||||
|
@ -300,6 +301,10 @@ class AssetsController extends Controller
|
||||||
// they may not have a ->name value but we want to display something anyway
|
// they may not have a ->name value but we want to display something anyway
|
||||||
foreach ($assets as $asset) {
|
foreach ($assets as $asset) {
|
||||||
$asset->use_text = $asset->present()->fullName;
|
$asset->use_text = $asset->present()->fullName;
|
||||||
|
if ($asset->assetstatus->getStatuslabelType()=='pending') {
|
||||||
|
$asset->use_text = $asset->present()->fullName.' ('.$asset->assetstatus->getStatuslabelType().')';
|
||||||
|
}
|
||||||
|
|
||||||
$asset->use_image = ($asset->getImageUrl()) ? $asset->getImageUrl() : null;
|
$asset->use_image = ($asset->getImageUrl()) ? $asset->getImageUrl() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue