Browse Source

Merge pull request 'dev-wahyu' (#306) from dev-wahyu into staging

Reviewed-on: ordo/adw-backend#306
pull/1/head
farhantock 1 year ago
parent
commit
95be6d8769
  1. 4
      app/Helpers/MasterFunctionsHelper.php
  2. 2
      app/Http/Controllers/ProjectController.php

4
app/Helpers/MasterFunctionsHelper.php

@ -560,7 +560,6 @@ class MasterFunctionsHelper
// if (new \DateTime($loopDay) < $today) {
// $statusCutOfDate = true;
// }
if (new \DateTime($loopDay) == new \DateTime($loopDay . ' Friday')) {
$progressPlanKomulatifWeek[] += round($tmpProgressPlanWeek,2);
if (new \DateTime($loopDay . ' Friday') <= new \DateTime($today . ' Friday')) {
@ -568,7 +567,6 @@ class MasterFunctionsHelper
$progressActualKomulatifWeek[] += round($tmpProgressActualWeek, 2);
}
$dateWeek[] = [$loopDay];
}
// $progressPlanKomulatifWeek[] += $tmpProgressPlanWeek;
foreach ($dataPlanM as $keyPlanM) {
# hitung untuk persentase progress planning
@ -1442,7 +1440,6 @@ class MasterFunctionsHelper
$dataActivityPlan = [];
$dataActivityActual = [];
$today = date('Y-m-d');
if (new \DateTime($loopDay) == new \DateTime($loopDay . ' Friday')) {
$progressPlanKomulatifWeek[] += round($tmpProgressPlanWeek,2);
if (new \DateTime($loopDay . ' Friday') <= new \DateTime($today . ' Friday')) {
@ -1450,7 +1447,6 @@ class MasterFunctionsHelper
$progressActualKomulatifWeek[] += round($tmpProgressActualWeek, 2);
}
$dateWeek[] = [$loopDay];
}
// $progressPlanKomulatifWeek[] += $tmpProgressPlanWeek;
// if (count($dataPlanM) > 0 && count($dataPlanM[0]) > 0) {
foreach ($dataPlanM as $keyPlanM) {

2
app/Http/Controllers/ProjectController.php

@ -626,10 +626,12 @@ class ProjectController extends Controller
$plannedEnd = Activity::where('version_gantt_id', $ganttId)
->orderByDesc('planned_end')
->value('planned_end');
if (isset($result->header)) {
$result->header->start_date = $startDate;
$result->header->end_date = $maxEndDate->end_date;
$result->header->planned_start = $plannedStart;
$result->header->planned_end = $plannedEnd;
}
return response()->json(['status'=>'success','code'=> 200,'data'=>$result, 'gantt'=>$ganttId], 200);
}

Loading…
Cancel
Save