Browse Source

Merge pull request 'dev-wahyu' (#17) from dev-wahyu into staging

Reviewed-on: ordo/adw-backend#17
Reviewed-by: ibnu <ibnu@mail.com>
pull/3/head
ibnu 2 years ago
parent
commit
ad31bb0692
  1. 2
      app/Http/Controllers/ActivityController.php
  2. 5
      app/Http/Controllers/HierarchyFtthController.php

2
app/Http/Controllers/ActivityController.php

@ -132,7 +132,7 @@ class ActivityController extends Controller
'start_date'=> $project->mulai_proyek,
'end_date'=> $project->akhir_proyek,
'rencana_biaya'=> $project->rencana_biaya,
'type_activity'=> 'header',
'type_activity'=> 'project',
'created_by'=>$this->currentName,
]);

5
app/Http/Controllers/HierarchyFtthController.php

@ -118,11 +118,14 @@ class HierarchyFtthController extends Controller
$data = HierarchyFtth::where('project_id', $project_id)->where('parent_id', $parent_id)->orderByRaw('id ASC')->get();
foreach($data as $objRow){
$objRow->key = rand(1, 1000);
if (VersionGantt::where('hierarchy_ftth_id', $objRow->id)->exists()) {
$dataGantt = VersionGantt::where('hierarchy_ftth_id', $objRow->id)->get();
foreach ($dataGantt as $gantt) {
$gantt->key = $objRow->key;
}
$objRow->dataGantt = $dataGantt;
}
$objRow->key = rand(1, 1000);
$objRow->children = $this->getChildren($project_id, $objRow->id);
$finalData[] = $objRow;
}

Loading…
Cancel
Save