Browse Source

Merge branch 'staging' of https://git.oslog.id/ordo/adw-backend into Dev-Farhan

pull/3/head
farhan048 1 year ago
parent
commit
629c2b63e9
  1. 11
      app/Http/Controllers/ActivityController.php
  2. 2
      app/Http/Controllers/DashboardBoDController.php
  3. 1
      routes/web.php

11
app/Http/Controllers/ActivityController.php

@ -527,6 +527,17 @@ class ActivityController extends Controller
return response()->json(['status' => 'success', 'code' => 200, 'data' => $dataGet, 'totalRecord' => $totalRecord], 200);
}
public function searchAnalysis(Request $request)
{
$dataBuilder = $this->setUpPayload($request->all(), 'm_activity');
$builder = $dataBuilder['builder'];
$dataGet = $builder->select('selfTable.*','m_version_gantt.name_version', 'm_users.name as user_name')
->join('m_version_gantt', 'm_version_gantt.id', '=', 'selfTable.version_gantt_id')
->join('assign_hr_to_activity', 'assign_hr_to_activity.activity_id', '=', 'selfTable.id')
->join('m_users', 'assign_hr_to_activity.user_id', '=', 'm_users.id')
->get();
return response()->json(['status' => 'success', 'code' => 200, 'data' => $dataGet ], 200);
}
// before upload file
public function importOld(Request $request)
{

2
app/Http/Controllers/DashboardBoDController.php

@ -304,7 +304,7 @@ class DashboardBoDController extends Controller
{
$year = $this->interpolateYear($year);
$divisions = Divisi::select('id', 'name')
$divisions = Divisi::select('id', 'name', 'color')
->with('children')
->whereNull('parent')
->get();

1
routes/web.php

@ -206,6 +206,7 @@ $router->group(['prefix'=>'api', 'middleware' => 'cors'], function () use ($rout
$router->get('/sumVolActualM/{id}', 'ActivityController@sumVolumeActualMaterial');
$router->get('/activity/{id}/{proyek_id}/get', 'ActivityController@getByGanttId');
$router->post('/activity/search', 'ActivityController@search');
$router->post('/activity/search-analysis', 'ActivityController@searchAnalysis');
$router->post('/activity/import', 'ActivityController@import');
$router->post('/activity/import-update', 'ActivityController@importUpdate');
$router->post('/activity/import-old', 'ActivityController@importOld');

Loading…
Cancel
Save