Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
3
3f-timesheet
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dockers
3f-timesheet
Commits
20406395
Commit
20406395
authored
Oct 25, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checking null error for dashboard pmhod
parent
17a5877a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
315 additions
and
299 deletions
+315
-299
packages/portal/timesheet/resources/views/dashboard/dashboardpmhod.blade.php
+315
-299
No files found.
packages/portal/timesheet/resources/views/dashboard/dashboardpmhod.blade.php
View file @
20406395
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<?php
<?php
// $pms = $others =
;
$pms
=
$others
=
null
;
foreach
(
$profile
as
$key
=>
$value
)
{
foreach
(
$profile
as
$key
=>
$value
)
{
// dd($value);
// dd($value);
if
(
data_get
(
$value
,
'dept'
)
==
4
)
{
if
(
data_get
(
$value
,
'dept'
)
==
4
)
{
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
}
}
?>
?>
@if($pms)
<div
class=
"ui segment"
>
<div
class=
"ui segment"
>
<div
class=
"ui purple left ribbon label"
>
<div
class=
"ui purple left ribbon label"
>
PMS
PMS
...
@@ -29,118 +28,70 @@
...
@@ -29,118 +28,70 @@
$pmss
=
$profile
->
where
(
'dept'
,
4
);
$pmss
=
$profile
->
where
(
'dept'
,
4
);
?>
?>
@foreach($pmss as $key => $staff)
@if($pms)
<?php
@foreach($pmss as $key => $staff)
$project
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
));
<?php
$checksts
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
->
where
(
'tp_timesheet_sts'
,
3
));
$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
?>
@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($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
));
?>
@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($pmss);
$status
=
$staff
->
status
;
$verified
=
count
(
data_get
(
$pmss
[
$key
],
'countchargeable'
)
->
where
(
'tp_timesheet_sts'
,
3
));
$allproject
=
count
(
data_get
(
$pmss
[
$key
],
'countchargeable'
));
?>
@if($status == 1 || $status == null) In Preparation
@elseif($verified == $allproject)
<i
class=
"green check icon"
></i>
Verified by PM
@elseif($status == 2)
<i
class=
"red attention icon"
></i>
Submitted
@elseif($status == 4)
<i
class=
"green check icon"
></i>
Verified by PD
@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
</th>
<th
style=
"width: 13%"
class=
"text-center"
>
Submitted on: {{data_get($staff,'submission')}}
</th>
<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"
>
@foreach($pmss as $key => $staff)
<thead>
<?php
<tr>
$project
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
));
<th
style=
"width: 10%;"
>
Project Code
</th>
$checksts
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
->
where
(
'tp_timesheet_sts'
,
3
));
<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>
@if($project == $checksts)
<th
style=
"width: 30%"
>
Remarks
</th>
@else
<th
style=
"width: 13%"
class=
"text-center"
>
Status
</th>
<div
class=
"title"
>
<th
style=
"width: 12%;"
class=
"text-center"
>
Action
</th>
<table
class=
"ui unstackable celled table"
>
</tr>
<thead>
</thead>
<tr>
@foreach($details as $key => $detail)
<th
style=
"width: 40%;"
><i
class=
"dropdown icon"
></i>
{{ data_get($staff,'fullname') }}
</th>
@if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid'))
<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>
<tr>
<th
style=
"width: 15%;"
class=
"center aligned"
>
<td
style=
"width: 10%;"
>
{{data_get($detail, 'project.p_project_code')}}
</td>
<?php
<td
style=
"width: 15;"
>
{{data_get($detail, 'project.p_project_description')}}
</td>
// dd($pmss);
<td
style=
"width: 10%;"
class=
"center aligned"
>
{{data_get($detail, 'tp_hours')}}
</td>
$status
=
$staff
->
status
;
<td
style=
"width: 10%;"
class=
"center aligned"
>
$verified
=
count
(
data_get
(
$pmss
[
$key
],
'countchargeable'
)
->
where
(
'tp_timesheet_sts'
,
3
));
{{ number_format(data_get($detail, 'tp_hours')/8, 1, '.', '') }}
$allproject
=
count
(
data_get
(
$pmss
[
$key
],
'countchargeable'
));
</td>
?>
<td
style=
"width: 30%"
>
{{data_get($detail, 'verifier_remark')}}
</td>
@if($status == 1 || $status == null) In Preparation
<td
style=
"width: 13%"
class=
"text-center"
>
@elseif($verified == $allproject)
<i
class=
"green check icon"
></i>
Verified by PM
@if(data_get($detail, 'tp_timesheet_sts') == 1 || data_get($detail, 'tp_timesheet_sts') == null) In Preparation
@elseif($status == 2)
<i
class=
"red attention icon"
></i>
Submitted
@elseif(data_get($detail, 'tp_timesheet_sts') == 2)
<i
class=
"red attention icon"
></i>
Submitted
@elseif($status == 4)
<i
class=
"green check icon"
></i>
Verified by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 3)
<i
class=
"green check icon"
></i>
Verified by PM
@elseif($status == 5)
<i
class=
"red attention icon"
></i>
Dissaproved by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 4)
<i
class=
"green check icon"
></i>
Verified by PD
@elseif($status == 6)
<i
class=
"red attention icon"
></i>
Rejected by PM
@elseif(data_get($detail, 'tp_timesheet_sts') == 5)
<i
class=
"red attention icon"
></i>
Dissaproved by PD
@elseif($status == 7)
<i
class=
"red attention icon"
></i>
Rejected by HR
@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
</table>
<?php
<div
class=
"content"
style=
"padding-top: 0px;"
>
$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>
...
@@ -148,69 +99,125 @@
...
@@ -148,69 +99,125 @@
<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 BO
D
@elseif(data_get($
detail, 'tp_timesheet_sts') == 4)
<i
class=
"green check icon"
></i>
Verified by P
D
@elseif(data_get($
tp, 'tp_timesheet_sts') == 5)
<i
class=
"red attention icon"
></i>
Dissaproved by BO
D
@elseif(data_get($
detail, 'tp_timesheet_sts') == 5)
<i
class=
"red attention icon"
></i>
Dissaproved by P
D
@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>
<table
class=
"ui unstackable celled table"
>
<?php
<thead>
$overhead
=
$overheads
->
where
(
'staffid'
,
$staff
->
staff_id
);
<tr>
$checkoverhead
=
$overheads
->
where
(
'staffid'
,
$staff
->
staff_id
)
->
first
();
<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>
@if($checkoverhead)
</tr>
<table
class=
"ui unstackable celled table"
>
</thead>
<thead>
@foreach($overheads as $key => $overhead)
<tr>
@if(data_get($staff,'staff_id') == data_get($overhead, 'staffid'))
<th
style=
"width: 25%;"
>
Overhead
</th>
@foreach(data_get($overhead,'notes') as $key => $value)
<th
style=
"width: 10%;"
class=
"center aligned"
>
Total Hours
</th>
@if(data_get($value,'td_hours'))
<th
style=
"width: 10%;"
class=
"center aligned"
>
Total Days
</th>
<tr>
<th
style=
"width: 30%"
>
Remarks
</th>
<td
style=
"width: 10%"
class=
"center aligned"
>
{{data_get($value, 'td_date')}}
</td>
<th
style=
"width: 13%"
class=
"text-center"
>
Status
</th>
<td
style=
"width: 15%"
class=
"single line"
>
{{data_get($value, 'td_overhead_desc')}}
</td>
<th
style=
"width: 12%;"
class=
"text-center"
>
Action
</th>
<td>
{{data_get($value, 'td_overhead_note')}}
</td>
</tr>
</tr>
</thead>
@endif
@endforeach
@foreach($overheads as $key => $tp)
@endif
@if(data_get($staff, 'tmid') == data_get($tp, 'fk_tm_id'))
@endforeach
<tr>
</table>
<td
style=
"width: 25;"
>
{{data_get($tp, 'tp_project_name')}}
</td>
@endif
<td
style=
"width: 10%;"
class=
"center aligned"
>
{{data_get($tp, 'tp_hours')}}
</td>
</div>
<td
style=
"width: 10%;"
class=
"center aligned"
>
@endif
{{ number_format(data_get($tp, 'tp_hours')/8, 1, '.', '') }}
@endforeach
</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
@else
<table
class=
"ui unstackable celled table"
>
<thead>
<tr>
<th
class=
"text-center"
>
No pending verification
</th>
</tr>
</thead>
</table>
@endif
</div>
</div>
</div>
</div>
@endif
@if($others)
<div
class=
"ui segment"
>
<div
class=
"ui segment"
>
<div
class=
"ui blue left ribbon label"
>
<div
class=
"ui blue left ribbon label"
>
Other Departments
Other Departments
...
@@ -224,117 +231,69 @@
...
@@ -224,117 +231,69 @@
$notpms
=
$profile
->
where
(
'dept'
,
'<>'
,
4
);
$notpms
=
$profile
->
where
(
'dept'
,
'<>'
,
4
);
?>
?>
@foreach($notpms as $key => $staff)
@if($others)
<?php
@foreach($notpms as $key => $staff)
$project
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
));
<?php
$checksts
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
->
where
(
'tp_timesheet_sts'
,
3
));
$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)
@endforeach
<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)
@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($notpms);
$status
=
$staff
->
status
;
$verified
=
count
(
data_get
(
$notpms
[
$key
],
'countchargeable'
)
->
where
(
'tp_timesheet_sts'
,
3
));
$allproject
=
count
(
data_get
(
$notpms
[
$key
],
'countchargeable'
));
?>
@if($status == 1 || $status == null) In Preparation
@elseif($verified == $allproject)
<i
class=
"green check icon"
></i>
Verified by PM
@elseif($status == 2)
<i
class=
"red attention icon"
></i>
Submitted
@elseif($status == 4)
<i
class=
"green check icon"
></i>
Verified by PD
@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
</th>
<th
style=
"width: 13%"
class=
"text-center"
>
Submitted on: {{data_get($staff,'submission')}}
</th>
<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"
>
@foreach($notpms as $key => $staff)
<thead>
<?php
<tr>
$project
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
));
<th
style=
"width: 10%;"
>
Project Code
</th>
$checksts
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
->
where
(
'tp_timesheet_sts'
,
3
));
<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>
@if($project == $checksts)
<th
style=
"width: 30%"
>
Remarks
</th>
@else
<th
style=
"width: 13%"
class=
"text-center"
>
Status
</th>
<div
class=
"title"
>
<th
style=
"width: 12%;"
class=
"text-center"
>
Action
</th>
<table
class=
"ui unstackable celled table"
>
</tr>
<thead>
</thead>
<tr>
@foreach($details as $key => $detail)
<th
style=
"width: 40%;"
><i
class=
"dropdown icon"
></i>
{{ data_get($staff,'fullname') }}
</th>
@if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid'))
<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>
<tr>
<th
style=
"width: 15%;"
class=
"center aligned"
>
<td
style=
"width: 10%;"
>
{{data_get($detail, 'project.p_project_code')}}
</td>
<?php
<td
style=
"width: 15;"
>
{{data_get($detail, 'project.p_project_description')}}
</td>
// dd($notpms);
<td
style=
"width: 10%;"
class=
"center aligned"
>
{{data_get($detail, 'tp_hours')}}
</td>
$status
=
$staff
->
status
;
<td
style=
"width: 10%;"
class=
"center aligned"
>
$verified
=
count
(
data_get
(
$notpms
[
$key
],
'countchargeable'
)
->
where
(
'tp_timesheet_sts'
,
3
));
{{ number_format(data_get($detail, 'tp_hours')/8, 1, '.', '') }}
$allproject
=
count
(
data_get
(
$notpms
[
$key
],
'countchargeable'
));
</td>
?>
<td
style=
"width: 30%"
>
{{data_get($detail, 'verifier_remark')}}
</td>
@if($status == 1 || $status == null) In Preparation
<td
style=
"width: 13%"
class=
"text-center"
>
@elseif($verified == $allproject)
<i
class=
"green check icon"
></i>
Verified by PM
@if(data_get($detail, 'tp_timesheet_sts') == 1 || data_get($detail, 'tp_timesheet_sts') == null) In Preparation
@elseif($status == 2)
<i
class=
"red attention icon"
></i>
Submitted
@elseif(data_get($detail, 'tp_timesheet_sts') == 2)
<i
class=
"red attention icon"
></i>
Submitted
@elseif($status == 4)
<i
class=
"green check icon"
></i>
Verified by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 3)
<i
class=
"green check icon"
></i>
Verified by PM
@elseif($status == 5)
<i
class=
"red attention icon"
></i>
Dissaproved by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 4)
<i
class=
"green check icon"
></i>
Verified by PD
@elseif($status == 6)
<i
class=
"red attention icon"
></i>
Rejected by PM
@elseif(data_get($detail, 'tp_timesheet_sts') == 5)
<i
class=
"red attention icon"
></i>
Dissaproved by PD
@elseif($status == 7)
<i
class=
"red attention icon"
></i>
Rejected by HR
@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
</table>
<?php
<div
class=
"content"
style=
"padding-top: 0px;"
>
$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>
...
@@ -342,67 +301,124 @@
...
@@ -342,67 +301,124 @@
<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 BO
D
@elseif(data_get($
detail, 'tp_timesheet_sts') == 4)
<i
class=
"green check icon"
></i>
Verified by P
D
@elseif(data_get($
tp, 'tp_timesheet_sts') == 5)
<i
class=
"red attention icon"
></i>
Dissaproved by BO
D
@elseif(data_get($
detail, 'tp_timesheet_sts') == 5)
<i
class=
"red attention icon"
></i>
Dissaproved by P
D
@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>
<table
class=
"ui unstackable celled table"
>
<?php
<thead>
$overhead
=
$overheads
->
where
(
'staffid'
,
$staff
->
staff_id
);
<tr>
$checkoverhead
=
$overheads
->
where
(
'staffid'
,
$staff
->
staff_id
)
->
first
();
<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>
@if($checkoverhead)
</tr>
<table
class=
"ui unstackable celled table"
>
</thead>
<thead>
@foreach($overheads as $key => $overhead)
<tr>
@if(data_get($staff,'staff_id') == data_get($overhead, 'staffid'))
<th
style=
"width: 25%;"
>
Overhead
</th>
@foreach(data_get($overhead,'notes') as $key => $value)
<th
style=
"width: 10%;"
class=
"center aligned"
>
Total Hours
</th>
@if(data_get($value,'td_hours'))
<th
style=
"width: 10%;"
class=
"center aligned"
>
Total Days
</th>
<tr>
<th
style=
"width: 30%"
>
Remarks
</th>
<td
style=
"width: 10%"
class=
"center aligned"
>
{{data_get($value, 'td_date')}}
</td>
<th
style=
"width: 13%"
class=
"text-center"
>
Status
</th>
<td
style=
"width: 15%"
class=
"single line"
>
{{data_get($value, 'td_overhead_desc')}}
</td>
<th
style=
"width: 12%;"
class=
"text-center"
>
Action
</th>
<td>
{{data_get($value, 'td_overhead_note')}}
</td>
</tr>
</tr>
</thead>
@endif
@endforeach
@foreach($overheads as $key => $tp)
@endif
@if(data_get($staff, 'tmid') == data_get($tp, 'fk_tm_id'))
@endforeach
<tr>
</table>
<td
style=
"width: 25;"
>
{{data_get($tp, 'tp_project_name')}}
</td>
@endif
<td
style=
"width: 10%;"
class=
"center aligned"
>
{{data_get($tp, 'tp_hours')}}
</td>
</div>
<td
style=
"width: 10%;"
class=
"center aligned"
>
@endif
{{ number_format(data_get($tp, 'tp_hours')/8, 1, '.', '') }}
@endforeach
</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
@else
<table
class=
"ui unstackable celled table"
>
<thead>
<tr>
<th
class=
"text-center"
>
No pending verification
</th>
</tr>
</thead>
</table>
@endif
</div>
</div>
</div>
</div>
@endif
@endsection
@endsection
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment