Browse Source

fix open scurve error

pull/1/head
wahyu 1 year ago
parent
commit
20326961e3
  1. 2
      app/Http/Controllers/ProjectController.php

2
app/Http/Controllers/ProjectController.php

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

Loading…
Cancel
Save