Commit eaf562e1 by Azhan Hannan

select approval and approve all pages

parent 37a1a6de
...@@ -338,6 +338,7 @@ ...@@ -338,6 +338,7 @@
@endif @endif
</div> </div>
<div class="ui segment"> <div class="ui segment">
<form action="{{ route('timesheet::dashboard.approval') }}" method="POST" class="ui form"> <form action="{{ route('timesheet::dashboard.approval') }}" method="POST" class="ui form">
{{csrf_field()}} {{csrf_field()}}
...@@ -367,7 +368,7 @@ ...@@ -367,7 +368,7 @@
<div class="two fields"> <div class="two fields">
<div class="field"> <div class="field">
<input type="hidden" name="approval" value="{{ data_get($bod,'id') }}"> <input type="hidden" name="approval" value="{{ data_get($bod,'id') }}">
<label>Pelulus</label> <label>Approver</label>
<input type="text" readonly="readonly" value="{{ data_get($bod,'name') }}"> <input type="text" readonly="readonly" value="{{ data_get($bod,'name') }}">
</div> </div>
<div class="field"> <div class="field">
......
...@@ -54,7 +54,10 @@ ...@@ -54,7 +54,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.selectapproval') }}" method="POST">
{{csrf_field()}}
<input type="hidden" name="tmid" value="{{data_get($staff,'tmid')}}">
<input type="hidden" name="page" value="{{$page}}">
@if($checkchargeable) @if($checkchargeable)
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
...@@ -71,9 +74,23 @@ ...@@ -71,9 +74,23 @@
</thead> </thead>
@if($detail->where('tp_project_type', 1)) @if($detail->where('tp_project_type', 1))
@foreach($detail->where('tp_project_type', 1) as $key => $chargeable) @foreach($detail->where('tp_project_type', 1) as $key => $chargeable)
<?php
// dd($chargeable);
?>
@if(data_get($staff,'tmid') == data_get($chargeable,'fk_tm_id')) @if(data_get($staff,'tmid') == data_get($chargeable,'fk_tm_id'))
<tr> <tr>
<td style="width: 10%;">{{ data_get($chargeable, 'project.p_project_code') }}</td> <td style="width: 10%;" class="single line">
@if(data_get($chargeable,'tp_timesheet_sts') == 3)
<div class="ui toggle checkbox">
<input type="checkbox" name="pid[{{data_get($chargeable,'id')}}]" value="{{data_get($chargeable,'id')}}">
</div>
@else
<div class="ui toggle checkbox">
<input type="checkbox" disabled="disabled">
</div>
@endif
{{ data_get($chargeable, 'project.p_project_code') }}
</td>
<td style="width: 15%;">{{ data_get($chargeable, 'tp_project_name') }}</td> <td style="width: 15%;">{{ data_get($chargeable, 'tp_project_name') }}</td>
<td style="width: 10%;" class="center aligned">{{ data_get($chargeable, 'tp_hours') }}</td> <td style="width: 10%;" class="center aligned">{{ data_get($chargeable, 'tp_hours') }}</td>
<td style="width: 10%;" class="center aligned">{{ number_format(data_get($chargeable, 'tp_hours')/8, 1, '.', '') }}</td> <td style="width: 10%;" class="center aligned">{{ number_format(data_get($chargeable, 'tp_hours')/8, 1, '.', '') }}</td>
...@@ -121,7 +138,18 @@ ...@@ -121,7 +138,18 @@
@foreach($detail->where('tp_project_type', 3) as $key => $overhead) @foreach($detail->where('tp_project_type', 3) as $key => $overhead)
@if(data_get($staff,'tmid') == data_get($overhead,'fk_tm_id')) @if(data_get($staff,'tmid') == data_get($overhead,'fk_tm_id'))
<tr> <tr>
<td style="width: 25%;">{{ data_get($overhead, 'tp_project_name') }}</td> <td style="width: 25%;" class="single line">
@if(data_get($overhead,'tp_timesheet_sts') == 3)
<div class="ui toggle checkbox">
<input type="checkbox" name="pid[{{data_get($overhead,'id')}}]" value="{{data_get($overhead,'id')}}">
</div>
@else
<div class="ui toggle checkbox">
<input type="checkbox" disabled="disabled">
</div>
@endif
{{ data_get($overhead, 'tp_project_name') }}
</td>
<td style="width: 10%;" class="center aligned">{{ data_get($overhead, 'tp_hours') }}</td> <td style="width: 10%;" class="center aligned">{{ data_get($overhead, 'tp_hours') }}</td>
<td style="width: 10%;" class="center aligned">{{ number_format(data_get($overhead, 'tp_hours')/8, 1, '.', '') }}</td> <td style="width: 10%;" class="center aligned">{{ number_format(data_get($overhead, 'tp_hours')/8, 1, '.', '') }}</td>
<td style="width: 15%;">{{data_get($overhead, 'verifier_remark')}}</td> <td style="width: 15%;">{{data_get($overhead, 'verifier_remark')}}</td>
...@@ -138,11 +166,11 @@ ...@@ -138,11 +166,11 @@
</td> </td>
<td style="width: 10%;" class="text-center single line"> <td style="width: 10%;" class="text-center single line">
@if(data_get($overhead, 'tp_timesheet_sts') == 3) @if(data_get($overhead, 'tp_timesheet_sts') == 3)
<button class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.approvalaction', ['tpid'=>data_get($overhead, 'id'), 'phase'=>data_get($overhead, 'tp_phase'), 'month'=>data_get($overhead, 'tp_month'), 'year'=>data_get($overhead, 'tp_year'), 'page'=>$page ]) }}';">Approval</button> <button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.approvalaction', ['tpid'=>data_get($overhead, 'id'), 'phase'=>data_get($overhead, 'tp_phase'), 'month'=>data_get($overhead, 'tp_month'), 'year'=>data_get($overhead, 'tp_year'), 'page'=>$page ]) }}';">Approval</button>
@else @else
<button class="center aligned ui green icon button disabled">Approval</button> <button type="button" class="center aligned ui green icon button disabled">Approval</button>
@endif @endif
<button class="center aligned ui blue icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staffid') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}';" target='_blank'>View</button> <a href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staffid') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}" type="button" class="center aligned ui blue icon button" target='_blank'>View</a>
</td> </td>
</tr> </tr>
@endif @endif
...@@ -247,6 +275,11 @@ ...@@ -247,6 +275,11 @@
</tbody> </tbody>
</table> </table>
@endif @endif
<button type="submit" class="center aligned ui green icon button">Approve</button>
<button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.approveallaction', ['tmid'=>data_get($staff, 'tmid'), 'phase'=>data_get($staff, 'phase'), 'month'=>data_get($staff, 'month'), 'year'=>data_get($staff, 'year'), 'page'=>$page ]) }}';">Approve All</button>
</form>
</div> </div>
@endif @endif
......
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