mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -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.asset_tag',
|
||||
'assets.model_id',
|
||||
]))->with('model')->RTD();
|
||||
'assets.status_id'
|
||||
])->with('model', 'assetstatus')->NotArchived());
|
||||
|
||||
|
||||
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
|
||||
foreach ($assets as $asset) {
|
||||
$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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue