Commit 17a5877a by Azhan Hannan

Dashboard HOD PM bezakan section PM dan Project

Bahagian timesheet kepada 2 section.
Section PMS
Selain PMS
parent 90a64481
...@@ -2,126 +2,96 @@ ...@@ -2,126 +2,96 @@
@section('content') @section('content')
<div class="ui segment">
<div class="ui blue left ribbon label">
Dashboard
</div>
<br>
<br>
<div class="ui styled fluid accordion"> <?php
<?php $page = 1; $project = $checksts = 0;?> // $pms = $others =;
@foreach($profile as $key => $staff) foreach ($profile as $key => $value) {
<?php // dd($value);
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)); if (data_get($value,'dept') == 4) {
$checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)->where('tp_timesheet_sts', 3)); $pms = $value;
?> } else {
@endforeach $others = $value;
@if($project == $checksts) }
<table class="ui unstackable celled table"> }
<thead> ?>
<tr>
<th class="text-center">All timesheet has been verified</th> @if($pms)
</tr> <div class="ui segment">
</thead> <div class="ui purple left ribbon label">
</table> PMS
@endif </div>
<br>
@foreach($profile as $key => $staff) <br>
<div class="ui styled fluid accordion">
<?php <?php
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)); $page = 1; $project = $checksts = 0;
$checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)->where('tp_timesheet_sts', 3)); $pmss = $profile->where('dept', 4);
?> ?>
@foreach($pmss as $key => $staff)
<?php
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID));
$checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)->where('tp_timesheet_sts', 3));
?>
@endforeach
@if($project == $checksts) @if($project == $checksts)
@else <table class="ui unstackable celled table">
<div class="title"> <thead>
<table class="ui unstackable celled table"> <tr>
<thead> <th class="text-center">All timesheet has been verified</th>
<tr> </tr>
<th style="width: 40%;"><i class="dropdown icon"></i>{{ data_get($staff,'fullname') }}</th> </thead>
<th style="width: 20%" class="text-center">{{ data_get($staff,'year') }} - {{ date("F", mktime(0, 0, 0, data_get($staff,'month'), 10)) }} - Phase {{ data_get($staff,'phase') }}</th> </table>
<th style="width: 15%;" class="center aligned"> @endif
<?php
// dd($profile); @foreach($pmss as $key => $staff)
$status = $staff->status; <?php
$verified = count(data_get($profile[$key], 'countchargeable')->where('tp_timesheet_sts', 3)); $project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID));
$allproject = count(data_get($profile[$key], 'countchargeable')); $checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)->where('tp_timesheet_sts', 3));
?> ?>
@if($status == 1 || $status == null) In Preparation
@elseif($verified == $allproject) <i class="green check icon"></i> Verified by PM @if($project == $checksts)
@elseif($status == 2) <i class="red attention icon"></i> Submitted @else
@elseif($status == 4) <i class="green check icon"></i>Verified by PD <div class="title">
@elseif($status == 5) <i class="red attention icon"></i>Dissaproved by PD <table class="ui unstackable celled table">
@elseif($status == 6) <i class="red attention icon"></i>Rejected by PM <thead>
@elseif($status == 7) <i class="red attention icon"></i>Rejected by HR <tr>
@endif <th style="width: 40%;"><i class="dropdown icon"></i>{{ data_get($staff,'fullname') }}</th>
</th> <th style="width: 20%" class="text-center">{{ data_get($staff,'year') }} - {{ date("F", mktime(0, 0, 0, data_get($staff,'month'), 10)) }} - Phase {{ data_get($staff,'phase') }}</th>
<th style="width: 13%" class="text-center">Submitted on: {{data_get($staff,'submission')}}</th> <th style="width: 15%;" class="center aligned">
<th style="width: 12%" class="text-center"> <?php
<button class="center aligned ui blue icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'tp_phase'), 'month' => data_get($staff,'tp_month'), 'year' => data_get($staff,'tp_year')]) }}';" target='_blank'>View</button> // dd($pmss);
</th> $status = $staff->status;
</tr> $verified = count(data_get($pmss[$key], 'countchargeable')->where('tp_timesheet_sts', 3));
</thead> $allproject = count(data_get($pmss[$key], 'countchargeable'));
</table> ?>
</div> @if($status == 1 || $status == null) In Preparation
@elseif($verified == $allproject) <i class="green check icon"></i> Verified by PM
<div class="content" style="padding-top: 0px;"> @elseif($status == 2) <i class="red attention icon"></i> Submitted
@elseif($status == 4) <i class="green check icon"></i>Verified by PD
<table class="ui unstackable celled table"> @elseif($status == 5) <i class="red attention icon"></i>Dissaproved by PD
<thead> @elseif($status == 6) <i class="red attention icon"></i>Rejected by PM
<tr> @elseif($status == 7) <i class="red attention icon"></i>Rejected by HR
<th style="width: 10%;">Project Code</th>
<th style="width: 15;">Project Name</th>
<th style="width: 10%;" class="center aligned">Total Hours</th>
<th style="width: 10%;" class="center aligned">Total Days</th>
<th style="width: 30%">Remarks</th>
<th style="width: 13%" class="text-center">Status</th>
<th style="width: 12%;" class="text-center">Action</th>
</tr>
</thead>
@foreach($details as $key => $detail)
@if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid'))
<tr>
<td style="width: 10%;">{{data_get($detail, 'project.p_project_code')}}</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">
{{ number_format(data_get($detail, 'tp_hours')/8, 1, '.', '') }}
</td>
<td style="width: 30%">{{data_get($detail, 'verifier_remark')}}</td>
<td style="width: 13%" class="text-center">
@if(data_get($detail, 'tp_timesheet_sts') == 1 || data_get($detail, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get($detail, 'tp_timesheet_sts') == 2) <i class="red attention icon"></i> Submitted
@elseif(data_get($detail, 'tp_timesheet_sts') == 3) <i class="green check icon"></i> Verified by PM
@elseif(data_get($detail, 'tp_timesheet_sts') == 4) <i class="green check icon"></i>Verified by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 5) <i class="red attention icon"></i>Dissaproved by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 6) <i class="red attention icon"></i>Rejected by PM
@elseif(data_get($detail, 'tp_timesheet_sts') == 7) <i class="red attention icon"></i>Rejected by HR
@endif @endif
</td> </th>
<td style="width: 12%;" class="text-center"> <th style="width: 13%" class="text-center">Submitted on: {{data_get($staff,'submission')}}</th>
@if(data_get($detail, 'tp_timesheet_sts') == 2) <th style="width: 12%" class="text-center">
<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 blue icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'tp_phase'), 'month' => data_get($staff,'tp_month'), 'year' => data_get($staff,'tp_year')]) }}';" target='_blank'>View</button>
@else </th>
<button class="center aligned ui green icon button disabled">Verify | Reject</button> </tr>
@endif </thead>
</td> </table>
</tr> </div>
@endif
@endforeach <div class="content" style="padding-top: 0px;">
</table>
<?php
$overhead = $overheads->where('staffid', $staff->staff_id);
$checkoverhead = $overheads->where('staffid', $staff->staff_id)->first();
?>
@if($checkoverhead)
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
<tr> <tr>
<th style="width: 25%;">Overhead</th> <th style="width: 10%;">Project Code</th>
<th style="width: 15;">Project Name</th>
<th style="width: 10%;" class="center aligned">Total Hours</th> <th style="width: 10%;" class="center aligned">Total Hours</th>
<th style="width: 10%;" class="center aligned">Total Days</th> <th style="width: 10%;" class="center aligned">Total Days</th>
<th style="width: 30%">Remarks</th> <th style="width: 30%">Remarks</th>
...@@ -129,66 +99,310 @@ ...@@ -129,66 +99,310 @@
<th style="width: 12%;" class="text-center">Action</th> <th style="width: 12%;" class="text-center">Action</th>
</tr> </tr>
</thead> </thead>
@foreach($details as $key => $detail)
@foreach($overheads as $key => $tp) @if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid'))
@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: 10%;">{{data_get($detail, 'project.p_project_code')}}</td>
<td style="width: 10%;" class="center aligned">{{data_get($tp, 'tp_hours')}}</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"> <td style="width: 10%;" class="center aligned">
{{ number_format(data_get($tp, 'tp_hours')/8, 1, '.', '') }} {{ number_format(data_get($detail, 'tp_hours')/8, 1, '.', '') }}
</td> </td>
<td style="width: 30%">{{data_get($tp, 'verifier_remark')}}</td> <td style="width: 30%">{{data_get($detail, 'verifier_remark')}}</td>
<td style="width: 13%" class="text-center"> <td style="width: 13%" class="text-center">
@if(data_get($tp, 'tp_timesheet_sts') == 1 || data_get($tp, 'tp_timesheet_sts') == null) In Preparation @if(data_get($detail, 'tp_timesheet_sts') == 1 || data_get($detail, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get($tp, 'tp_timesheet_sts') == 2) <i class="red attention icon"></i> Submitted @elseif(data_get($detail, 'tp_timesheet_sts') == 2) <i class="red attention icon"></i> Submitted
@elseif(data_get($tp, 'tp_timesheet_sts') == 3) <i class="green check icon"></i> Verified by HOD/HOU @elseif(data_get($detail, 'tp_timesheet_sts') == 3) <i class="green check icon"></i> Verified by PM
@elseif(data_get($tp, 'tp_timesheet_sts') == 4) <i class="green check icon"></i>Verified by BOD @elseif(data_get($detail, 'tp_timesheet_sts') == 4) <i class="green check icon"></i>Verified by PD
@elseif(data_get($tp, 'tp_timesheet_sts') == 5) <i class="red attention icon"></i>Dissaproved by BOD @elseif(data_get($detail, 'tp_timesheet_sts') == 5) <i class="red attention icon"></i>Dissaproved by PD
@elseif(data_get($tp, 'tp_timesheet_sts') == 6) <i class="red attention icon"></i>Rejected by HOD/HOU @elseif(data_get($detail, 'tp_timesheet_sts') == 6) <i class="red attention icon"></i>Rejected by PM
@elseif(data_get($tp, 'tp_timesheet_sts') == 7) <i class="red attention icon"></i>Rejected by HR @elseif(data_get($detail, '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">
@if(data_get($tp, '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.revaction', ['tpid'=>data_get($tp, 'id'), 'phase'=>data_get($tp, 'tp_phase'), 'month'=>data_get($tp, 'tp_month'), 'year'=>data_get($tp, 'tp_year') ]) }}';">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]) }}';">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
</td> </td>
</tr> </tr>
@endif @endif
@endforeach @endforeach
</table> </table>
<?php
$overhead = $overheads->where('staffid', $staff->staff_id);
$checkoverhead = $overheads->where('staffid', $staff->staff_id)->first();
?>
@if($checkoverhead)
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 25%;">Overhead</th>
<th style="width: 10%;" class="center aligned">Total Hours</th>
<th style="width: 10%;" class="center aligned">Total Days</th>
<th style="width: 30%">Remarks</th>
<th style="width: 13%" class="text-center">Status</th>
<th style="width: 12%;" class="text-center">Action</th>
</tr>
</thead>
@foreach($overheads 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>
<td style="width: 10%;" class="center aligned">{{data_get($tp, 'tp_hours')}}</td>
<td style="width: 10%;" class="center aligned">
{{ number_format(data_get($tp, 'tp_hours')/8, 1, '.', '') }}
</td>
<td style="width: 30%">{{data_get($tp, 'verifier_remark')}}</td>
<td style="width: 13%" class="text-center">
@if(data_get($tp, 'tp_timesheet_sts') == 1 || data_get($tp, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get($tp, 'tp_timesheet_sts') == 2) <i class="red attention icon"></i> Submitted
@elseif(data_get($tp, 'tp_timesheet_sts') == 3) <i class="green check icon"></i> Verified by HOD/HOU
@elseif(data_get($tp, 'tp_timesheet_sts') == 4) <i class="green check icon"></i>Verified by BOD
@elseif(data_get($tp, 'tp_timesheet_sts') == 5) <i class="red attention icon"></i>Dissaproved by BOD
@elseif(data_get($tp, 'tp_timesheet_sts') == 6) <i class="red attention icon"></i>Rejected by HOD/HOU
@elseif(data_get($tp, 'tp_timesheet_sts') == 7) <i class="red attention icon"></i>Rejected by HR
@endif
</td>
<td style="width: 12%;" class="text-center">
@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') ]) }}';">Verify | Reject</button>
@else
<button class="center aligned ui green icon button disabled">Verify | Reject</button>
@endif
</td>
</tr>
@endif
@endforeach
</table>
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned">Date</th>
<th style="width: 15%" class="single line"> Overhead Description</th>
<th class="center aligned">Notes</th>
</tr>
</thead>
@foreach($overheads as $key => $overhead)
@if(data_get($staff,'staff_id') == data_get($overhead, 'staffid'))
@foreach(data_get($overhead,'notes') as $key => $value)
@if(data_get($value,'td_hours'))
<tr>
<td style="width: 10%" class="center aligned">{{data_get($value, 'td_date')}}</td>
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td>
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endif
@endforeach
@endif
@endforeach
</table>
@endif
</div>
@endif
@endforeach
</div>
</div>
@endif
@if($others)
<div class="ui segment">
<div class="ui blue left ribbon label">
Other Departments
</div>
<br>
<br>
<div class="ui styled fluid accordion">
<?php
$page = 1; $project = $checksts = 0;
$notpms = $profile->where('dept', '<>',4);
?>
@foreach($notpms as $key => $staff)
<?php
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID));
$checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)->where('tp_timesheet_sts', 3));
?>
@endforeach
@if($project == $checksts)
<table class="ui unstackable celled table">
<thead>
<tr>
<th class="text-center">All timesheet has been verified</th>
</tr>
</thead>
</table>
@endif
@foreach($notpms as $key => $staff)
<?php
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID));
$checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)->where('tp_timesheet_sts', 3));
?>
@if($project == $checksts)
@else
<div class="title">
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
<tr> <tr>
<th style="width: 10%" class="center aligned">Date</th> <th style="width: 40%;"><i class="dropdown icon"></i>{{ data_get($staff,'fullname') }}</th>
<th style="width: 15%" class="single line"> Overhead Description</th> <th style="width: 20%" class="text-center">{{ data_get($staff,'year') }} - {{ date("F", mktime(0, 0, 0, data_get($staff,'month'), 10)) }} - Phase {{ data_get($staff,'phase') }}</th>
<th class="center aligned">Notes</th> <th style="width: 15%;" class="center aligned">
</tr> <?php
</thead> // dd($notpms);
@foreach($overheads as $key => $overhead) $status = $staff->status;
@if(data_get($staff,'staff_id') == data_get($overhead, 'staffid')) $verified = count(data_get($notpms[$key], 'countchargeable')->where('tp_timesheet_sts', 3));
@foreach(data_get($overhead,'notes') as $key => $value) $allproject = count(data_get($notpms[$key], 'countchargeable'));
@if(data_get($value,'td_hours')) ?>
<tr> @if($status == 1 || $status == null) In Preparation
<td style="width: 10%" class="center aligned">{{data_get($value, 'td_date')}}</td> @elseif($verified == $allproject) <i class="green check icon"></i> Verified by PM
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td> @elseif($status == 2) <i class="red attention icon"></i> Submitted
<td>{{data_get($value, 'td_overhead_note')}}</td> @elseif($status == 4) <i class="green check icon"></i>Verified by PD
</tr> @elseif($status == 5) <i class="red attention icon"></i>Dissaproved by PD
@elseif($status == 6) <i class="red attention icon"></i>Rejected by PM
@elseif($status == 7) <i class="red attention icon"></i>Rejected by HR
@endif @endif
@endforeach </th>
@endif <th style="width: 13%" class="text-center">Submitted on: {{data_get($staff,'submission')}}</th>
@endforeach <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' => data_get($staff,'tp_phase'), 'month' => data_get($staff,'tp_month'), 'year' => data_get($staff,'tp_year')]) }}';" target='_blank'>View</button>
</th>
</tr>
</thead>
</table>
</div>
<div class="content" style="padding-top: 0px;">
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%;">Project Code</th>
<th style="width: 15;">Project Name</th>
<th style="width: 10%;" class="center aligned">Total Hours</th>
<th style="width: 10%;" class="center aligned">Total Days</th>
<th style="width: 30%">Remarks</th>
<th style="width: 13%" class="text-center">Status</th>
<th style="width: 12%;" class="text-center">Action</th>
</tr>
</thead>
@foreach($details as $key => $detail)
@if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid'))
<tr>
<td style="width: 10%;">{{data_get($detail, 'project.p_project_code')}}</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">
{{ number_format(data_get($detail, 'tp_hours')/8, 1, '.', '') }}
</td>
<td style="width: 30%">{{data_get($detail, 'verifier_remark')}}</td>
<td style="width: 13%" class="text-center">
@if(data_get($detail, 'tp_timesheet_sts') == 1 || data_get($detail, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get($detail, 'tp_timesheet_sts') == 2) <i class="red attention icon"></i> Submitted
@elseif(data_get($detail, 'tp_timesheet_sts') == 3) <i class="green check icon"></i> Verified by PM
@elseif(data_get($detail, 'tp_timesheet_sts') == 4) <i class="green check icon"></i>Verified by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 5) <i class="red attention icon"></i>Dissaproved by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 6) <i class="red attention icon"></i>Rejected by PM
@elseif(data_get($detail, 'tp_timesheet_sts') == 7) <i class="red attention icon"></i>Rejected by HR
@endif
</td>
<td style="width: 12%;" class="text-center">
@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>
@else
<button class="center aligned ui green icon button disabled">Verify | Reject</button>
@endif
</td>
</tr>
@endif
@endforeach
</table> </table>
@endif
</div> <?php
@endif $overhead = $overheads->where('staffid', $staff->staff_id);
@endforeach $checkoverhead = $overheads->where('staffid', $staff->staff_id)->first();
?>
@if($checkoverhead)
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 25%;">Overhead</th>
<th style="width: 10%;" class="center aligned">Total Hours</th>
<th style="width: 10%;" class="center aligned">Total Days</th>
<th style="width: 30%">Remarks</th>
<th style="width: 13%" class="text-center">Status</th>
<th style="width: 12%;" class="text-center">Action</th>
</tr>
</thead>
@foreach($overheads 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>
<td style="width: 10%;" class="center aligned">{{data_get($tp, 'tp_hours')}}</td>
<td style="width: 10%;" class="center aligned">
{{ number_format(data_get($tp, 'tp_hours')/8, 1, '.', '') }}
</td>
<td style="width: 30%">{{data_get($tp, 'verifier_remark')}}</td>
<td style="width: 13%" class="text-center">
@if(data_get($tp, 'tp_timesheet_sts') == 1 || data_get($tp, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get($tp, 'tp_timesheet_sts') == 2) <i class="red attention icon"></i> Submitted
@elseif(data_get($tp, 'tp_timesheet_sts') == 3) <i class="green check icon"></i> Verified by HOD/HOU
@elseif(data_get($tp, 'tp_timesheet_sts') == 4) <i class="green check icon"></i>Verified by BOD
@elseif(data_get($tp, 'tp_timesheet_sts') == 5) <i class="red attention icon"></i>Dissaproved by BOD
@elseif(data_get($tp, 'tp_timesheet_sts') == 6) <i class="red attention icon"></i>Rejected by HOD/HOU
@elseif(data_get($tp, 'tp_timesheet_sts') == 7) <i class="red attention icon"></i>Rejected by HR
@endif
</td>
<td style="width: 12%;" class="text-center">
@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') ]) }}';">Verify | Reject</button>
@else
<button class="center aligned ui green icon button disabled">Verify | Reject</button>
@endif
</td>
</tr>
@endif
@endforeach
</table>
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned">Date</th>
<th style="width: 15%" class="single line"> Overhead Description</th>
<th class="center aligned">Notes</th>
</tr>
</thead>
@foreach($overheads as $key => $overhead)
@if(data_get($staff,'staff_id') == data_get($overhead, 'staffid'))
@foreach(data_get($overhead,'notes') as $key => $value)
@if(data_get($value,'td_hours'))
<tr>
<td style="width: 10%" class="center aligned">{{data_get($value, 'td_date')}}</td>
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td>
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endif
@endforeach
@endif
@endforeach
</table>
@endif
</div>
@endif
@endforeach
</div>
</div> </div>
</div> @endif
@endsection @endsection
......
...@@ -144,12 +144,13 @@ class DashboardController extends Controller ...@@ -144,12 +144,13 @@ class DashboardController extends Controller
$verifier = Users::find(Auth::id()); $verifier = Users::find(Auth::id());
$profile = VwChargeableVerification::select('tmid', 'staff_id', 'year', 'month', 'phase', 'status', 'submission', 'fullname', 'roleid', 'pmstaffid') $profile = VwChargeableVerification::select('tmid', 'staff_id', 'year', 'month', 'phase', 'status', 'submission', 'fullname', 'roleid', 'pmstaffid', 'dept')
->where('pmstaffid', $verifier->u_staffID) ->where('pmstaffid', $verifier->u_staffID)
->where('status', 2) ->where('status', 2)
->distinct('staff_id') ->distinct('staff_id')
->orderby('roleid') ->orderby('roleid')
->with('countchargeable') ->with('countchargeable')
// ->with('department')
->get(); ->get();
// dd($profile); // dd($profile);
......
...@@ -28,6 +28,11 @@ class VwChargeableVerification extends Model ...@@ -28,6 +28,11 @@ class VwChargeableVerification extends Model
return $this->hasMany('Portal\Timesheet\Model\Tproject','fk_tm_id','tmid')->where('tp_project_type', 1); return $this->hasMany('Portal\Timesheet\Model\Tproject','fk_tm_id','tmid')->where('tp_project_type', 1);
} }
// public function department()
// {
// return $this->hasOne('Portal\Timesheet\Model\Staff_info','staff_id','staff_id');
// }
public function info() public function info()
{ {
......
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