|
|
@ -127,6 +127,13 @@ class Activity extends Model |
|
|
|
if($parent = Activity::find($this->parent_id)){ |
|
|
|
if($parent = Activity::find($this->parent_id)){ |
|
|
|
$parentActWeight = $parent->bobot_planning; |
|
|
|
$parentActWeight = $parent->bobot_planning; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($parentActWeight == 0) { |
|
|
|
|
|
|
|
$parent->update([ |
|
|
|
|
|
|
|
"persentase_progress" => 0 |
|
|
|
|
|
|
|
]); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$totalChildProportionalProgress = 0; |
|
|
|
$totalChildProportionalProgress = 0; |
|
|
|
$childs = Activity::where("parent_id", $parent->id)->get(); |
|
|
|
$childs = Activity::where("parent_id", $parent->id)->get(); |
|
|
|
foreach($childs as $child){ |
|
|
|
foreach($childs as $child){ |
|
|
|