Browse Source

Merge pull request 'Fix assigned hr dashboard project' (#55) from dev-wahyu into staging

Reviewed-on: ordo/adw-backend#55
Reviewed-by: ibnu <ibnu@mail.com>
pull/3/head
ibnu 2 years ago
parent
commit
22cb0be8c8
  1. 5
      app/Http/Controllers/ProjectController.php
  2. 3
      app/Http/Controllers/UserToActivityController.php

5
app/Http/Controllers/ProjectController.php

@ -456,9 +456,8 @@ class ProjectController extends Controller
}
public function getManpower($proyek_id){
$manPower = UserToProyek::where('proyek_id', $proyek_id)->get();
$manCount = $manPower->count();
return response()->json(['data'=>$manPower, 'totalRecord'=>$manCount]);
$manCount = UserToProyek::where('proyek_id', $proyek_id)->count();
return response()->json(['totalRecord'=>$manCount]);
}
public function getAssignedHR($gantt_id){

3
app/Http/Controllers/UserToActivityController.php

@ -41,7 +41,8 @@ class UserToActivityController extends Controller
"activity_id" => $request->activity_id,
"role_proyek_id" => $users_role[$index],
"proyek_id" => $request->proyek_id,
"created_by" => $this->currentName
"created_by" => $this->currentName,
"version_gantt_id" => $request->version_gantt_id
);
$result = UserToActivity::create($dataInsert);
if($result){

Loading…
Cancel
Save