Browse Source

add sponsor

pull/1/head
farhantock 10 months ago
parent
commit
caac6506f8
  1. 8
      app/Http/Controllers/ProjectController.php
  2. 3
      app/Models/Project.php
  3. 20
      routes/web.php

8
app/Http/Controllers/ProjectController.php

@ -123,7 +123,8 @@ class ProjectController extends Controller
'phase_id', 'phase_id',
'calculation_status', 'calculation_status',
'md.name as divisi_name', 'md.name as divisi_name',
'nickname' 'nickname',
'sponsor'
) )
->join('m_divisi as md', 'md.id', '=', 'm_proyek.divisi_id') ->join('m_divisi as md', 'md.id', '=', 'm_proyek.divisi_id')
->where('m_proyek.id', $id) ->where('m_proyek.id', $id)
@ -322,7 +323,8 @@ class ProjectController extends Controller
'created_at', 'created_at',
'created_by', 'created_by',
'updated_at', 'updated_at',
'updated_by' 'updated_by',
'sponsor'
)->orderBy('id', 'desc') )->orderBy('id', 'desc')
// ->where("created_by",$this->currentName) // ->where("created_by",$this->currentName)
->get(); ->get();
@ -632,7 +634,7 @@ class ProjectController extends Controller
$result->header->planned_start = $plannedStart; $result->header->planned_start = $plannedStart;
$result->header->planned_end = $plannedEnd; $result->header->planned_end = $plannedEnd;
} }
return response()->json(['status'=>'success','code'=> 200,'data'=>$result, 'gantt'=>$ganttId], 200); return response()->json(['status' => 'success', 'code' => 200, 'data' => $result, 'gantt' => $ganttId], 200);
} }
public function getOverdueActivities(Request $request) public function getOverdueActivities(Request $request)

3
app/Models/Project.php

@ -51,6 +51,7 @@ class Project extends Model
'created_by', 'created_by',
'updated_at', 'updated_at',
'updated_by', 'updated_by',
'created_by_id' 'created_by_id',
'sponsor'
]; ];
} }

20
routes/web.php

@ -23,16 +23,16 @@ $router->group(['prefix' => 'api', 'middleware' => 'cors'], function () use ($ro
$router->group(['middleware' => ['auth', 'cors']], function () use ($router) { $router->group(['middleware' => ['auth', 'cors']], function () use ($router) {
$router->get('/dashboard/get-company-cashflow[/{year}]', 'DashboardBoDController@getCompanyCashFlow'); // project expenditure $router->get('/dashboard/get-company-cashflow', 'DashboardBoDController@getCompanyCashFlow'); // project expenditure
$router->get('/dashboard/get-invoice-outstanding[/{year}]', 'DashboardBoDController@getInvoiceOutstanding'); // project invoice vs cash in $router->get('/dashboard/get-invoice-outstanding', 'DashboardBoDController@getInvoiceOutstanding'); // project invoice vs cash in
$router->get('/dashboard/get-total-project-per-schedule-health[/{year}]', 'DashboardBoDController@getTotalProjectPerScheduleHealth'); $router->get('/dashboard/get-total-project-per-schedule-health', 'DashboardBoDController@getTotalProjectPerScheduleHealth');
$router->get('/dashboard/get-total-project-per-budget-health[/{year}]', 'DashboardBoDController@getTotalProjectPerBudgetHealth'); $router->get('/dashboard/get-total-project-per-budget-health', 'DashboardBoDController@getTotalProjectPerBudgetHealth');
$router->get('/dashboard/get-total-project-schedule-health-per-division[/{year}]', 'DashboardBoDController@getTotalProjectScheduleHealthPerDivision'); $router->get('/dashboard/get-total-project-schedule-health-per-division', 'DashboardBoDController@getTotalProjectScheduleHealthPerDivision');
$router->get('/dashboard/get-total-project-budget-health-per-division[/{year}]', 'DashboardBoDController@getTotalProjectBudgetHealthPerDivision'); $router->get('/dashboard/get-total-project-budget-health-per-division', 'DashboardBoDController@getTotalProjectBudgetHealthPerDivision');
$router->get('/dashboard/get-total-project-per-phase[/{year}]', 'DashboardBoDController@getTotalProjectPerPhase'); $router->get('/dashboard/get-total-project-per-phase', 'DashboardBoDController@getTotalProjectPerPhase');
$router->get('/dashboard/get-total-project-per-division[/{year}]', 'DashboardBoDController@getTotalProjectPerDivision'); $router->get('/dashboard/get-total-project-per-division', 'DashboardBoDController@getTotalProjectPerDivision');
$router->get('/dashboard/get-total-project-value-per-division[/{year}]', 'DashboardBoDController@getTotalProjectValuePerDivision'); $router->get('/dashboard/get-total-project-value-per-division', 'DashboardBoDController@getTotalProjectValuePerDivision');
$router->get('/dashboard/get-detail-expenditure[/{year}]', 'DashboardBoDController@getDetailExpenditure'); $router->get('/dashboard/get-detail-expenditure', 'DashboardBoDController@getDetailExpenditure');
$router->post('/role/search', 'RoleController@search'); $router->post('/role/search', 'RoleController@search');
$router->post('/role/add', 'RoleController@add'); $router->post('/role/add', 'RoleController@add');

Loading…
Cancel
Save