Browse Source

update import

pull/3/head
Wahyu Ramadhan 1 year ago
parent
commit
4ccdb41f6a
  1. 7
      app/Http/Controllers/ActivityController.php

7
app/Http/Controllers/ActivityController.php

@ -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'];

Loading…
Cancel
Save