|
|
|
@ -166,8 +166,8 @@ class Activity extends Model
|
|
|
|
|
|
|
|
|
|
private function updateStartEndDateHeader() |
|
|
|
|
{ |
|
|
|
|
$earliestStartDate = Activity::where('version_gantt_id', $this->version_gantt_id)->oldest('start_date')->pluck('start_date')->first(); |
|
|
|
|
$latestEndDate = Activity::where('version_gantt_id', $this->version_gantt_id)->latest('end_date')->pluck('end_date')->first(); |
|
|
|
|
$earliestStartDate = Activity::where('version_gantt_id', $this->version_gantt_id)->whereNotNull('parent_id')->oldest('start_date')->pluck('start_date')->first(); |
|
|
|
|
$latestEndDate = Activity::where('version_gantt_id', $this->version_gantt_id)->whereNotNull('parent_id')->latest('end_date')->pluck('end_date')->first(); |
|
|
|
|
if($header = Activity::where('version_gantt_id', $this->version_gantt_id)->whereNull('parent_id')->first()) { |
|
|
|
|
$header->update([ |
|
|
|
|
"start_date" => $earliestStartDate, |
|
|
|
|