|
|
|
@ -393,14 +393,9 @@ class ProjectController extends Controller
|
|
|
|
|
|
|
|
|
|
public function setBaseline($gantt_id) |
|
|
|
|
{ |
|
|
|
|
$activities = Activity::where("version_gantt_id", $gantt_id)->orderBy('id')->get(); |
|
|
|
|
$activities = Activity::where("version_gantt_id", $gantt_id)->get(); |
|
|
|
|
|
|
|
|
|
foreach ($activities as $activity) { |
|
|
|
|
$successor = Link::where('t_activity_id', $activity->id)->first(); |
|
|
|
|
if ($successor) { |
|
|
|
|
$predecessor = Activity::find($successor->s_activity_id); |
|
|
|
|
$activity->start_date = $predecessor->end_date; |
|
|
|
|
} |
|
|
|
|
$activity->update([ |
|
|
|
|
"planned_start"=>$activity->start_date, |
|
|
|
|
"planned_end"=>$activity->end_date, |
|
|
|
|