Commit 13a63c44 by Azhan Hannan

project display in dashboard bod

parent 903eac67
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
</td> </td>
<td style="width: 10%;" class="text-center single line"> <td style="width: 10%;" class="text-center single line">
@if(data_get($chargeable, 'tp_timesheet_sts') == 3) @if(data_get($chargeable, 'tp_timesheet_sts') == 3)
<button class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.approvalaction', ['tpid'=>data_get($chargeable, 'id'), 'phase'=>data_get($chargeable, 'tp_phase'), 'month'=>data_get($chargeable, 'tp_month'), 'year'=>data_get($chargeable, 'tp_year'), 'page'=>$page ]) }}';">Approval</button> <button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.approvalaction', ['tpid'=>data_get($chargeable, 'id'), 'phase'=>data_get($chargeable, 'tp_phase'), 'month'=>data_get($chargeable, 'tp_month'), 'year'=>data_get($chargeable, 'tp_year'), 'page'=>$page ]) }}';">Approval</button>
@else @else
<a class="center aligned ui blue icon button" href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staffid') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}" target='_blank'>View</a> <a class="center aligned ui blue icon button" href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staffid') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}" target='_blank'>View</a>
@endif @endif
......
...@@ -983,12 +983,13 @@ class DashboardController extends Controller ...@@ -983,12 +983,13 @@ class DashboardController extends Controller
public function approvalaction(Request $request) public function approvalaction(Request $request)
{ {
// dd($request);
$page = data_get($request,'page'); $page = data_get($request,'page');
// dd($page);
$profile = Tproject::where('id', $request->tpid) $profile = Tproject::where('id', $request->tpid)
->with('team') ->with('team')
->with('project')
->first(); ->first();
// dd($profile);
$bod = Users::find(Auth::id()); $bod = Users::find(Auth::id());
// dd($profile->tp_project_type); // dd($profile->tp_project_type);
...@@ -1030,11 +1031,12 @@ class DashboardController extends Controller ...@@ -1030,11 +1031,12 @@ class DashboardController extends Controller
->with('attachement') ->with('attachement')
->first(); ->first();
// dd($check); // dd($check);
$chargeableproject = Tproject::where('fk_tm_id', data_get($check,'id')) $chargeableproject = Tproject::where('id', $request->tpid)
->where('tp_project_type', 1) ->with('team')
->with('project') ->with('project')
->get(); ->get();
// dd($profile);
// dd($chargeableproject);
$chargeablelist = []; $chargeablelist = [];
$overheadlist = []; $overheadlist = [];
...@@ -1043,8 +1045,8 @@ class DashboardController extends Controller ...@@ -1043,8 +1045,8 @@ class DashboardController extends Controller
$chargeablelist[] = [ $chargeablelist[] = [
'pid' => $value->td_project, 'pid' => $value->td_project,
'pcode' => $value->project->p_project_code, 'pcode' => data_get($value,'project.p_project_code'),
'pname' => $value->project->p_project_description, 'pname' => data_get($value,'project.p_project_description'),
]; ];
......
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