1
0
forked from poc/pds

removed all lines options in production hourly chart

This commit is contained in:
dhanabalan
2025-07-12 11:35:30 +05:30
parent 7e317f6e5f
commit c8ea502833

View File

@@ -88,6 +88,7 @@ class ModulePlantLineController extends Controller
} }
$plantName = $request->header('plant-name'); $plantName = $request->header('plant-name');
$chartName = $request->header('chart-name');
if (empty($plantName)) { if (empty($plantName)) {
return response()->json([ return response()->json([
@@ -105,6 +106,8 @@ class ModulePlantLineController extends Controller
], 404); ], 404);
} }
// 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')
@@ -119,8 +122,12 @@ class ModulePlantLineController extends Controller
], 404); ], 404);
} }
// Add "All Lines" to beginning and "FG Lines" at the end 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
// array_unshift($nonFgLines, 'All Lines');
$nonFgLines[] = 'FG Lines'; $nonFgLines[] = 'FG Lines';
return response()->json([ return response()->json([