Browse Source

Merge branch 'staging' of https://git.oslog.id/ibnu/generic-ospro-backend into Dev-Farhan

pull/1/head
farhantock 10 months ago
parent
commit
cca8ca6e04
  1. 5
      app/Http/Controllers/HumanResourceController.php
  2. 2
      app/Http/Controllers/ProjectController.php
  3. 3
      app/Http/Controllers/ProjectRoleController.php
  4. 3
      app/Http/Controllers/RoleController.php

5
app/Http/Controllers/HumanResourceController.php

@ -16,7 +16,8 @@ class HumanResourceController extends Controller
'role_id' => 'required', 'role_id' => 'required',
'name' => 'required', 'name' => 'required',
'ktp_number' => 'required|numeric|unique:m_users,ktp_number', 'ktp_number' => 'required|numeric|unique:m_users,ktp_number',
'employee_type' => 'required' 'employee_type' => 'required',
'company_id' => 'required'
]); ]);
$data = $request->all(); $data = $request->all();
@ -118,7 +119,7 @@ class HumanResourceController extends Controller
public function list() public function list()
{ {
$data = HumanResource::select('id', 'name', 'role_id')->get(); $data = HumanResource::select('id', 'name', 'role_id','company_id')->get();
$countData = $data->count(); $countData = $data->count();
if ($data) { if ($data) {

2
app/Http/Controllers/ProjectController.php

@ -55,7 +55,7 @@ class ProjectController extends Controller
'akhir_proyek' => 'required', 'akhir_proyek' => 'required',
'rencana_biaya' => 'required', 'rencana_biaya' => 'required',
'type_proyek_id' => 'required', 'type_proyek_id' => 'required',
'value_proyek' => 'required' 'company_id' => 'required'
]); ]);
$data = $request->all(); $data = $request->all();

3
app/Http/Controllers/ProjectRoleController.php

@ -11,7 +11,8 @@ class ProjectRoleController extends Controller
{ {
$this->validate($request, [ $this->validate($request, [
'name' => 'required', 'name' => 'required',
'description' => 'required' 'description' => 'required',
'company_id' => 'required'
]); ]);
$data = $request->all(); $data = $request->all();

3
app/Http/Controllers/RoleController.php

@ -12,7 +12,8 @@ class RoleController extends Controller
{ {
$this->validate($request, [ $this->validate($request, [
'name' => 'string|required|unique:m_roles,name,NULL,id,company_id,' . $request->input('company_id'), 'name' => 'string|required|unique:m_roles,name,NULL,id,company_id,' . $request->input('company_id'),
'description' => 'required' 'description' => 'required',
'company_id' => 'required'
]); ]);
$data = $request->all(); $data = $request->all();

Loading…
Cancel
Save