|
|
|
@ -99,11 +99,8 @@ class MasterFunctionsHelper {
|
|
|
|
|
$maxDate = Project::select('akhir_proyek')->where('id', $request->project_id)->first(); |
|
|
|
|
|
|
|
|
|
$begin = new \DateTime($minDate->mulai_proyek. ' Monday'); |
|
|
|
|
$begin->modify('last Monday'); |
|
|
|
|
|
|
|
|
|
$end = new \DateTime($maxDate->akhir_proyek. ' Friday'); |
|
|
|
|
$end->modify('next Friday'); |
|
|
|
|
$end->modify('next Friday'); |
|
|
|
|
|
|
|
|
|
$interval = new \DateInterval('P7D'); |
|
|
|
|
|
|
|
|
@ -118,13 +115,14 @@ class MasterFunctionsHelper {
|
|
|
|
|
$dates = []; |
|
|
|
|
$tempProgress = 0; |
|
|
|
|
$tempPlanning = 0; |
|
|
|
|
|
|
|
|
|
array_push($progressData, round($tempProgress, 2)); |
|
|
|
|
array_push($planningData, round($tempPlanning, 2)); |
|
|
|
|
foreach($period as $p){ |
|
|
|
|
array_push($progressData, $tempProgress); |
|
|
|
|
array_push($planningData, $tempPlanning); |
|
|
|
|
array_push($dates, $p->format("Y-m-d")); |
|
|
|
|
$tempProgress += $avgProgress; |
|
|
|
|
$tempPlanning += $avgPlanning; |
|
|
|
|
array_push($progressData, round($tempProgress, 2)); |
|
|
|
|
array_push($planningData, round($tempPlanning, 2)); |
|
|
|
|
array_push($dates, $p->format("Y-m-d")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$dataResponse = array( |
|
|
|
|