Browse Source

Merge pull request 'staging upload 23-06-02' (#67) from staging into master

Reviewed-on: ordo/adw-backend#67
pull/3/head
ibnu 1 year ago
parent
commit
8f38742818
  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