Browse Source

fix s-curve

pull/3/head
Muhammad Sulaiman Yusuf 2 years ago committed by Gitea
parent
commit
514c0a1468
  1. 12
      app/Http/Controllers/ActivityController.php

12
app/Http/Controllers/ActivityController.php

@ -1,4 +1,4 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\Activity; use App\Models\Activity;
@ -136,7 +136,7 @@ class ActivityController extends Controller
->whereNull('parent_id') ->whereNull('parent_id')
->orderByRaw('id ASC') ->orderByRaw('id ASC')
->get(); ->get();
foreach($resultTypeProject as $objRow){ foreach($resultTypeProject as $objRow){
$childActivities = TemplateGantt::where("parent_id", $objRow->id)->count(); $childActivities = TemplateGantt::where("parent_id", $objRow->id)->count();
$resultNew = Activity::create([ $resultNew = Activity::create([
@ -438,7 +438,7 @@ class ActivityController extends Controller
$end = new \DateTime($maxDate); $end = new \DateTime($maxDate);
$end2 = new \DateTime($maxDate); $end2 = new \DateTime($maxDate);
$interval = \DateInterval::createFromDateString('1 day'); $interval = \DateInterval::createFromDateString('1 day');
$period = new \DatePeriod($begin, $interval, $end); $period = new \DatePeriod($begin->modify('-1 days'), $interval, $end);
$arr_ActualM = []; $arr_ActualM = [];
$tempDate = []; $tempDate = [];
$tempPercentage = []; $tempPercentage = [];
@ -461,11 +461,9 @@ class ActivityController extends Controller
->join('m_activity as a', 'a.id', '=', 'ram.activity_id') ->join('m_activity as a', 'a.id', '=', 'ram.activity_id')
->where('a.version_gantt_id', '=', $keyGantt['last_gantt_id']) ->where('a.version_gantt_id', '=', $keyGantt['last_gantt_id'])
->where('a.proyek_id', '=', $keyGantt['proyek_id']) ->where('a.proyek_id', '=', $keyGantt['proyek_id'])
/* ->whereDate('ram.report_date', $dt->format("Y-m-d")) */ ->whereDate('ram.report_date', $dt->format("Y-m-d"))
->whereDate('ram.report_date', '2021-11-08') /* ->whereDate('ram.report_date', '2021-11-08') */
->get(); ->get();
/* dd($dt->format('Y-m-d')); */
dd($dataActualM);
$dataTempPlan = []; $dataTempPlan = [];
$x = 0; $x = 0;
$sumPercentagePlan=0; $sumPercentagePlan=0;

Loading…
Cancel
Save