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');
$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([