Browse Source

Merge pull request 'Dev-Farhan' (#237) from Dev-Farhan into general

Reviewed-on: ordo/adw-backend#237
pull/3/head
farhantock 1 year ago
parent
commit
ca6fd54355
  1. 2
      app/Http/Controllers/ActivityController.php

2
app/Http/Controllers/ActivityController.php

@ -187,7 +187,7 @@ class ActivityController extends Controller
$actualStartValues = array_column(array_filter($dataFinal, function($item) { $actualStartValues = array_column(array_filter($dataFinal, function($item) {
return isset($item['actual_start']); return isset($item['actual_start']);
}), 'actual_start'); }), 'actual_start');
$returnActualStartOrEnd = min($actualStartValues); $returnActualStartOrEnd = count($actualStartValues) > 0 ? min($actualStartValues) : null;
if (isset($parent)) { if (isset($parent)) {
$parent->actual_start = $returnActualStartOrEnd; $parent->actual_start = $returnActualStartOrEnd;
$parent->save(); $parent->save();

Loading…
Cancel
Save