diff --git a/app/Http/Transformers/AssetMaintenancesTransformer.php b/app/Http/Transformers/AssetMaintenancesTransformer.php index 114a2cc44d..88ac447c25 100644 --- a/app/Http/Transformers/AssetMaintenancesTransformer.php +++ b/app/Http/Transformers/AssetMaintenancesTransformer.php @@ -72,7 +72,7 @@ class AssetMaintenancesTransformer ]; $permissions_array['available_actions'] = [ - 'update' => Gate::allows('update', Asset::class), + 'update' => (Gate::allows('update', Asset::class) && ($assetmaintenance->asset->deleted_at=='')) ? true : false, 'delete' => Gate::allows('delete', Asset::class), ];