|
|
@ -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(); |
|
|
|
$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(); |
|
|
|
$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()) { |
|
|
|
if($header = Activity::where('version_gantt_id', $this->version_gantt_id)->whereNull('parent_id')->first()) { |
|
|
|
$header->update([ |
|
|
|
$header->start_date = $earliestStartDate; |
|
|
|
"start_date" => $earliestStartDate, |
|
|
|
$header->end_date = $latestEndDate; |
|
|
|
"end_date" => $latestEndDate |
|
|
|
$header->saveQuietly(); |
|
|
|
]); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|