|
|
@ -41,6 +41,10 @@ class VersionGantt extends Model |
|
|
|
|
|
|
|
|
|
|
|
public function updateActDuration(){ |
|
|
|
public function updateActDuration(){ |
|
|
|
$daysOff = explode(',', $this->config_dayoff); |
|
|
|
$daysOff = explode(',', $this->config_dayoff); |
|
|
|
|
|
|
|
if (in_array('0', $daysOff)) { |
|
|
|
|
|
|
|
$key = array_search('0', $daysOff, false); |
|
|
|
|
|
|
|
$daysOff[$key] = '7'; |
|
|
|
|
|
|
|
} |
|
|
|
$activities = Activity::where('version_gantt_id', $this->id)->get(); |
|
|
|
$activities = Activity::where('version_gantt_id', $this->id)->get(); |
|
|
|
foreach ($activities as $value) { |
|
|
|
foreach ($activities as $value) { |
|
|
|
$startDate = new DateTime($value->start_date); |
|
|
|
$startDate = new DateTime($value->start_date); |
|
|
|