Commit 13a63c44 by Azhan Hannan

project display in dashboard bod

parent 903eac67
......@@ -108,7 +108,7 @@
</td>
<td style="width: 10%;" class="text-center single line">
@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
<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
......
......@@ -983,12 +983,13 @@ class DashboardController extends Controller
public function approvalaction(Request $request)
{
// dd($request);
$page = data_get($request,'page');
// dd($page);
$profile = Tproject::where('id', $request->tpid)
->with('team')
->with('project')
->first();
// dd($profile);
$bod = Users::find(Auth::id());
// dd($profile->tp_project_type);
......@@ -1030,11 +1031,12 @@ class DashboardController extends Controller
->with('attachement')
->first();
// dd($check);
$chargeableproject = Tproject::where('fk_tm_id', data_get($check,'id'))
->where('tp_project_type', 1)
$chargeableproject = Tproject::where('id', $request->tpid)
->with('team')
->with('project')
->get();
->get();
// dd($profile);
// dd($chargeableproject);
$chargeablelist = [];
$overheadlist = [];
......@@ -1043,8 +1045,8 @@ class DashboardController extends Controller
$chargeablelist[] = [
'pid' => $value->td_project,
'pcode' => $value->project->p_project_code,
'pname' => $value->project->p_project_description,
'pcode' => data_get($value,'project.p_project_code'),
'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