Commit 1c3586fc by Azhan Hannan

dashboard staff template

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