Commit b2b277ba by hannan

changes in add project team - succeed

parent 3f04fe32
......@@ -2,8 +2,4 @@
<div class="item" data-value="{{$staff->id}}" data-text="{{$staff->fullname}}">
{{$staff->fullname}}
</div>
@endforeach
<!-- @foreach($staffs as $key => $role)
<option value="{{$staff->id}}">{{$staff->fullname}}</option>
@endoreach -->
\ No newline at end of file
@endforeach
\ No newline at end of file
......@@ -138,7 +138,7 @@ class DashboardController extends Controller
$pid = $request->id;
$project = Pteam::where('fk_project_id',$request->id)->get();
$projectlist = [];
// dd($project);
// dd($projectlistct);
// nanti project code query dari table project:
......@@ -162,9 +162,8 @@ class DashboardController extends Controller
public function penambahanProjectTeam(Request $request)
{
$pid = $request->id;
$pid = $request->id;
$project = Project::where('id', $request->id)->first(); //find($request->id);
$departments = Department::all()
->except([7,8]);
......@@ -191,10 +190,10 @@ class DashboardController extends Controller
foreach ($expstaff as $key => $value)
{
$staff = Staff_info::where('staff_id', $value)
$staff = Staff_info::where('fk_users', $value)
->first();
dd($request);
// dd($request);
$pt = new Pteam;
$pt->fk_project_id = $request->pid;
......@@ -208,7 +207,7 @@ class DashboardController extends Controller
}
return redirect()->route('timesheet::dashboard.penambahanProjectTeam')
return redirect()->route('timesheet::dashboard.senaraiProject')
->with('success', 'Project Team Added Successfully');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment