mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Added warranty and expiration to list view
This commit is contained in:
parent
32b2f77ad9
commit
37868cd70e
|
@ -70,7 +70,8 @@ class AssetsController extends Controller
|
|||
'created_at',
|
||||
'updated_at',
|
||||
'purchase_date',
|
||||
'purchase_cost'
|
||||
'purchase_cost',
|
||||
'warranty_months',
|
||||
];
|
||||
|
||||
$filter = array();
|
||||
|
|
|
@ -64,7 +64,7 @@ class AssetsTransformer
|
|||
] : null,
|
||||
'image' => ($asset->getImageUrl()) ? $asset->getImageUrl() : null,
|
||||
'assigned_to' => $this->transformAssignedTo($asset),
|
||||
'warranty' => ($asset->warranty_months > 0) ? e($asset->warranty_months . ' ' . trans('admin/hardware/form.months')) : null,
|
||||
'warranty_months' => ($asset->warranty_months > 0) ? e($asset->warranty_months . ' ' . trans('admin/hardware/form.months')) : null,
|
||||
'warranty_expires' => ($asset->warranty_months > 0) ? Helper::getFormattedDateObject($asset->warranty_expires, 'date') : null,
|
||||
'created_at' => Helper::getFormattedDateObject($asset->created_at, 'datetime'),
|
||||
'updated_at' => Helper::getFormattedDateObject($asset->updated_at, 'datetime'),
|
||||
|
|
|
@ -148,6 +148,19 @@ class AssetPresenter extends Presenter
|
|||
"title" => trans('general.order_number'),
|
||||
'formatter' => "orderNumberObjFilterFormatter"
|
||||
], [
|
||||
"field" => "warranty_months",
|
||||
"searchable" => true,
|
||||
"sortable" => true,
|
||||
"visible" => false,
|
||||
"title" => trans('admin/hardware/form.warranty')
|
||||
],[
|
||||
"field" => "warranty_expires",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"visible" => false,
|
||||
"title" => 'Warranty Expires',
|
||||
"formatter" => "dateDisplayFormatter"
|
||||
],[
|
||||
"field" => "notes",
|
||||
"searchable" => true,
|
||||
"sortable" => true,
|
||||
|
|
Loading…
Reference in a new issue