Commit 8f726ed6 by Azhan Hannan

Log Pia #163 -> ISU: EN fairuz tak dapat tindakan unuk resubmit

parent 52e25770
...@@ -2,6 +2,211 @@ ...@@ -2,6 +2,211 @@
@section('content') @section('content')
<!-- Staff Timesheet Section Start -->
<div class="ui segment">
<!-- <a class="ui blue left ribbon label">Welcome Back</a>
<br>
<br> -->
<!-- <div class="column sixteen wide">
<div class="ui cards four doubling">
<a href="/home" class="ui card">
<div class="content">
<h3 class="header link">Timesheet Baru Hantar</h3>
</div>
<div class="extra content">
<span class="right floated"><i class="american sign language interpreting icon"></i>1</span>
</div>
</a>
<a href="/home" class="ui card">
<div class="content">
<h3 class="header link">Timesheet Belum Hantar </h3>
</div>
<div class="extra content">
<span class="right floated"><i class="retweet icon"></i>1</span>
</div>
</a>
<a href="/home" class="ui card">
<div class="content">
<h3 class="header link">Timesheet Diluluskan</h3>
</div>
<div class="extra content">
<span class="right floated"><i class="icon calendar check outline"></i>1</span>
</div>
</a>
</div>
</div>
<br> -->
<a class="ui teal left ribbon label">Timesheet Status</a>
<br>
<br>
@foreach($timesheet as $key => $value)
<!-- <?php
// dd($value->tm_timesheet_master_sts);
?> -->
<div class="ui styled fluid accordion">
<?php $page = 1; ?>
<div class="title">
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 60%" class="text-center">
@if(data_get($value,'tm_phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, data_get($value,'tm_month'), 10)) }} - {{ data_get($value,'tm_year') }}
</th>
<th style="width: 15%;" class="center aligned">
@if(data_get($value,'tm_timesheet_master_sts') == 1) Draft
@elseif(data_get($value,'tm_timesheet_master_sts') == 2) <i class="green check icon"></i> Submitted
@elseif(data_get($value,'tm_timesheet_master_sts') == 3) <i class="green check icon"></i> Verified by HOD/HOU/PM
@elseif(data_get($value,'tm_timesheet_master_sts') == 4) <i class="green check icon"></i> Approved by PD
@elseif(data_get($value,'tm_timesheet_master_sts') == 5) <i class="red attention icon"></i> Rejected by PD
@elseif(data_get($value,'tm_timesheet_master_sts') == 6) <i class="red attention icon"></i> Rejected by HOD/HOU/PM
@endif
</th>
<th style="width: 13%" class="text-center">Submitted on: {{ date("d/m/Y", strtotime(data_get($value,'tm_submission_at'))) }}</th>
<th style="width: 12%" class="text-center">
<button class="center aligned ui blue icon button">View Project</button>
</th>
</tr>
</thead>
</table>
</div>
<?php
$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);
?>
<div class="content" style="padding-top: 0px;">
<!-- chargeable -->
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 7%;" class="text-center">Project Code</th>
<th style="width: 13;">Project Name</th>
<th style="width: 15;">Project Manager</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>
</thead>
@if(count($chargeable) == '0')
<tr>
<td class="text-center" colspan="5">No Project Submitted</td>
</tr>
@else
@foreach($chargeable as $key => $tpcharge)
<tr>
<td style="width: 7%;" class="text-center">{{data_get($tpcharge,'project.p_project_code')}}</td>
<td style="width: 13;">{{data_get($tpcharge,'tp_project_name')}}</td>
<td style="width: 15;">{{data_get($tpcharge,'project.projectManager.fullname')}}</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">
@if(data_get($tpcharge,'tp_timesheet_sts') == 1) Draft
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 2) Submitted
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 3) Verified by PM
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 4) Approved by PD
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 5) Rejected by PD
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 6) Rejected by PM
@endif
</td>
<td style="width: 12%;" class="text-center">
@if(data_get($tpcharge,'tp_timesheet_sts') == 5|| data_get($tpcharge,'tp_timesheet_sts') == 6)
<button class="center aligned ui red icon button" onclick="window.location.href='{{ route('timesheet::form.rejected', ['tpid' => data_get($tpcharge,'id')]) }}';">Resubmit</button>
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 2) Waiting for Verification
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 3) Waiting for Approval
@else
<!-- <button class="center aligned ui red icon button disabled">Resubmit</button> -->
@endif
</td>
</tr>
@endforeach
@endif
</table>
<!-- overhead -->
<table class="ui unstackable celled table">
<thead>
<tr>
@if( data_get($staffinfo,'penyokong') == '0' )
<th style="width: 20%;">Overhead</th>
<th style="width: 20%;">Approver</th>
<th style="width: 35%;">Bod Remarks</th>
@else
<th style="width: 17%;">Overhead</th>
<th style="width: 15%;">Verifier</th>
<th style="width: 20%;">Verifier Remarks</th>
<th style="width: 20%;">Approver Remarks</th>
@endif
<!-- <th style="width: 5%;" class="center aligned">Total Hours</th>
<th style="width: 5%;" class="center aligned">Total Days</th> -->
<th style="width: 13%;" class="text-center">Status</th>
<th style="width: 12%;" class="text-center">Action</th>
</tr>
</thead>
@if(count($overhead) == 0)
<tr>
<td class="text-center" colspan="5">No Overhead Submitted</td>
</tr>
@else
@foreach($overhead as $key => $tpoverhead)
<tr>
@if( data_get($staffinfo,'penyokong') == '0' )
<td style="width: 20%;">{{data_get($tpoverhead,'tp_project_name')}}</td>
<td style="width: 20%;" class="single line">{{data_get($tpoverhead,'bod.fullname')}}</td>
<td style="width: 35%;">{{data_get($tpoverhead,'approver_remark')}}</td>
<td style="width: 13%;" class="text-center">
@if(data_get($tpoverhead,'tp_timesheet_sts') == 1) Draft
@elseif(data_get($tpoverhead,'tp_timesheet_sts') == 2) Submitted
@elseif(data_get($tpoverhead,'tp_timesheet_sts') == 3) Auto-verified
@elseif(data_get($tpoverhead,'tp_timesheet_sts') == 4) Approved by BOD
@elseif(data_get($tpoverhead,'tp_timesheet_sts') == 5) Rejected by BOD
@elseif(data_get($tpoverhead,'tp_timesheet_sts') == 6) Rejected by HOD
@endif
</td>
@else
<td style="width: 15%;">{{data_get($tpoverhead,'tp_project_name')}}</td>
<td style="width: 15%;" class="single line">{{data_get($tpoverhead,'hod.fullname')}}</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">
@if(data_get($tpoverhead,'tp_timesheet_sts') == 1) Draft
@elseif(data_get($tpoverhead,'tp_timesheet_sts') == 2) Submitted
@elseif(data_get($tpoverhead,'tp_timesheet_sts') == 3) Verified by HOD
@elseif(data_get($tpoverhead,'tp_timesheet_sts') == 4) Approved by BOD
@elseif(data_get($tpoverhead,'tp_timesheet_sts') == 5) Rejected by BOD
@elseif(data_get($tpoverhead,'tp_timesheet_sts') == 6) Rejected by HOD
@endif
</td>
@endif
<!-- <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: 12%;" class="text-center">
@if(data_get($tpoverhead,'tp_timesheet_sts') == 5 || data_get($tpoverhead,'tp_timesheet_sts') == 6)
<button class="center aligned ui red icon button" onclick="window.location.href='{{ route('timesheet::form.rejected', ['tpid' => data_get($tpoverhead,'id')]) }}';">Resubmit</button>
@elseif(data_get($tpoverhead,'tp_timesheet_sts') == 2) Waiting for Verification
@elseif(data_get($tpoverhead,'tp_timesheet_sts') == 3) Waiting for Approval
@else
<!-- <button class="center aligned ui red icon button disabled">Resubmit</button> -->
@endif
</td>
</tr>
@endforeach
@endif
</table>
</div>
</div>
<br>
@endforeach
<!-- <br> -->
</div>
<!-- Staff Timesheet Section End -->
<?php <?php
$pms = $others = null; $pms = $others = null;
...@@ -15,7 +220,7 @@ ...@@ -15,7 +220,7 @@
} }
?> ?>
<div class="ui segment"> <div class="ui segment">
<div class="ui purple left ribbon label"> <div class="ui purple left ribbon label">
PMS PMS
</div> </div>
...@@ -223,9 +428,9 @@ ...@@ -223,9 +428,9 @@
</table> </table>
@endif @endif
</div> </div>
</div> </div>
<div class="ui segment"> <div class="ui segment">
<div class="ui blue left ribbon label"> <div class="ui blue left ribbon label">
Other Departments Other Departments
</div> </div>
...@@ -431,7 +636,7 @@ ...@@ -431,7 +636,7 @@
</table> </table>
@endif @endif
</div> </div>
</div> </div>
@endsection @endsection
......
...@@ -160,9 +160,6 @@ class DashboardController extends Controller ...@@ -160,9 +160,6 @@ class DashboardController extends Controller
if ( $roleid == '8') { if ( $roleid == '8') {
$staffinfo = Staff_info::where('id',Auth::id())
->with('pelulus')
->first();
$verifier = Users::find(Auth::id()); $verifier = Users::find(Auth::id());
...@@ -186,6 +183,10 @@ class DashboardController extends Controller ...@@ -186,6 +183,10 @@ class DashboardController extends Controller
->get(); ->get();
//timesheet status //timesheet status
$staffinfo = Staff_info::where('id',Auth::id())
->with('pelulus')
->first();
$staffid = Users::find(Auth::id()) $staffid = Users::find(Auth::id())
->u_staffID; ->u_staffID;
...@@ -235,7 +236,31 @@ class DashboardController extends Controller ...@@ -235,7 +236,31 @@ class DashboardController extends Controller
->get(); ->get();
// dd($overheads); // dd($overheads);
return view('timesheet::dashboard.dashboardpmhod', compact('profile', 'details', 'verifier', 'overheads')); //timesheet status
$staffinfo = Staff_info::where('id',Auth::id())
->with('pelulus')
->first();
$staffid = Users::find(Auth::id())
->u_staffID;
$timesheet = Ts_master::where('tm_staff_id', $staffid)
->where('tm_timesheet_master_sts', '<>', 1)
->orderby('tm_year')
->orderby('tm_month', 'DESC')
->orderby('tm_phase', 'DESC')
->get();
$projects = Tproject::where('staffid', $staffid)
->where('tp_year', date('Y'))
->where('tp_timesheet_sts', '<>', 1)
->with('project')
->with('overhead')
->with('hod')
->with('bod')
->get();
return view('timesheet::dashboard.dashboardpmhod', compact('profile', 'details', 'verifier', 'overheads', 'staffinfo', 'timesheet', 'projects'));
} }
if (($roleid == ('5'||'6'))) { if (($roleid == ('5'||'6'))) {
......
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