mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Fixes checkout buttons on licenses list
This commit is contained in:
parent
6d53a5f58d
commit
59a4e161ff
|
@ -42,6 +42,7 @@ class LicensesTransformer
|
|||
'supplier' => ($license->supplier) ? ['id' => $license->supplier->id,'name'=> e($license->supplier->name)] : null,
|
||||
'created_at' => Helper::getFormattedDateObject($license->created_at, 'datetime'),
|
||||
'updated_at' => Helper::getFormattedDateObject($license->updated_at, 'datetime'),
|
||||
'user_can_checkout' => (bool) ($license->remaincount() > 0),
|
||||
];
|
||||
|
||||
$permissions_array['available_actions'] = [
|
||||
|
|
|
@ -102,16 +102,29 @@ class LicensePresenter extends Presenter
|
|||
"sortable" => true,
|
||||
"visible" => false,
|
||||
"title" => trans('general.order_number'),
|
||||
], [
|
||||
"field" => "actions",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"switchable" => false,
|
||||
"title" => trans('table.actions'),
|
||||
"formatter" => "licensesActionsFormatter",
|
||||
]
|
||||
];
|
||||
|
||||
$layout[] = [
|
||||
"field" => "checkincheckout",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"switchable" => true,
|
||||
"title" => 'Checkin/Checkout',
|
||||
"visible" => true,
|
||||
"formatter" => "licensesInOutFormatter",
|
||||
];
|
||||
|
||||
$layout[] = [
|
||||
"field" => "actions",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"switchable" => false,
|
||||
"title" => trans('table.actions'),
|
||||
"formatter" => "licensesActionsFormatter",
|
||||
];
|
||||
|
||||
|
||||
return json_encode($layout);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue