From 4293e375b7c1e2f1a1d4e547e058d7f822821af4 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Thu, 27 Jul 2023 10:36:26 +0700 Subject: [PATCH] Fix set baseline --- app/Http/Controllers/ProjectController.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index d1d58b2..6e8ca66 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -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,