|
|
@ -54,7 +54,7 @@ class MasterFunctionsHelper { |
|
|
|
if(!is_int($request)){ |
|
|
|
if(!is_int($request)){ |
|
|
|
$dataPayload = $request->all(); |
|
|
|
$dataPayload = $request->all(); |
|
|
|
if(isset($dataPayload['gantt_id'])){ |
|
|
|
if(isset($dataPayload['gantt_id'])){ |
|
|
|
$allGantt = $dataPayload['gantt_id']; |
|
|
|
$allGantt[] = $dataPayload['gantt_id']; |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
$allGantt[] = MasterFunctionsHelper::getLatestGantt($dataPayload['project_id']); |
|
|
|
$allGantt[] = MasterFunctionsHelper::getLatestGantt($dataPayload['project_id']); |
|
|
|
} |
|
|
|
} |
|
|
@ -62,7 +62,15 @@ class MasterFunctionsHelper { |
|
|
|
$allGantt[] = MasterFunctionsHelper::getLatestGantt($request); |
|
|
|
$allGantt[] = MasterFunctionsHelper::getLatestGantt($request); |
|
|
|
} |
|
|
|
} |
|
|
|
foreach($allGantt as $gantt){ |
|
|
|
foreach($allGantt as $gantt){ |
|
|
|
$gantt = VersionGantt::where('id', $gantt['last_gantt_id'])->first()->toArray(); |
|
|
|
if (!isset($gantt['last_gantt_id'])) { |
|
|
|
|
|
|
|
$ganttId = $gantt; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$ganttId = $gantt['last_gantt_id']; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$gantt = VersionGantt::find($ganttId)->toArray(); |
|
|
|
|
|
|
|
// foreach ($gantt as $key => $value) { |
|
|
|
|
|
|
|
// Log::info('gantt '.$value.' index '.$key); |
|
|
|
|
|
|
|
// } |
|
|
|
if($gantt['calculation_type'] == 'simple') { |
|
|
|
if($gantt['calculation_type'] == 'simple') { |
|
|
|
// to do |
|
|
|
// to do |
|
|
|
return MasterFunctionsHelper::calculateProgressBasedOnSimple($gantt); |
|
|
|
return MasterFunctionsHelper::calculateProgressBasedOnSimple($gantt); |
|
|
|