2016-12-23 17:52:00 -08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Presenters;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class DepreciationPresenter
|
|
|
|
*/
|
|
|
|
class DepreciationPresenter extends Presenter
|
|
|
|
{
|
2021-01-27 17:44:05 -08:00
|
|
|
/**
|
|
|
|
* Json Column Layout for bootstrap table
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public static function dataTableLayout()
|
|
|
|
{
|
|
|
|
$layout = [
|
|
|
|
[
|
2021-06-10 13:15:52 -07:00
|
|
|
'field' => 'id',
|
|
|
|
'searchable' => false,
|
|
|
|
'sortable' => true,
|
|
|
|
'switchable' => true,
|
|
|
|
'title' => trans('general.id'),
|
|
|
|
'visible' => false,
|
2021-01-27 17:44:05 -08:00
|
|
|
], [
|
2021-06-10 13:15:52 -07:00
|
|
|
'field' => 'name',
|
|
|
|
'searchable' => true,
|
|
|
|
'sortable' => true,
|
2024-03-20 14:25:50 -07:00
|
|
|
'switchable' => false,
|
2021-06-10 13:15:52 -07:00
|
|
|
'title' => trans('general.name'),
|
|
|
|
'visible' => true,
|
|
|
|
'formatter' => 'depreciationsLinkFormatter',
|
2021-01-27 17:44:05 -08:00
|
|
|
],
|
|
|
|
|
|
|
|
[
|
2021-06-10 13:15:52 -07:00
|
|
|
'field' => 'months',
|
|
|
|
'searchable' => true,
|
|
|
|
'sortable' => true,
|
|
|
|
'title' => trans('admin/depreciations/table.term'),
|
|
|
|
'visible' => true,
|
2021-01-27 17:44:05 -08:00
|
|
|
],
|
|
|
|
|
2021-08-16 18:14:10 -07:00
|
|
|
[
|
|
|
|
"field" => 'depreciation_min',
|
|
|
|
"searchable" => false,
|
|
|
|
"sortable" => true,
|
|
|
|
"title" => trans('admin/depreciations/table.depreciation_min'),
|
|
|
|
"visible" => true,
|
|
|
|
],
|
2024-08-28 04:38:43 -07:00
|
|
|
[
|
|
|
|
'field' => 'assets_count',
|
|
|
|
'searchable' => false,
|
|
|
|
'sortable' => true,
|
|
|
|
'title' => trans('general.assets'),
|
|
|
|
'visible' => true,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'field' => 'models_count',
|
|
|
|
'searchable' => false,
|
|
|
|
'sortable' => true,
|
|
|
|
'title' => trans('general.asset_models'),
|
|
|
|
'visible' => true,
|
|
|
|
], [
|
|
|
|
'field' => 'licenses_count',
|
|
|
|
'searchable' => false,
|
|
|
|
'sortable' => true,
|
|
|
|
'title' => trans('general.licenses'),
|
|
|
|
'visible' => true,
|
2024-09-17 14:16:41 -07:00
|
|
|
],[
|
|
|
|
'field' => 'created_by',
|
|
|
|
'searchable' => false,
|
|
|
|
'sortable' => true,
|
|
|
|
'title' => trans('general.created_by'),
|
|
|
|
'visible' => false,
|
|
|
|
'formatter' => 'usersLinkObjFormatter',
|
|
|
|
], [
|
|
|
|
'field' => 'created_at',
|
|
|
|
'searchable' => true,
|
|
|
|
'sortable' => true,
|
|
|
|
'switchable' => true,
|
|
|
|
'title' => trans('general.created_at'),
|
|
|
|
'visible' => false,
|
|
|
|
'formatter' => 'dateDisplayFormatter',
|
|
|
|
], [
|
|
|
|
'field' => 'updated_at',
|
|
|
|
'searchable' => true,
|
|
|
|
'sortable' => true,
|
|
|
|
'switchable' => true,
|
|
|
|
'title' => trans('general.updated_at'),
|
|
|
|
'visible' => false,
|
|
|
|
'formatter' => 'dateDisplayFormatter',
|
|
|
|
], [
|
2021-06-10 13:15:52 -07:00
|
|
|
'field' => 'actions',
|
|
|
|
'searchable' => false,
|
|
|
|
'sortable' => false,
|
|
|
|
'switchable' => false,
|
|
|
|
'title' => trans('table.actions'),
|
|
|
|
'visible' => true,
|
|
|
|
'formatter' => 'depreciationsActionsFormatter',
|
|
|
|
],
|
2021-01-27 17:44:05 -08:00
|
|
|
];
|
|
|
|
|
|
|
|
return json_encode($layout);
|
|
|
|
}
|
2016-12-23 17:52:00 -08:00
|
|
|
}
|