Commit 5c217edb by Azhan Hannan

changes in dashboard staff

parent 1c3586fc
......@@ -119,10 +119,10 @@
<tr>
<th style="width: 10%;">Project Code</th>
<th style="width: 15;">Project Name</th>
<th style="width: 10%;" class="center aligned">Total Hours</th>
<th style="width: 10%;" class="center aligned">Total Days</th>
<th style="width: 15%">PM Remarks</th>
<th style="width: 15%">PD Remarks</th>
<th style="width: 5%;" class="center aligned">Total Hours</th>
<th style="width: 5%;" class="center aligned">Total Days</th>
<th style="width: 20%">PM Remarks</th>
<th style="width: 20%">PD Remarks</th>
<th style="width: 13%" class="text-center">Status</th>
<th style="width: 12%;" class="text-center">Action</th>
</tr>
......@@ -134,13 +134,13 @@
@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: 10%;">{{data_get($tpcharge,'project.p_project_code')}}</td>
<td style="width: 15;">{{data_get($tpcharge,'project.p_project_description')}}</td>
<td style="width: 5%;" class="center aligned">{{data_get($tpcharge,'tp_hours')}}</td>
<td style="width: 5%;" class="center aligned">{{data_get($tpcharge,'tp_hours')/8}}</td>
<td style="width: 20%">{{data_get($tpcharge,'verifier_remark')}}</td>
<td style="width: 20%">{{data_get($tpcharge,'approver_remark')}}</td>
<td style="width: 13%" class="text-center">{{data_get($tpcharge,'tp_timesheet_sts')}}</td>
<td style="width: 12%;" class="text-center">
<button class="center aligned ui green icon button">Resubmit</button>
</td>
......@@ -154,10 +154,10 @@
<thead>
<tr>
<th style="width: 25%;">Overhead</th>
<th style="width: 10%;" class="center aligned">Total Hours</th>
<th style="width: 10%;" class="center aligned">Total Days</th>
<th style="width: 15%;">Hod Remarks</th>
<th style="width: 15%;">Bod Remarks</th>
<th style="width: 5%;" class="center aligned">Total Hours</th>
<th style="width: 5%;" class="center aligned">Total Days</th>
<th style="width: 20%;">Hod Remarks</th>
<th style="width: 20%;">Bod Remarks</th>
<th style="width: 13%;" class="text-center">Status</th>
<th style="width: 12%;" class="text-center">Action</th>
</tr>
......@@ -165,12 +165,12 @@
@if($overhead)
@foreach($overhead as $key => $tpoverhead)
<tr>
<td style="width: 25;">tp_project_name</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%;">Hod remarks</td>
<td style="width: 15%;">Bod remarks</td>
<td style="width: 13%;" class="text-center">status</td>
<td style="width: 25;">{{data_get($tpoverhead,'tp_project_name')}}</td>
<td style="width: 5%;" class="center aligned">{{data_get($tpoverhead,'tp_hours')}}</td>
<td style="width: 5%;" class="center aligned">{{data_get($tpoverhead,'tp_hours')/8}}</td>
<td style="width: 20%;">{{data_get($tpoverhead,'verifier_remark')}}</td>
<td style="width: 20%;">{{data_get($tpoverhead,'approver_remark')}}</td>
<td style="width: 13%;" class="text-center">{{data_get($tpoverhead,'tp_timesheet_sts')}}</td>
<td style="width: 12%;" class="text-center">
<button class="center aligned ui green icon button">Resubmit</button>
</td>
......
......@@ -184,6 +184,8 @@ class DashboardController extends Controller
$projects = Tproject::where('staffid', $staffid)
->where('tp_year', date('Y'))
->with('project')
->with('overhead')
->get();
// dd($projects);
......
......@@ -26,6 +26,12 @@ class Tproject extends Model
return $this->hasOne('Portal\Timesheet\Model\Project','id','td_project')->with('projectManager');
}
public function overhead()
{
return $this->hasOne('Portal\Timesheet\Model\Overhead','id','fk_o_id');
}
public function pm()
{
return $this->hasOne('Portal\Timesheet\Model\Staff_info','staff_id','tp_pm');
......
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