mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-23 12:44:12 -08:00
parent
7225b53986
commit
3fbfb0c658
|
@ -30,7 +30,7 @@ class AssetModelsController extends Controller
|
|||
public function index(Request $request)
|
||||
{
|
||||
$this->authorize('view', AssetModel::class);
|
||||
$allowed_columns = ['id','image','name','model_number','eol','notes','created_at','manufacturer','assets_count'];
|
||||
$allowed_columns = ['id','image','name','model_number','eol','notes','created_at','manufacturer','requestable', 'assets_count'];
|
||||
|
||||
$assetmodels = AssetModel::select([
|
||||
'models.id',
|
||||
|
@ -38,6 +38,7 @@ class AssetModelsController extends Controller
|
|||
'models.name',
|
||||
'model_number',
|
||||
'eol',
|
||||
'requestable',
|
||||
'models.notes',
|
||||
'models.created_at',
|
||||
'category_id',
|
||||
|
|
|
@ -45,6 +45,7 @@ class AssetModelsTransformer
|
|||
'name'=> e($assetmodel->fieldset->name)
|
||||
] : null,
|
||||
'eol' => ($assetmodel->eol > 0) ? $assetmodel->eol .' months': 'None',
|
||||
'requestable' => ($assetmodel->requestable =='1') ? true : false,
|
||||
'notes' => e($assetmodel->notes),
|
||||
'created_at' => Helper::getFormattedDateObject($assetmodel->created_at, 'datetime'),
|
||||
'updated_at' => Helper::getFormattedDateObject($assetmodel->updated_at, 'datetime'),
|
||||
|
|
Loading…
Reference in a new issue