Updated get api validation and model for relations
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Laravel Pint / pint (pull_request) Successful in 2m46s
Laravel Larastan / larastan (pull_request) Failing after 6m45s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Laravel Pint / pint (pull_request) Successful in 2m46s
Laravel Larastan / larastan (pull_request) Failing after 6m45s
This commit is contained in:
@@ -115,6 +115,14 @@ class TestingLineVisualizationController extends Controller
|
|||||||
], 404);
|
], 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$jobAgaPlant = TestingLineVisualization::first();
|
||||||
|
if (! $jobAgaPlant) {
|
||||||
|
return response()->json([
|
||||||
|
'status_code' => 'ERROR',
|
||||||
|
'status_description' => 'Reports not found in testing line visualization table!',
|
||||||
|
], 404);
|
||||||
|
}
|
||||||
|
|
||||||
$jobAgaPlant = TestingLineVisualization::where('plant_id', $plantId)->first();
|
$jobAgaPlant = TestingLineVisualization::where('plant_id', $plantId)->first();
|
||||||
if (! $jobAgaPlant) {
|
if (! $jobAgaPlant) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
|
|||||||
@@ -222,6 +222,11 @@ class Plant extends Model
|
|||||||
return $this->hasMany(BeforeTestReading::class, 'plant_id', 'id');
|
return $this->hasMany(BeforeTestReading::class, 'plant_id', 'id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testingLineVisualizations()
|
||||||
|
{
|
||||||
|
return $this->hasMany(TestingLineVisualization::class, 'plant_id', 'id');
|
||||||
|
}
|
||||||
|
|
||||||
public function asrsItemValidations()
|
public function asrsItemValidations()
|
||||||
{
|
{
|
||||||
return $this->hasMany(AsrsItemValidation::class, 'plant_id', 'id');
|
return $this->hasMany(AsrsItemValidation::class, 'plant_id', 'id');
|
||||||
|
|||||||
Reference in New Issue
Block a user