Browse Source

Merge pull request 'staging upload 23-05-19' (#56) from staging into master

Reviewed-on: ordo/adw-backend#56
pull/3/head
ibnu 2 years ago
parent
commit
800e31c8af
  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){ public function getManpower($proyek_id){
$manPower = UserToProyek::where('proyek_id', $proyek_id)->get(); $manCount = UserToProyek::where('proyek_id', $proyek_id)->count();
$manCount = $manPower->count(); return response()->json(['totalRecord'=>$manCount]);
return response()->json(['data'=>$manPower, 'totalRecord'=>$manCount]);
} }
public function getAssignedHR($gantt_id){ public function getAssignedHR($gantt_id){

3
app/Http/Controllers/UserToActivityController.php

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

Loading…
Cancel
Save