removed all lines options in production hourly chart
This commit is contained in:
@@ -88,6 +88,7 @@ class ModulePlantLineController extends Controller
|
||||
}
|
||||
|
||||
$plantName = $request->header('plant-name');
|
||||
$chartName = $request->header('chart-name');
|
||||
|
||||
if (empty($plantName)) {
|
||||
return response()->json([
|
||||
@@ -105,6 +106,8 @@ class ModulePlantLineController extends Controller
|
||||
], 404);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Load only lines NOT equal to FG Line
|
||||
$nonFgLines = Line::where('plant_id', $plant->id)
|
||||
->where('type', '!=', 'FG Line')
|
||||
@@ -119,8 +122,12 @@ class ModulePlantLineController extends Controller
|
||||
], 404);
|
||||
}
|
||||
|
||||
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');
|
||||
// array_unshift($nonFgLines, 'All Lines');
|
||||
$nonFgLines[] = 'FG Lines';
|
||||
|
||||
return response()->json([
|
||||
|
||||
Reference in New Issue
Block a user