|
|
@ -216,7 +216,9 @@ class ActivityController extends Controller |
|
|
|
$data['created_by'] = $this->currentName; |
|
|
|
$data['created_by'] = $this->currentName; |
|
|
|
$max = Activity::where('version_gantt_id', $request->version_gantt_id)->max('sortorder'); |
|
|
|
$max = Activity::where('version_gantt_id', $request->version_gantt_id)->max('sortorder'); |
|
|
|
$data['sortorder'] = $max + 1; |
|
|
|
$data['sortorder'] = $max + 1; |
|
|
|
|
|
|
|
if (!isset($data['type_activity'])) { |
|
|
|
$data['type_activity'] = "task"; |
|
|
|
$data['type_activity'] = "task"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$parent = $data['parent_id'] ?? null; |
|
|
|
$parent = $data['parent_id'] ?? null; |
|
|
|
if ($parent) { |
|
|
|
if ($parent) { |
|
|
|