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

This commit is contained in:
dhanabalan
2026-11-03 11:22:36 +05:30
parent 5c0ed45f74
commit a826dc4785
2 changed files with 13 additions and 0 deletions

View File

@@ -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([

View File

@@ -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');