Commit 442728a4 by Azhan Hannan

changes

parent cea3469d
...@@ -39,171 +39,178 @@ ...@@ -39,171 +39,178 @@
<br> --> <br> -->
<a class="ui teal left ribbon label">Timesheet Status</a> <a class="ui teal left ribbon label">Timesheet Status</a>
<br> <br>
@if(count($timesheet) > 0)
<br> <br>
@foreach($timesheet as $key => $value) @foreach($timesheet as $key => $value)
<!-- <?php <div class="ui styled fluid accordion">
// dd($value->tm_timesheet_master_sts); <?php $page = 1; ?>
?> --> <div class="title">
<div class="ui styled fluid accordion"> <table class="ui unstackable celled table">
<?php $page = 1; ?> <thead>
<div class="title"> <tr>
<table class="ui unstackable celled table"> <th style="width: 60%" class="text-center">
<thead> @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') }}
<tr> </th>
<th style="width: 60%" class="text-center"> <th style="width: 15%;" class="center aligned">
@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') }} @if(data_get($value,'tm_timesheet_master_sts') == 1) Draft
</th> @elseif(data_get($value,'tm_timesheet_master_sts') == 2) <i class="green check icon"></i> Submitted
<th style="width: 15%;" class="center aligned"> @elseif(data_get($value,'tm_timesheet_master_sts') == 3) <i class="green check icon"></i> Verified by HOD/HOU/PM
@if(data_get($value,'tm_timesheet_master_sts') == 1) Draft @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') == 2) <i class="green check icon"></i> Submitted @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') == 3) <i class="green check icon"></i> Verified by HOD/HOU/PM @elseif(data_get($value,'tm_timesheet_master_sts') == 6) <i class="red attention icon"></i> Rejected by HOD/HOU/PM
@elseif(data_get($value,'tm_timesheet_master_sts') == 4) <i class="green check icon"></i> Approved by PD @endif
@elseif(data_get($value,'tm_timesheet_master_sts') == 5) <i class="red attention icon"></i> Rejected by PD </th>
@elseif(data_get($value,'tm_timesheet_master_sts') == 6) <i class="red attention icon"></i> Rejected by HOD/HOU/PM <th style="width: 13%" class="text-center">Submitted on: {{ date("d/m/Y", strtotime(data_get($value,'tm_submission_at'))) }}</th>
@endif <th style="width: 12%" class="text-center">
</th> <button class="center aligned ui blue icon button">View Project</button>
<th style="width: 13%" class="text-center">Submitted on: {{ date("d/m/Y", strtotime(data_get($value,'tm_submission_at'))) }}</th> </th>
<th style="width: 12%" class="text-center"> </tr>
<button class="center aligned ui blue icon button">View Project</button> </thead>
</th> </table>
</tr> </div>
</thead>
</table>
</div>
<?php <?php
$chargeable = $projects->where('tp_project_type', 1)->where('fk_tm_id', data_get($value,'id')); $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')); $overhead = $projects->where('tp_project_type', 3)->where('fk_tm_id', data_get($value,'id'));
// dd($overhead); // dd($overhead);
?> ?>
<div class="content" style="padding-top: 0px;"> <div class="content" style="padding-top: 0px;">
<!-- chargeable --> <!-- chargeable -->
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
<tr> <tr>
<th style="width: 7%;" class="text-center">Project Code</th> <th style="width: 7%;" class="text-center">Project Code</th>
<th style="width: 13;">Project Name</th> <th style="width: 13;">Project Name</th>
<th style="width: 15;">Project Manager</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 Hours</th>
<th style="width: 5%;" class="center aligned">Total Days</th> --> <th style="width: 5%;" class="center aligned">Total Days</th> -->
<th style="width: 20%">PM Remarks</th> <th style="width: 20%">PM Remarks</th>
<th style="width: 20%">PD Remarks</th> <th style="width: 20%">PD Remarks</th>
<th style="width: 13%" class="text-center">Status</th> <th style="width: 13%" class="text-center">Status</th>
<th style="width: 12%;" class="text-center">Action</th> <th style="width: 12%;" class="text-center">Action</th>
</tr> </tr>
</thead> </thead>
@if(count($chargeable) == '0') @if(count($chargeable) == '0')
<tr> <tr>
<td class="text-center" colspan="5">No Project Submitted</td> <td class="text-center" colspan="5">No Project Submitted</td>
</tr> </tr>
@else @else
@foreach($chargeable as $key => $tpcharge) @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> <tr>
<td style="width: 7%;" class="text-center">{{data_get($tpcharge,'project.p_project_code')}}</td> @if( data_get($staffinfo,'penyokong') == '0' )
<td style="width: 13;">{{data_get($tpcharge,'tp_project_name')}}</td> <td style="width: 20%;">{{data_get($tpoverhead,'tp_project_name')}}</td>
<td style="width: 15;">{{data_get($tpcharge,'project.projectManager.fullname')}}</td> <td style="width: 20%;" class="single line">{{data_get($tpoverhead,'bod.fullname')}}</td>
<!-- <td style="width: 5%;" class="center aligned">{{data_get($tpcharge,'tp_hours')}}</td> <td style="width: 35%;">{{data_get($tpoverhead,'approver_remark')}}</td>
<td style="width: 5%;" class="center aligned">{{data_get($tpcharge,'tp_hours')/8}}</td> --> <td style="width: 13%;" class="text-center">
<td style="width: 20%">{{data_get($tpcharge,'verifier_remark')}}</td> @if(data_get($tpoverhead,'tp_timesheet_sts') == 1) Draft
<td style="width: 20%">{{data_get($tpcharge,'approver_remark')}}</td> @elseif(data_get($tpoverhead,'tp_timesheet_sts') == 2) Submitted
<td style="width: 13%" class="text-center"> @elseif(data_get($tpoverhead,'tp_timesheet_sts') == 3) Auto-verified
@if(data_get($tpcharge,'tp_timesheet_sts') == 1) Draft @elseif(data_get($tpoverhead,'tp_timesheet_sts') == 4) Approved by BOD
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 2) Submitted @elseif(data_get($tpoverhead,'tp_timesheet_sts') == 5) Rejected by BOD
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 3) Verified by PM @elseif(data_get($tpoverhead,'tp_timesheet_sts') == 6) Rejected by HOD
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 4) Approved by PD @endif
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 5) Rejected by PD </td>
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 6) Rejected by PM @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 @endif
</td> </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"> <td style="width: 12%;" class="text-center">
@if(data_get($tpcharge,'tp_timesheet_sts') == 5|| data_get($tpcharge,'tp_timesheet_sts') == 6) @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($tpcharge,'id')]) }}';">Resubmit</button> <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($tpcharge,'tp_timesheet_sts') == 2) Waiting for Verification @elseif(data_get($tpoverhead,'tp_timesheet_sts') == 2) Waiting for Verification
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 3) Waiting for Approval @elseif(data_get($tpoverhead,'tp_timesheet_sts') == 3) Waiting for Approval
@else @else
<!-- <button class="center aligned ui red icon button disabled">Resubmit</button> --> <!-- <button class="center aligned ui red icon button disabled">Resubmit</button> -->
@endif @endif
</td> </td>
</tr> </tr>
@endforeach @endforeach
@endif @endif
</table> </table>
</div>
<!-- overhead --> </div>
<table class="ui unstackable celled table"> @endforeach
<thead> @else
<tr> <table class="ui unstackable celled table">
@if( data_get($staffinfo,'penyokong') == '0' ) <thead>
<th style="width: 20%;">Overhead</th> <tr>
<th style="width: 20%;">Approver</th> <th class="text-center">No pending verification</th>
<th style="width: 35%;">Bod Remarks</th> </tr>
@else </thead>
<th style="width: 17%;">Overhead</th> </table>
<th style="width: 15%;">Verifier</th> @endif
<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> --> <!-- <br> -->
</div> </div>
<!-- Staff Timesheet Section End --> <!-- Staff Timesheet Section End -->
......
...@@ -82,13 +82,18 @@ ...@@ -82,13 +82,18 @@
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
<tr> <tr>
@if( $roleid == '9' )
<th style="width: 7%;" class="text-center">Project Code</th>
<th style="width: 13%;">Project Name</th>
<th style="width: 20%;">Project Director</th>
<th style="width: 35%;">PD Remarks</th>
@else
<th style="width: 7%;" class="text-center">Project Code</th> <th style="width: 7%;" class="text-center">Project Code</th>
<th style="width: 13;">Project Name</th> <th style="width: 13;">Project Name</th>
<th style="width: 15;">Project Manager</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%">PM Remarks</th>
<th style="width: 20%">PD Remarks</th> <th style="width: 20%">PD Remarks</th>
@endif
<th style="width: 13%" class="text-center">Status</th> <th style="width: 13%" class="text-center">Status</th>
<th style="width: 12%;" class="text-center">Action</th> <th style="width: 12%;" class="text-center">Action</th>
</tr> </tr>
...@@ -100,11 +105,24 @@ ...@@ -100,11 +105,24 @@
@else @else
@foreach($chargeable as $key => $tpcharge) @foreach($chargeable as $key => $tpcharge)
<tr> <tr>
@if( $roleid == '9' )
<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: 20%;">{{data_get($tpcharge,'project.projectDirector.fullname')}}</td>
<td style="width: 35%">{{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) Auto-verified
@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>
@else
<td style="width: 7%;" class="text-center">{{data_get($tpcharge,'project.p_project_code')}}</td> <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: 13;">{{data_get($tpcharge,'tp_project_name')}}</td>
<td style="width: 15;">{{data_get($tpcharge,'project.projectManager.fullname')}}</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,'verifier_remark')}}</td>
<td style="width: 20%">{{data_get($tpcharge,'approver_remark')}}</td> <td style="width: 20%">{{data_get($tpcharge,'approver_remark')}}</td>
<td style="width: 13%" class="text-center"> <td style="width: 13%" class="text-center">
...@@ -116,6 +134,7 @@ ...@@ -116,6 +134,7 @@
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 6) Rejected by PM @elseif(data_get($tpcharge,'tp_timesheet_sts') == 6) Rejected by PM
@endif @endif
</td> </td>
@endif
<td style="width: 12%;" class="text-center"> <td style="width: 12%;" class="text-center">
@if(data_get($tpcharge,'tp_timesheet_sts') == 5|| data_get($tpcharge,'tp_timesheet_sts') == 6) @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> <button class="center aligned ui red icon button" onclick="window.location.href='{{ route('timesheet::form.rejected', ['tpid' => data_get($tpcharge,'id')]) }}';">Resubmit</button>
......
...@@ -260,7 +260,7 @@ class DashboardController extends Controller ...@@ -260,7 +260,7 @@ class DashboardController extends Controller
->with('bod') ->with('bod')
->get(); ->get();
return view('timesheet::dashboard.dashboardpmhod', compact('profile', 'details', 'verifier', 'overheads', 'staffinfo', 'timesheet', 'projects')); return view('timesheet::dashboard.dashboardpmhod', compact('profile', 'details', 'verifier', 'overheads', 'staffinfo', 'timesheet', 'projects', 'roleid'));
} }
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