A free open source IT asset/license management system
Use isDeletable for delete ability status
snipefdfae9593d8c
diff --git a/app/Http/Transformers/LicensesTransformer.php b/app/Http/Transformers/LicensesTransformer.phpindex fa595c96ca..21b837582b 100644--- a/app/Http/Transformers/LicensesTransformer.php+++ b/app/Http/Transformers/LicensesTransformer.php@@ -75,7 +75,10 @@ class LicensesTransformer'checkin' => Gate::allows('checkin', License::class),'clone' => Gate::allows('create', License::class),'update' => Gate::allows('update', License::class),- 'delete' => (Gate::allows('delete', License::class) && ($license->free_seats_count == $license->seats)) ? true : false,+ 'delete' => $license->isDeletable(),+ 'bulk_selectable' => [+ 'delete' => $license->isDeletable(),+ ],];$array += $permissions_array;