Browse Source

Merge pull request 'Adjusting daysof into php format' (#92) from dev-wahyu into staging

Reviewed-on: ordo/adw-backend#92
pull/3/head
ibnu 1 year ago
parent
commit
e58971a809
  1. 4
      app/Models/VersionGantt.php

4
app/Models/VersionGantt.php

@ -41,6 +41,10 @@ class VersionGantt extends Model
public function updateActDuration(){
$daysOff = explode(',', $this->config_dayoff);
if (in_array('0', $daysOff)) {
$key = array_search('0', $daysOff, false);
$daysOff[$key] = '7';
}
$activities = Activity::where('version_gantt_id', $this->id)->get();
foreach ($activities as $value) {
$startDate = new DateTime($value->start_date);

Loading…
Cancel
Save