|
|
|
@ -329,15 +329,18 @@ class ProjectController extends Controller
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function sCurveCommand(Request $request){ |
|
|
|
|
$project = Project::find($request->project_id); |
|
|
|
|
Artisan::call('calculate:scurve', [ |
|
|
|
|
'project_id' => $request->project_id |
|
|
|
|
]); |
|
|
|
|
// $project = Project::find($request->project_id); |
|
|
|
|
|
|
|
|
|
if ($project) { |
|
|
|
|
dispatch(new ProcessSCurve($project)); |
|
|
|
|
// if ($project) { |
|
|
|
|
// dispatch(new ProcessSCurve($project)); |
|
|
|
|
|
|
|
|
|
return response()->json(['message' => 'S Curve calculation queued']); |
|
|
|
|
} |
|
|
|
|
// return response()->json(['message' => 'S Curve calculation queued']); |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
return response()->json(['message' => 'Project not found'], 404); |
|
|
|
|
// return response()->json(['message' => 'Project not found'], 404); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function getLinearSCurve(Request $request){ |
|
|
|
|