Commit 8d742d8e by Azhan Hannan

changes timesheet review

parent dc9e756b
...@@ -12,9 +12,10 @@ ...@@ -12,9 +12,10 @@
@foreach($profile as $key => $staff) @foreach($profile as $key => $staff)
@if(data_get($staff,'status') == 2) @if(data_get($staff,'status') == 2)
<?php <?php
$detail = $details->where('staffid', $staff->staff_id)->where('fk_tm_id', $staff->tmid)->where('tp_project_sts', 2); // $detail = $details->where('staffid', $staff->staff_id)->where('fk_tm_id', $staff->tmid)->where('tp_project_sts', 2);
$detail = $details->where('staffid', $staff->staff_id)->where('fk_tm_id', $staff->tmid);
// dump(count($detail));
$ts = $checkts->where('tm_staff_id', $staff->staff_id); $ts = $checkts->where('tm_staff_id', $staff->staff_id);
// dump($detail);
?> ?>
@if(count($detail) > 0) @if(count($detail) > 0)
......
...@@ -14,7 +14,10 @@ ...@@ -14,7 +14,10 @@
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
<tr> <tr>
<th style="width: 60%;"><i class="dropdown icon"></i>{{ data_get($staff,'fullname') }}</th> <th style="width: 40%;"><i class="dropdown icon"></i>{{ data_get($staff,'fullname') }}</th>
<th style="width: 20%" class="text-center">
@if(data_get($staff,'tm_phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, data_get($staff,'tm_month'), 10)) }} - {{ data_get($staff,'tm_year') }}
</th>
<th style="width: 15%;" class="center aligned"> <th style="width: 15%;" class="center aligned">
<?php <?php
$over = 0; $over = 0;
...@@ -35,9 +38,9 @@ ...@@ -35,9 +38,9 @@
@elseif($staff->status == 1 || $staff->status == null) In Preparation @elseif($staff->status == 1 || $staff->status == null) In Preparation
@endif @endif
</th> </th>
<th style="width: 13%" class="text-center">Submitted on: {{data_get($staff,'submission')}}</th> <th style="width: 13%" class="text-center">Submitted on: {{ date("d/m/Y", strtotime(data_get($staff,'submission'))) }}</th>
<th style="width: 12%" class="text-center"> <th style="width: 12%" class="text-center">
<button class="center aligned ui blue icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => $phase, 'month' => $month, 'year' => $year ]) }}';" target='_blank'>View</button> <button class="center aligned ui blue icon button">View Details</button>
</th> </th>
</tr> </tr>
</thead> </thead>
...@@ -79,12 +82,13 @@ ...@@ -79,12 +82,13 @@
@elseif(data_get($tp, 'tp_timesheet_sts') == 7) <i class="red attention icon"></i>Rejected by HR @elseif(data_get($tp, 'tp_timesheet_sts') == 7) <i class="red attention icon"></i>Rejected by HR
@endif @endif
</td> </td>
<td style="width: 12%;" class="text-center"> <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'=>$phase, 'month'=>$month, 'year'=>$year ]) }}';">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'=>$phase, 'month'=>$month, 'year'=>$year ]) }}';">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>
@endif @endif
<a href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => $phase, 'month' => $month, 'year' => $year ]) }}" class="center aligned ui blue icon button" target='_blank'>View</a>
</td> </td>
</tr> </tr>
@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