Commit 73f57338 by Azhan Hannan

Integration → tproject tak added dalam table. tapi ada ts_detail

parent 90c767b3
......@@ -110,7 +110,6 @@
@if(data_get($chargeable, 'tp_timesheet_sts') == 3)
<button class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.approvalaction', ['tpid'=>data_get($chargeable, 'id'), 'phase'=>data_get($chargeable, 'tp_phase'), 'month'=>data_get($chargeable, 'tp_month'), 'year'=>data_get($chargeable, 'tp_year'), 'page'=>$page ]) }}';">Approval</button>
@else
<!-- <button class="center aligned ui green icon button disabled">Approval</button> -->
<a class="center aligned ui blue icon button" 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</a>
@endif
</td>
......@@ -139,7 +138,6 @@
@if(data_get($staff,'tmid') == data_get($overhead,'fk_tm_id'))
<tr>
<td style="width: 25%;" class="single line">
<!-- {{data_get($overhead,'id')}} -->
@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')}}">
......@@ -169,7 +167,6 @@
@if(data_get($overhead, 'tp_timesheet_sts') == 3)
<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
<!-- <button type="button" class="center aligned ui green icon button disabled">Approval</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>
@endif
</td>
......
......@@ -10,12 +10,9 @@
<div class="ui styled fluid accordion">
<?php $page = 1; ?>
@foreach($profile as $key => $staff)
@if(data_get($staff,'status') == 2 || data_get($staff,'status') == 3)
@if(data_get($staff,'status') == 2 || data_get($staff,'status') == 3 || data_get($staff,'status') == 6 )
<?php
// dd($details);
// $detail = $details->where('staffid', $staff->staff_id)->where('fk_tm_id', $staff->tmid)->where('tp_timesheet_sts', 2);
$detail = $details->where('staffid', $staff->staff_id)->where('fk_tm_id', $staff->tmid)->where('tp_project_type', 3)->whereIn('tp_timesheet_sts', [2,3,6]);
// dump($detail);
$ts = $checkts->where('tm_staff_id', $staff->staff_id);
?>
......@@ -31,16 +28,14 @@
<th style="width: 15%;" class="center aligned">
<?php
$overheadverified = 0;
// dd($details);
foreach ($details as $key => $value) {
foreach ($details as $key => $value)
{
if(data_get($value,'staffid') == data_get($staff,'staff_id') && data_get($value,'tp_timesheet_sts') == 3)
$overheadverified += 1;
}
// dump($overheadverified);
// dump(data_get($staff,'status'));
}
?>
@if($staff->status == 7) <i class="red attention icon"></i>Rejected by HR
@elseif($staff->status == 6) <i class="red attention icon"></i>Rejected by HOD/HOU
@elseif($staff->status == 5) <i class="red attention icon"></i>Dissaproved by BOD
......@@ -74,6 +69,7 @@
</thead>
@foreach($detail as $key => $tp)
@if(data_get($staff, 'tmid') == data_get($tp, 'fk_tm_id'))
<tr>
<td style="width: 25;">{{data_get($tp, 'tp_project_name')}}</td>
......@@ -96,7 +92,6 @@
@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>
@else
<!-- <button class="center aligned ui green icon button disabled">Verify | Reject</button> -->
<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
</td>
......
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