Commit 1c3586fc by Azhan Hannan

dashboard staff template

parent 7f88c917
......@@ -88,6 +88,7 @@
</div>
@foreach($timesheet as $key => $value)
<div class="ui styled fluid accordion">
<?php $page = 1; ?>
<div class="title">
......@@ -106,9 +107,8 @@
</div>
<?php
$chargeable = $projects->where('tp_project_type', 1);
$overhead = $projects->where('tp_project_type', 3);
// dump($chargeable);
$chargeable = $projects->where('tp_project_type', 1)->where('fk_tm_id', data_get($value,'id'));
$overhead = $projects->where('tp_project_type', 3)->where('fk_tm_id', data_get($value,'id'));
// dd($overhead);
?>
......@@ -127,25 +127,26 @@
<th style="width: 12%;" class="text-center">Action</th>
</tr>
</thead>
@if($chargeable)
<?php
$prjchargeable = $chargeable;
?>
@foreach($prjchargeable as $key => $tpcharge)
<tr>
<td style="width: 10%;">p_project_code</td>
<td style="width: 15;">p_project_description</td>
<td style="width: 10%;" class="center aligned">tp_hours</td>
<td style="width: 10%;" class="center aligned">tp_hours/8</td>
<td style="width: 15%">pm remark</td>
<td style="width: 15%">pd remark</td>
<td style="width: 13%" class="text-center">status</td>
<td style="width: 12%;" class="text-center">
<button class="center aligned ui green icon button">Resubmit</button>
</td>
</tr>
@if(count($chargeable) == '0')
<tr>
<td class="text-center" colspan="7">No Project Submitted</td>
</tr>
@else
@foreach($chargeable as $key => $tpcharge)
<tr>
<td style="width: 10%;">p_project_code</td>
<td style="width: 15;">p_project_description</td>
<td style="width: 10%;" class="center aligned">tp_hours</td>
<td style="width: 10%;" class="center aligned">tp_hours/8</td>
<td style="width: 15%">pm remark</td>
<td style="width: 15%">pd remark</td>
<td style="width: 13%" class="text-center">status</td>
<td style="width: 12%;" class="text-center">
<button class="center aligned ui green icon button">Resubmit</button>
</td>
</tr>
@endforeach
@endif
@endif
</table>
<!-- overhead -->
......
......@@ -181,7 +181,7 @@ class DashboardController extends Controller
->orderby('tm_month', 'DESC')
->orderby('tm_phase', 'DESC')
->get();
$projects = Tproject::where('staffid', $staffid)
->where('tp_year', date('Y'))
->get();
......
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