|
@@ -451,11 +451,7 @@ class ProjectController extends Controller
|
|
|
|
|
|
public function notLinkAssetRequirement(string $id)
|
|
|
{
|
|
|
- $isAction=true;
|
|
|
- $project = Project::allowed($id,$isAction)->find($id);
|
|
|
- if($project==null){
|
|
|
- return $this->badRequest('Permission denied or project not found. Please contact the administrator.');
|
|
|
- };
|
|
|
+ $project = Project::allowed($id)->findOrFail($id);;
|
|
|
|
|
|
$requirements = $project->assets
|
|
|
? Requirement::query()->whereIn('asset_id', $project->assets?->pluck('id')->toArray())->whereNotIn('id', $project->requirements?->pluck('id')->toArray())->simplePaginate()
|