Removed new checkbox selectability on users and assets - more complicated work to be done

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-02-20 16:41:58 +00:00
parent 9b146ae1d2
commit c3f21d9292
4 changed files with 2 additions and 6 deletions

View file

@ -148,7 +148,6 @@ class AssetsTransformer
'restore' => ($asset->deleted_at!='' && Gate::allows('create', Asset::class)) ? true : false, 'restore' => ($asset->deleted_at!='' && Gate::allows('create', Asset::class)) ? true : false,
'update' => ($asset->deleted_at=='' && Gate::allows('update', Asset::class)) ? true : false, 'update' => ($asset->deleted_at=='' && Gate::allows('update', Asset::class)) ? true : false,
'delete' => ($asset->deleted_at=='' && $asset->assigned_to =='' && Gate::allows('delete', Asset::class) && ($asset->deleted_at == '')) ? true : false, 'delete' => ($asset->deleted_at=='' && $asset->assigned_to =='' && Gate::allows('delete', Asset::class) && ($asset->deleted_at == '')) ? true : false,
'selectable' => ($asset->deleted_at=='' && $asset->assigned_to =='' && Gate::allows('delete', Asset::class) && ($asset->deleted_at == '')) ? true : false,
]; ];

View file

@ -82,7 +82,6 @@ class UsersTransformer
'delete' => $user->isDeletable(), 'delete' => $user->isDeletable(),
'clone' => (Gate::allows('create', User::class) && ($user->deleted_at == '')), 'clone' => (Gate::allows('create', User::class) && ($user->deleted_at == '')),
'restore' => (Gate::allows('create', User::class) && ($user->deleted_at != '')), 'restore' => (Gate::allows('create', User::class) && ($user->deleted_at != '')),
'selectable' => $user->isDeletable(),
]; ];
$array += $permissions_array; $array += $permissions_array;

View file

@ -19,9 +19,8 @@ class AssetPresenter extends Presenter
{ {
$layout = [ $layout = [
[ [
'field' => 'bulk_selectable', 'field' => 'checkbox',
'checkbox' => true, 'checkbox' => true,
'formatter' => 'checkboxEnabledFormatter',
], [ ], [
'field' => 'id', 'field' => 'id',
'searchable' => false, 'searchable' => false,

View file

@ -22,9 +22,8 @@ class UserPresenter extends Presenter
{ {
$layout = [ $layout = [
[ [
'field' => 'bulk_selectable', 'field' => 'checkbox',
'checkbox' => true, 'checkbox' => true,
'formatter' => 'checkboxEnabledFormatter',
], ],
[ [
'field' => 'id', 'field' => 'id',