|
|
@ -10,6 +10,7 @@ use App\Models\User; |
|
|
|
use App\Models\UserToVersionGantt; |
|
|
|
use App\Models\UserToVersionGantt; |
|
|
|
use Illuminate\Support\Collection; |
|
|
|
use Illuminate\Support\Collection; |
|
|
|
use Illuminate\Support\Facades\DB; |
|
|
|
use Illuminate\Support\Facades\DB; |
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Log; |
|
|
|
|
|
|
|
|
|
|
|
class DashboardBoDController extends Controller |
|
|
|
class DashboardBoDController extends Controller |
|
|
|
{ |
|
|
|
{ |
|
|
@ -130,8 +131,10 @@ class DashboardBoDController extends Controller |
|
|
|
$project->scurve = MasterFunctionsHelper::getSCurve($project->id); |
|
|
|
$project->scurve = MasterFunctionsHelper::getSCurve($project->id); |
|
|
|
$selisihProgress = 0; |
|
|
|
$selisihProgress = 0; |
|
|
|
if($project->scurve && $project->scurve[0]){ |
|
|
|
if($project->scurve && $project->scurve[0]){ |
|
|
|
$planningProgress = $project->scurve[0]['data']['percentagePlan'][count($project->scurve[0]['data']['percentagePlan'])-1]; |
|
|
|
$planningArray = $project->scurve[0]['data']['percentagePlan']; |
|
|
|
$actualProgress = $project->scurve[0]['data']['percentageReal'][count($project->scurve[0]['data']['percentageReal'])-1]; |
|
|
|
$actualArray = $project->scurve[0]['data']['percentageReal']; |
|
|
|
|
|
|
|
$planningProgress = !empty($planningArray) ? $planningArray[count($planningArray) - 1] : 0; |
|
|
|
|
|
|
|
$actualProgress = !empty($actualArray) ? $actualArray[count($actualArray) - 1] : 0; |
|
|
|
} |
|
|
|
} |
|
|
|
$selisihProgress = $planningProgress - $actualProgress; |
|
|
|
$selisihProgress = $planningProgress - $actualProgress; |
|
|
|
try { |
|
|
|
try { |
|
|
|