From e5143a0ce8592cc4341c108296c3b5a6cc3c50d4 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Tue, 15 Jul 2025 09:39:22 +0530 Subject: [PATCH] removed fg line in plnt line controller --- app/Http/Controllers/ModulePlantLineController.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/ModulePlantLineController.php b/app/Http/Controllers/ModulePlantLineController.php index 18fc945..0b0347e 100644 --- a/app/Http/Controllers/ModulePlantLineController.php +++ b/app/Http/Controllers/ModulePlantLineController.php @@ -106,7 +106,8 @@ class ModulePlantLineController extends Controller $plant = Plant::where('name', $plantName)->first(); - if (!$plant) { + if (!$plant) + { return response()->json([ 'status_code' => 'ERROR', 'status_description' => "Plant '{$plantName}' not found!" @@ -115,7 +116,7 @@ class ModulePlantLineController extends Controller // Load only lines NOT equal to FG Line $nonFgLines = Line::where('plant_id', $plant->id) - ->where('type', '!=', 'FG Line') + //->where('type', '!=', 'FG Line') ->orderBy('created_at', 'asc') ->pluck('name') ->toArray(); @@ -127,13 +128,13 @@ class ModulePlantLineController extends Controller ], 404); } - if (strtolower(trim($chartName)) !== 'production hourly count') { + if (strtolower(trim($chartName)) != 'production hourly count') { array_unshift($nonFgLines, 'All Lines'); } // Add "All Lines" to beginning and "FG Lines" at the end // array_unshift($nonFgLines, 'All Lines'); - $nonFgLines[] = 'FG Line'; + // $nonFgLines[] = 'FG Line'; return response()->json([ 'status_code' => 'SUCCESS',