|
|
|
@ -396,9 +396,12 @@ class ActivityController extends Controller
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
$projectStart = Project::select('mulai_proyek')->where('id', $projectId)->first(); |
|
|
|
|
foreach ($data['activities'] as $i => $activity_row) { |
|
|
|
|
$startDate = \DateTime::createFromFormat('d-m-y', $activity_row['start_date']); |
|
|
|
|
$endDate = \DateTime::createFromFormat('d-m-y H:i:sO', $activity_row['end_date']); |
|
|
|
|
$startDate = \DateTime::createFromFormat('Y-m-d H:i:s.uP', $projectStart->mulai_proyek); |
|
|
|
|
$endDate = clone $startDate; |
|
|
|
|
$endDate->modify('+'.$activity_row['duration'].' days'); |
|
|
|
|
$endDate->setTime(23, 59, 59); |
|
|
|
|
$input['name'] = $activity_row['name']; |
|
|
|
|
$input['proyek_id'] = $projectId; |
|
|
|
|
$input['version_gantt_id'] = $data['ganttId']; |
|
|
|
|