|
|
|
@ -169,10 +169,9 @@ class Activity extends Model
|
|
|
|
|
$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, |
|
|
|
|
"end_date" => $latestEndDate |
|
|
|
|
]); |
|
|
|
|
$header->start_date = $earliestStartDate; |
|
|
|
|
$header->end_date = $latestEndDate; |
|
|
|
|
$header->saveQuietly(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|