|
|
|
@ -151,7 +151,10 @@ class ActivityController extends Controller
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function getActivityFirst($parentId){ |
|
|
|
|
$activity = Activity::where('parent_id', $parentId)->orderByRaw('start_date ASC')->first(); |
|
|
|
|
$activity = Activity::where('parent_id', $parentId)->orderByRaw('actual_start ASC')->first(); |
|
|
|
|
if (!isset($activity)) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
if($activity->type_activity == "task"){ |
|
|
|
|
// Log::info("activity ", [$activity]); |
|
|
|
|
return $activity->actual_start; |
|
|
|
@ -162,7 +165,10 @@ class ActivityController extends Controller
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function getActivityLast($parentId){ |
|
|
|
|
$activity = Activity::where('parent_id', $parentId)->orderByRaw('start_date DESC')->first(); |
|
|
|
|
$activity = Activity::where('parent_id', $parentId)->orderByRaw('actual_start DESC')->first(); |
|
|
|
|
if (!isset($activity)) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
if($activity->type_activity == "task"){ |
|
|
|
|
// Log::info("activity ", [$activity]); |
|
|
|
|
return $activity->actual_end; |
|
|
|
|