Have UI reflect not being able to delete accessory
This commit is contained in:
parent
a19582a5f3
commit
f038254038
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ class AccessoriesTransformer
|
|||
'checkout' => Gate::allows('checkout', Accessory::class),
|
||||
'checkin' => false,
|
||||
'update' => Gate::allows('update', Accessory::class),
|
||||
'delete' => Gate::allows('delete', Accessory::class),
|
||||
'delete' => $accessory->checkouts_count === 0 && Gate::allows('delete', Accessory::class),
|
||||
'clone' => Gate::allows('create', Accessory::class),
|
||||
|
||||
];
|
||||
|
|
Loading…
Add table
Reference in a new issue