Commit 07791583 by Azhan Hannan

dashboard pmhod

parent 30b6ab99
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="ui segment"> <div class="ui segment">
<div class="ui blue left ribbon label"> <div class="ui blue left ribbon label">
Project Manager Dashboard Dashboard
</div> </div>
<br> <br>
<br> <br>
...@@ -47,7 +47,9 @@ ...@@ -47,7 +47,9 @@
</thead> </thead>
</table> </table>
</div> </div>
<div class="content" style="padding-top: 0px;"> <div class="content" style="padding-top: 0px;">
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
<tr> <tr>
...@@ -89,8 +91,83 @@ ...@@ -89,8 +91,83 @@
@endif @endif
@endforeach @endforeach
</table> </table>
<?php
$overhead = $overheads->where('staffid', $staff->staff_id);
$checkoverhead = $overheads->where('staffid', $staff->staff_id)->first();
?>
@if($checkoverhead)
<table class="ui unstackable celled table">
<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: 30%">Remarks</th>
<th style="width: 13%" class="text-center">Status</th>
<th style="width: 12%;" class="text-center">Action</th>
</tr>
</thead>
@foreach($overheads as $key => $tp)
@if(data_get($staff, 'staff_id') == data_get($tp, 'staffid'))
<tr>
<td style="width: 25;">{{data_get($tp, 'tp_project_name')}}</td>
<td style="width: 10%;" class="center aligned">{{data_get($tp, 'tp_hours')}}</td>
<td style="width: 10%;" class="center aligned">{{data_get($tp, 'tp_hours')/8}}</td>
<td style="width: 30%">{{data_get($tp, 'verifier_remark')}}</td>
<td style="width: 13%" class="text-center">
@if(data_get($tp, 'tp_timesheet_sts') == 1 || data_get($tp, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get($tp, 'tp_timesheet_sts') == 2) <i class="red attention icon"></i> Submitted
@elseif(data_get($tp, 'tp_timesheet_sts') == 3) <i class="green check icon"></i> Verified by HOD/HOU
@elseif(data_get($tp, 'tp_timesheet_sts') == 4) <i class="green check icon"></i>Verified by BOD
@elseif(data_get($tp, 'tp_timesheet_sts') == 5) <i class="red attention icon"></i>Dissaproved by BOD
@elseif(data_get($tp, 'tp_timesheet_sts') == 6) <i class="red attention icon"></i>Rejected by HOD/HOU
@elseif(data_get($tp, 'tp_timesheet_sts') == 7) <i class="red attention icon"></i>Rejected by HR
@endif
</td>
<td style="width: 12%;" class="text-center">
@if(data_get($tp, 'tp_timesheet_sts') == 2)
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.revaction', ['tpid'=>data_get($tp, 'id'), 'phase'=>data_get($tp, 'tp_phase'), 'month'=>data_get($tp, 'tp_month'), 'year'=>data_get($tp, 'tp_year') ]) }}';">Verify | Reject</button>
@else
<button class="center aligned ui green icon button disabled">Verify | Reject</button>
@endif
</td>
</tr>
@endif
@endforeach
</table>
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned">Date</th>
<th style="width: 15%" class="single line"> Overhead Description</th>
<th class="center aligned">Notes</th>
</tr>
</thead>
@foreach($overheads as $key => $overhead)
@if(data_get($staff,'staff_id') == data_get($overhead, 'staffid'))
@foreach(data_get($overhead,'notes') as $key => $value)
@if(data_get($value,'td_hours'))
<tr>
<td style="width: 10%" class="center aligned">{{data_get($value, 'td_date')}}</td>
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td>
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endif
@endforeach
@endif
@endforeach
</table>
@endif
</div> </div>
@endif @endif
@endforeach @endforeach
</div> </div>
</div> </div>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<th style="width: 12%;" class="text-center">Action</th> <th style="width: 12%;" class="text-center">Action</th>
</tr> </tr>
</thead> </thead>
@foreach($details as $key => $detail)q @foreach($details as $key => $detail)
@if(data_get($detail,'staffid') == data_get($staff, 'staff_id')) @if(data_get($detail,'staffid') == data_get($staff, 'staff_id'))
<tr> <tr>
<td style="width: 10%;">{{data_get($detail, 'project.p_project_code')}}</td> <td style="width: 10%;">{{data_get($detail, 'project.p_project_code')}}</td>
......
...@@ -139,22 +139,6 @@ ...@@ -139,22 +139,6 @@
@endif @endif
@endforeach @endforeach
@if(data_get($staff,'hodremarks'))
<table class="ui unstackable celled table">
<thead>
<tr>
<th colspan="2" class="center aligned">Remarks</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width: 4%;"></td>
<td>{{ data_get($staff,'hodremarks') }}</td>
</tr>
</tbody>
</table>
@endif
</div> </div>
@endif @endif
@endforeach @endforeach
......
...@@ -30,7 +30,6 @@ input[type=number] { ...@@ -30,7 +30,6 @@ input[type=number] {
<i class="angle double left icon"></i> <i class="angle double left icon"></i>
Chargeable Form Chargeable Form
</button> </button>
@if($checkoverhead) @if($checkoverhead)
<button class="right floated aligned ui yellow compact labeled icon button" id="notes" onclick="window.location.href='{{ route('timesheet::form.notelist', ['year'=> $year, 'month'=> $month, 'phase'=> $phase, 'fk_tm_id'=> $fk_tm_id] ) }} ';"> <button class="right floated aligned ui yellow compact labeled icon button" id="notes" onclick="window.location.href='{{ route('timesheet::form.notelist', ['year'=> $year, 'month'=> $month, 'phase'=> $phase, 'fk_tm_id'=> $fk_tm_id] ) }} ';">
<i class="plus icon"></i> <i class="plus icon"></i>
......
...@@ -130,7 +130,36 @@ class DashboardController extends Controller ...@@ -130,7 +130,36 @@ class DashboardController extends Controller
return view('timesheet::dashboard.dashboardpm', compact('profile', 'details', 'verifier')); return view('timesheet::dashboard.dashboardpm', compact('profile', 'details', 'verifier'));
} }
if (($roleid == ('5'||'6'||'9'))) { if ( $roleid == '9') {
$verifier = Users::find(Auth::id());
$profile = VwChargeableVerification::select('tmid', 'staff_id', 'year', 'month', 'phase', 'status', 'submission', 'fullname', 'roleid', 'pmstaffid')
->where('pmstaffid', $verifier->u_staffID)
->where('status', 2)
->distinct('staff_id')
->orderby('roleid')
->with('countchargeable')
->get();
// dd($profile);
$details = Tproject::where('tp_timesheet_sts', 2)
->where('tp_pm', $verifier->u_staffID)
->with('project')
->with('pm')
->get();
$overheads = Tproject::where('tp_project_type', 3)
->where('tp_timesheet_sts', 2)
->where('tp_pm', $verifier->id)
->with('notes')
->get();
// dd($overheads);
return view('timesheet::dashboard.dashboardpmhod', compact('profile', 'details', 'verifier', 'overheads'));
}
if (($roleid == ('5'||'6'))) {
$staffid = Users::find(Auth::id()) $staffid = Users::find(Auth::id())
->u_staffID; ->u_staffID;
......
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