removed fg line in plnt line controller
This commit is contained in:
@@ -106,7 +106,8 @@ class ModulePlantLineController extends Controller
|
|||||||
|
|
||||||
$plant = Plant::where('name', $plantName)->first();
|
$plant = Plant::where('name', $plantName)->first();
|
||||||
|
|
||||||
if (!$plant) {
|
if (!$plant)
|
||||||
|
{
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status_code' => 'ERROR',
|
'status_code' => 'ERROR',
|
||||||
'status_description' => "Plant '{$plantName}' not found!"
|
'status_description' => "Plant '{$plantName}' not found!"
|
||||||
@@ -115,7 +116,7 @@ class ModulePlantLineController extends Controller
|
|||||||
|
|
||||||
// Load only lines NOT equal to FG Line
|
// Load only lines NOT equal to FG Line
|
||||||
$nonFgLines = Line::where('plant_id', $plant->id)
|
$nonFgLines = Line::where('plant_id', $plant->id)
|
||||||
->where('type', '!=', 'FG Line')
|
//->where('type', '!=', 'FG Line')
|
||||||
->orderBy('created_at', 'asc')
|
->orderBy('created_at', 'asc')
|
||||||
->pluck('name')
|
->pluck('name')
|
||||||
->toArray();
|
->toArray();
|
||||||
@@ -127,13 +128,13 @@ class ModulePlantLineController extends Controller
|
|||||||
], 404);
|
], 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strtolower(trim($chartName)) !== 'production hourly count') {
|
if (strtolower(trim($chartName)) != 'production hourly count') {
|
||||||
array_unshift($nonFgLines, 'All Lines');
|
array_unshift($nonFgLines, 'All Lines');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add "All Lines" to beginning and "FG Lines" at the end
|
// Add "All Lines" to beginning and "FG Lines" at the end
|
||||||
// array_unshift($nonFgLines, 'All Lines');
|
// array_unshift($nonFgLines, 'All Lines');
|
||||||
$nonFgLines[] = 'FG Line';
|
// $nonFgLines[] = 'FG Line';
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status_code' => 'SUCCESS',
|
'status_code' => 'SUCCESS',
|
||||||
|
|||||||
Reference in New Issue
Block a user