Commit 25c682c3 by Azhan Hannan

Project manager / HOD → checkbox function for project manager & HOD verification.

parent 46ded914
...@@ -235,7 +235,6 @@ ...@@ -235,7 +235,6 @@
</table> </table>
@endif @endif
@if(data_get($staff,'hodremarks')) @if(data_get($staff,'hodremarks'))
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
......
...@@ -275,6 +275,11 @@ ...@@ -275,6 +275,11 @@
</div> </div>
<div class="content" style="padding-top: 0px;"> <div class="content" style="padding-top: 0px;">
<form class="ui form" action="{{ route('timesheet::dashboard.selectverification') }}" method="POST">
{{csrf_field()}}
<input type="hidden" name="tmid" value="{{data_get($staff,'tmid')}}">
<input type="hidden" name="page" value="{{$page}}">
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
<tr> <tr>
...@@ -291,7 +296,18 @@ ...@@ -291,7 +296,18 @@
@if(data_get($staff, 'tmid') == data_get($tp, 'fk_tm_id')) @if(data_get($staff, 'tmid') == data_get($tp, 'fk_tm_id'))
<tr> <tr>
<td style="width: 25%;">{{data_get($tp, 'tp_project_name')}}</td> <td style="width: 25%;">
@if(data_get($tp,'tp_timesheet_sts') == 2)
<div class="ui toggle checkbox">
<input type="checkbox" name="pid[{{data_get($tp,'id')}}]" value="{{data_get($tp,'id')}}">
</div>
@else
<div class="ui toggle checkbox">
<input type="checkbox" disabled="disabled">
</div>
@endif
{{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')}}</td>
<td style="width: 10%;" class="center aligned"> <td style="width: 10%;" class="center aligned">
{{ number_format(data_get($tp, 'tp_hours')/8, 1, '.', '') }} {{ number_format(data_get($tp, 'tp_hours')/8, 1, '.', '') }}
...@@ -309,7 +325,7 @@ ...@@ -309,7 +325,7 @@
</td> </td>
<td style="width: 12%;" class="text-center single line"> <td style="width: 12%;" class="text-center single line">
@if(data_get($tp, 'tp_timesheet_sts') == 2) @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'), 'page'=>$page ]) }}';">Verify | Reject</button> <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'), 'page'=>$page ]) }}';" type="button">Verify | Reject</button>
@else @else
<a href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'tm_phase'), 'month' => data_get($staff,'tm_month'), 'year' => data_get($staff,'tm_year') ]) }}" class="center aligned ui blue icon button" target='_blank'>View</a> <a href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'tm_phase'), 'month' => data_get($staff,'tm_month'), 'year' => data_get($staff,'tm_year') ]) }}" class="center aligned ui blue icon button" target='_blank'>View</a>
@endif @endif
...@@ -378,7 +394,6 @@ ...@@ -378,7 +394,6 @@
@endif @endif
@endforeach @endforeach
@if(data_get($staff,'hodremarks')) @if(data_get($staff,'hodremarks'))
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
...@@ -394,6 +409,9 @@ ...@@ -394,6 +409,9 @@
</tbody> </tbody>
</table> </table>
@endif @endif
<button type="submit" class="center aligned ui green icon button">Verify</button>
<button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.verifyallaction', ['tmid'=>data_get($staff, 'tmid'), 'phase'=>data_get($staff, 'tm_phase'), 'month'=>data_get($staff, 'tm_month'), 'year'=>data_get($staff, 'tm_year'), 'page'=>$page ]) }}';">Verify All</button>
</form>
</div> </div>
@endif @endif
......
...@@ -234,7 +234,6 @@ ...@@ -234,7 +234,6 @@
</table> </table>
@endif @endif
<!-- Overhead Notes End --> <!-- Overhead Notes End -->
</table> </table>
</div> </div>
</div> </div>
...@@ -305,6 +304,10 @@ ...@@ -305,6 +304,10 @@
</table> </table>
</div> </div>
<div class="content" style="padding-top: 0px;"> <div class="content" style="padding-top: 0px;">
<form class="ui form" action="{{ route('timesheet::dashboard.selectverification') }}" method="POST">
{{csrf_field()}}
<input type="hidden" name="tmid" value="{{data_get($staff,'tmid')}}">
<input type="hidden" name="page" value="{{$page}}">
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
<tr> <tr>
...@@ -320,7 +323,18 @@ ...@@ -320,7 +323,18 @@
@foreach($details as $key => $detail) @foreach($details as $key => $detail)
@if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid')) @if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid'))
<tr> <tr>
<td style="width: 10%;">{{data_get($detail, 'project.p_project_code')}}</td> <td style="width: 10%;" class="single line">
@if(data_get($detail,'tp_timesheet_sts') == 2)
<div class="ui toggle checkbox">
<input type="checkbox" name="pid[{{data_get($detail,'id')}}]" value="{{data_get($detail,'id')}}">
</div>
@else
<div class="ui toggle checkbox">
<input type="checkbox" disabled="disabled">
</div>
@endif
{{data_get($detail, 'project.p_project_code')}}
</td>
<td style="width: 15;">{{data_get($detail, 'tp_project_name')}}</td> <td style="width: 15;">{{data_get($detail, 'tp_project_name')}}</td>
<td style="width: 10%;" class="center aligned">{{data_get($detail, 'tp_hours')}}</td> <td style="width: 10%;" class="center aligned">{{data_get($detail, 'tp_hours')}}</td>
<td style="width: 10%;" class="center aligned"> <td style="width: 10%;" class="center aligned">
...@@ -339,7 +353,7 @@ ...@@ -339,7 +353,7 @@
</td> </td>
<td style="width: 12%;" class="text-center single line"> <td style="width: 12%;" class="text-center single line">
@if(data_get($detail, 'tp_timesheet_sts') == 2) @if(data_get($detail, 'tp_timesheet_sts') == 2)
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.projectaction', ['tpid'=>data_get($detail, 'id'), 'phase'=>data_get($staff,'tp_phase'), 'month'=>data_get($staff,'tp_month'), 'year'=>data_get($staff,'tp_year'), 'page'=>$page ]) }}';">Verify | Reject</button> <button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.projectaction', ['tpid'=>data_get($detail, 'id'), 'phase'=>data_get($staff,'tp_phase'), 'month'=>data_get($staff,'tp_month'), 'year'=>data_get($staff,'tp_year'), 'page'=>$page ]) }}';" type="button">Verify | Reject</button>
@else @else
<!-- <button class="center aligned ui green icon button disabled">Verify | Reject</button> --> <!-- <button class="center aligned ui green icon button disabled">Verify | Reject</button> -->
<a class="center aligned ui blue icon button" href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}" target="_blank">View</a> <a class="center aligned ui blue icon button" href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}" target="_blank">View</a>
...@@ -349,6 +363,9 @@ ...@@ -349,6 +363,9 @@
@endif @endif
@endforeach @endforeach
</table> </table>
<button type="submit" class="center aligned ui green icon button">Verify</button>
<button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.verifyallaction', ['tmid'=>data_get($staff, 'tmid'), 'phase'=>data_get($staff, 'phase'), 'month'=>data_get($staff, 'month'), 'year'=>data_get($staff, 'year'), 'page'=>$page ]) }}';">Verify All</button>
</form>
</div> </div>
@endif @endif
@endforeach @endforeach
......
...@@ -355,6 +355,10 @@ ...@@ -355,6 +355,10 @@
</div> </div>
<div class="content" style="padding-top: 0px;"> <div class="content" style="padding-top: 0px;">
<form class="ui form" action="{{ route('timesheet::dashboard.selectverification') }}" method="POST">
{{csrf_field()}}
<input type="hidden" name="tmid" value="{{data_get($staff,'tmid')}}">
<input type="hidden" name="page" value="{{$page}}">
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
...@@ -371,7 +375,18 @@ ...@@ -371,7 +375,18 @@
@foreach($details as $key => $detail) @foreach($details as $key => $detail)
@if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid')) @if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid'))
<tr> <tr>
<td style="width: 10%;">{{data_get($detail, 'project.p_project_code')}}</td> <td style="width: 10%;" class="single line">
@if(data_get($detail,'tp_timesheet_sts') == 2)
<div class="ui toggle checkbox">
<input type="checkbox" name="pid[{{data_get($detail,'id')}}]" value="{{data_get($detail,'id')}}">
</div>
@else
<div class="ui toggle checkbox">
<input type="checkbox" disabled="disabled">
</div>
@endif
{{data_get($detail, 'project.p_project_code')}}
</td>
<td style="width: 15;">{{data_get($detail, 'project.p_project_description')}}</td> <td style="width: 15;">{{data_get($detail, 'project.p_project_description')}}</td>
<td style="width: 10%;" class="center aligned">{{data_get($detail, 'tp_hours')}}</td> <td style="width: 10%;" class="center aligned">{{data_get($detail, 'tp_hours')}}</td>
<td style="width: 10%;" class="center aligned"> <td style="width: 10%;" class="center aligned">
...@@ -390,7 +405,7 @@ ...@@ -390,7 +405,7 @@
</td> </td>
<td style="width: 12%;" class="text-center single line"> <td style="width: 12%;" class="text-center single line">
@if(data_get($detail, 'tp_timesheet_sts') == 2) @if(data_get($detail, 'tp_timesheet_sts') == 2)
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.projectaction', ['tpid'=> data_get($detail, 'id'), 'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year'), 'page' => $page]) }}';">Verify | Reject</button> <button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.projectaction', ['tpid'=> data_get($detail, 'id'), 'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year'), 'page' => $page]) }}';" type="button">Verify | Reject</button>
@else @else
<!-- <button class="center aligned ui green icon button disabled">Verify | Reject</button> --> <!-- <button class="center aligned ui green icon button disabled">Verify | Reject</button> -->
<a class="center aligned ui blue icon button" href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}" target='_blank'>View</a> <a class="center aligned ui blue icon button" href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}" target='_blank'>View</a>
...@@ -423,7 +438,18 @@ ...@@ -423,7 +438,18 @@
@foreach($overheads as $key => $tp) @foreach($overheads as $key => $tp)
@if(data_get($staff, 'tmid') == data_get($tp, 'fk_tm_id')) @if(data_get($staff, 'tmid') == data_get($tp, 'fk_tm_id'))
<tr> <tr>
<td style="width: 25;">{{data_get($tp, 'tp_project_name')}}</td> <td style="width: 25;">
@if(data_get($tp,'tp_timesheet_sts') == 2)
<div class="ui toggle checkbox">
<input type="checkbox" name="pid[{{data_get($tp,'id')}}]" value="{{data_get($tp,'id')}}">
</div>
@else
<div class="ui toggle checkbox">
<input type="checkbox" disabled="disabled">
</div>
@endif
{{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')}}</td>
<td style="width: 10%;" class="center aligned"> <td style="width: 10%;" class="center aligned">
{{ number_format(data_get($tp, 'tp_hours')/8, 1, '.', '') }} {{ number_format(data_get($tp, 'tp_hours')/8, 1, '.', '') }}
...@@ -476,6 +502,10 @@ ...@@ -476,6 +502,10 @@
@endforeach @endforeach
</table> </table>
@endif @endif
<button type="submit" class="center aligned ui green icon button">Verify</button>
<button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.verifyallaction', ['tmid'=>data_get($staff, 'tmid'), 'phase'=>data_get($staff, 'tm_phase'), 'month'=>data_get($staff, 'tm_month'), 'year'=>data_get($staff, 'tm_year'), 'page'=>$page ]) }}';">Verify All</button>
</form>
</div> </div>
@endif @endif
@endforeach @endforeach
...@@ -563,7 +593,10 @@ ...@@ -563,7 +593,10 @@
</div> </div>
<div class="content" style="padding-top: 0px;"> <div class="content" style="padding-top: 0px;">
<form class="ui form" action="{{ route('timesheet::dashboard.selectverification') }}" method="POST">
{{csrf_field()}}
<input type="hidden" name="tmid" value="{{data_get($staff,'tmid')}}">
<input type="hidden" name="page" value="{{$page}}">
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
<tr> <tr>
...@@ -579,7 +612,18 @@ ...@@ -579,7 +612,18 @@
@foreach($details as $key => $detail) @foreach($details as $key => $detail)
@if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid')) @if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid'))
<tr> <tr>
<td style="width: 10%;">{{data_get($detail, 'project.p_project_code')}}</td> <td style="width: 10%;" class="single line">
@if(data_get($detail,'tp_timesheet_sts') == 2)
<div class="ui toggle checkbox">
<input type="checkbox" name="pid[{{data_get($detail,'id')}}]" value="{{data_get($detail,'id')}}">
</div>
@else
<div class="ui toggle checkbox">
<input type="checkbox" disabled="disabled">
</div>
@endif
{{data_get($detail, 'project.p_project_code')}}
</td>
<td style="width: 15;">{{data_get($detail, 'project.p_project_description')}}</td> <td style="width: 15;">{{data_get($detail, 'project.p_project_description')}}</td>
<td style="width: 10%;" class="center aligned">{{data_get($detail, 'tp_hours')}}</td> <td style="width: 10%;" class="center aligned">{{data_get($detail, 'tp_hours')}}</td>
<td style="width: 10%;" class="center aligned"> <td style="width: 10%;" class="center aligned">
...@@ -631,7 +675,18 @@ ...@@ -631,7 +675,18 @@
@foreach($overheads as $key => $tp) @foreach($overheads as $key => $tp)
@if(data_get($staff, 'tmid') == data_get($tp, 'fk_tm_id')) @if(data_get($staff, 'tmid') == data_get($tp, 'fk_tm_id'))
<tr> <tr>
<td style="width: 25;">{{data_get($tp, 'tp_project_name')}}</td> <td style="width: 25;" class="single line">
@if(data_get($tp,'tp_timesheet_sts') == 2)
<div class="ui toggle checkbox">
<input type="checkbox" name="pid[{{data_get($tp,'id')}}]" value="{{data_get($tp,'id')}}">
</div>
@else
<div class="ui toggle checkbox">
<input type="checkbox" disabled="disabled">
</div>
@endif
{{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')}}</td>
<td style="width: 10%;" class="center aligned"> <td style="width: 10%;" class="center aligned">
{{ number_format(data_get($tp, 'tp_hours')/8, 1, '.', '') }} {{ number_format(data_get($tp, 'tp_hours')/8, 1, '.', '') }}
...@@ -684,6 +739,9 @@ ...@@ -684,6 +739,9 @@
@endforeach @endforeach
</table> </table>
@endif @endif
<button type="submit" class="center aligned ui green icon button">Verify</button>
<button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.verifyallaction', ['tmid'=>data_get($staff, 'tmid'), 'phase'=>data_get($staff, 'tm_phase'), 'month'=>data_get($staff, 'tm_month'), 'year'=>data_get($staff, 'tm_year'), 'page'=>$page ]) }}';">Verify All</button>
</form>
</div> </div>
@endif @endif
@endforeach @endforeach
......
...@@ -49,6 +49,11 @@ Route::group( ...@@ -49,6 +49,11 @@ Route::group(
Route::post('approvalselected', ['uses' => 'DashboardController@approvalselected', 'as' => 'dashboard.approvalselected']); Route::post('approvalselected', ['uses' => 'DashboardController@approvalselected', 'as' => 'dashboard.approvalselected']);
Route::get('approveallaction', ['uses' => 'DashboardController@approveallaction', 'as' => 'dashboard.approveallaction']); Route::get('approveallaction', ['uses' => 'DashboardController@approveallaction', 'as' => 'dashboard.approveallaction']);
Route::post('approvalall', ['uses' => 'DashboardController@approvalall', 'as' => 'dashboard.approvalall']); Route::post('approvalall', ['uses' => 'DashboardController@approvalall', 'as' => 'dashboard.approvalall']);
Route::post('selectverification', ['uses' => 'DashboardController@selectverification', 'as' => 'dashboard.selectverification']);
Route::post('verificationselected', ['uses' => 'DashboardController@verificationselected', 'as' => 'dashboard.verificationselected']);
Route::get('selectverificationpage', ['uses' => 'DashboardController@selectverificationpage', 'as' => 'dashboard.selectverificationpage']);
Route::get('verifyallaction', ['uses' => 'DashboardController@verifyallaction', 'as' => 'dashboard.verifyallaction']);
Route::post('verificationall', ['uses' => 'DashboardController@verificationall', 'as' => 'dashboard.verificationall']);
//laporan //laporan
Route::get('ringkasanLaporan', ['uses' => 'ReportController@ringkasanLaporan', 'as' => 'report.ringkasanLaporan']); Route::get('ringkasanLaporan', ['uses' => 'ReportController@ringkasanLaporan', 'as' => 'report.ringkasanLaporan']);
......
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