Commit 97cd3d25 by Azhan Hannan

Dashboard bod -> filter data yg timesheet yg dah approve.

parent fb410007
...@@ -15,11 +15,13 @@ ...@@ -15,11 +15,13 @@
@foreach($profiles as $key => $staff) @foreach($profiles as $key => $staff)
<?php <?php
$td = $checktd->where('tm_staff_id', $staff->staffid); $td = $checktd->where('tm_staff_id', $staff->staffid);
$detail = $details->where('staffid', $staff->staffid); // $detail = $details->where('staffid', $staff->staffid);
$detail = $details->where('fk_tm_id', $staff->tmid);
$checkchargeable = $detail->where('tp_project_type',1)->first(); $checkchargeable = $detail->where('tp_project_type',1)->first();
$checkoverhead = $detail->where('tp_project_type',3)->first(); $checkoverhead = $detail->where('tp_project_type',3)->first();
// dump($staff); // dump($detail);
// dd($staff);
// dump(count($detail->where('tp_timesheet_sts',4))); // dump(count($detail->where('tp_timesheet_sts',4)));
// dump(count($detail)); // dump(count($detail));
// dump(count($checkoverhead)); // dump(count($checkoverhead));
......
...@@ -128,6 +128,7 @@ class DashboardController extends Controller ...@@ -128,6 +128,7 @@ class DashboardController extends Controller
->with('team') ->with('team')
->with('tproject') ->with('tproject')
->get(); ->get();
// dd($profiles);
$tmid = []; $tmid = [];
foreach ($profiles as $key => $value) { foreach ($profiles as $key => $value) {
...@@ -157,6 +158,7 @@ class DashboardController extends Controller ...@@ -157,6 +158,7 @@ class DashboardController extends Controller
->orderby('tm_phase', 'desc') ->orderby('tm_phase', 'desc')
->get(); ->get();
// dd($profile); // dd($profile);
$detailsverification = Tproject::where('tp_project_type', 3) $detailsverification = Tproject::where('tp_project_type', 3)
->where('tp_timesheet_sts','<>', 1) ->where('tp_timesheet_sts','<>', 1)
->where('tp_pm', $verifier->id) ->where('tp_pm', $verifier->id)
...@@ -166,6 +168,7 @@ class DashboardController extends Controller ...@@ -166,6 +168,7 @@ class DashboardController extends Controller
$checkts = Ts_master::whereIn('tm_timesheet_master_sts', [2,3,5,6]) $checkts = Ts_master::whereIn('tm_timesheet_master_sts', [2,3,5,6])
->with('attachement') ->with('attachement')
->get(); ->get();
return view('timesheet::dashboard.dashboardbod', compact('approval', 'profiles', 'detailsverification', 'checktd', 'profile', 'checkts', 'details')); return view('timesheet::dashboard.dashboardbod', compact('approval', 'profiles', 'detailsverification', 'checktd', 'profile', 'checkts', 'details'));
} }
......
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