diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index fa2ee05..60e7a4d 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/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){ diff --git a/app/Http/Controllers/UserToActivityController.php b/app/Http/Controllers/UserToActivityController.php index 048825c..14e67ed 100644 --- a/app/Http/Controllers/UserToActivityController.php +++ b/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){