Browse Source

select activity

pull/3/head
wahyu 1 year ago
parent
commit
12edaab302
  1. 13
      app/Http/Controllers/ActivityController.php
  2. 1
      routes/web.php

13
app/Http/Controllers/ActivityController.php

@ -527,6 +527,19 @@ class ActivityController extends Controller
return response()->json(['status' => 'success', 'code' => 200, 'data' => $dataGet, 'totalRecord' => $totalRecord], 200); return response()->json(['status' => 'success', 'code' => 200, 'data' => $dataGet, 'totalRecord' => $totalRecord], 200);
} }
public function searchAnalysisPrep(Request $request)
{
$data = $request->all();
$dataGet = DB::table('m_activity')
->select('m_activity.name')
->where('m_activity.proyek_id', $data['columns'][0]['value'])
->where('m_activity.type_activity', 'task')
->where('m_activity.persentase_progress', '>', 0)
->groupByRaw('m_activity.name')
->get();
return response()->json(['status' => 'success', 'code' => 200, 'data' => $dataGet ], 200);
}
public function searchAnalysis(Request $request) public function searchAnalysis(Request $request)
{ {
$dataBuilder = $this->setUpPayload($request->all(), 'm_activity'); $dataBuilder = $this->setUpPayload($request->all(), 'm_activity');

1
routes/web.php

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

Loading…
Cancel
Save