|
|
|
@ -54,7 +54,7 @@ class MasterFunctionsHelper {
|
|
|
|
|
if(!is_int($request)){ |
|
|
|
|
$dataPayload = $request->all(); |
|
|
|
|
if(isset($dataPayload['gantt_id'])){ |
|
|
|
|
$allGantt = $dataPayload['gantt_id']; |
|
|
|
|
$allGantt[] = $dataPayload['gantt_id']; |
|
|
|
|
}else{ |
|
|
|
|
$allGantt[] = MasterFunctionsHelper::getLatestGantt($dataPayload['project_id']); |
|
|
|
|
} |
|
|
|
@ -62,7 +62,15 @@ class MasterFunctionsHelper {
|
|
|
|
|
$allGantt[] = MasterFunctionsHelper::getLatestGantt($request); |
|
|
|
|
} |
|
|
|
|
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') { |
|
|
|
|
// to do |
|
|
|
|
return MasterFunctionsHelper::calculateProgressBasedOnSimple($gantt); |
|
|
|
|