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
8f726ed6
Commit
8f726ed6
authored
Dec 01, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log Pia #163 -> ISU: EN fairuz tak dapat tindakan unuk resubmit
parent
52e25770
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
582 additions
and
352 deletions
+582
-352
packages/portal/timesheet/resources/views/dashboard/dashboardpmhod.blade.php
+553
-348
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+29
-4
No files found.
packages/portal/timesheet/resources/views/dashboard/dashboardpmhod.blade.php
View file @
8f726ed6
...
@@ -2,6 +2,211 @@
...
@@ -2,6 +2,211 @@
@
section
(
'content'
)
@
section
(
'content'
)
<!--
Staff
Timesheet
Section
Start
-->
<
div
class
="
ui
segment
">
<!-- <a class="
ui
blue
left
ribbon
label
">Welcome Back</a>
<br>
<br> -->
<!-- <div class="
column
sixteen
wide
">
<div class="
ui
cards
four
doubling
">
<a href="
/
home
" class="
ui
card
">
<div class="
content
">
<h3 class="
header
link
">Timesheet Baru Hantar</h3>
</div>
<div class="
extra
content
">
<span class="
right
floated
"><i class="
american
sign
language
interpreting
icon
"></i>1</span>
</div>
</a>
<a href="
/
home
" class="
ui
card
">
<div class="
content
">
<h3 class="
header
link
">Timesheet Belum Hantar </h3>
</div>
<div class="
extra
content
">
<span class="
right
floated
"><i class="
retweet
icon
"></i>1</span>
</div>
</a>
<a href="
/
home
" class="
ui
card
">
<div class="
content
">
<h3 class="
header
link
">Timesheet Diluluskan</h3>
</div>
<div class="
extra
content
">
<span class="
right
floated
"><i class="
icon
calendar
check
outline
"></i>1</span>
</div>
</a>
</div>
</div>
<br> -->
<a class="
ui
teal
left
ribbon
label
">Timesheet Status</a>
<br>
<br>
@foreach(
$timesheet
as
$key
=>
$value
)
<!-- <?php
// dd(
$value->tm_timesheet_master_sts
);
?> -->
<div class="
ui
styled
fluid
accordion
">
<?php
$page
= 1; ?>
<div class="
title
">
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
<th style="
width
:
60
%
" class="
text
-
center
">
@if(data_get(
$value
,'tm_phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("
F
", mktime(0, 0, 0, data_get(
$value
,'tm_month'), 10)) }} - {{ data_get(
$value
,'tm_year') }}
</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">
@if(data_get(
$value
,'tm_timesheet_master_sts') == 1) Draft
@elseif(data_get(
$value
,'tm_timesheet_master_sts') == 2) <i class="
green
check
icon
"></i> Submitted
@elseif(data_get(
$value
,'tm_timesheet_master_sts') == 3) <i class="
green
check
icon
"></i> Verified by HOD/HOU/PM
@elseif(data_get(
$value
,'tm_timesheet_master_sts') == 4) <i class="
green
check
icon
"></i> Approved by PD
@elseif(data_get(
$value
,'tm_timesheet_master_sts') == 5) <i class="
red
attention
icon
"></i> Rejected by PD
@elseif(data_get(
$value
,'tm_timesheet_master_sts') == 6) <i class="
red
attention
icon
"></i> Rejected by HOD/HOU/PM
@endif
</th>
<th style="
width
:
13
%
" class="
text
-
center
">Submitted on: {{ date("
d
/
m
/
Y
", strtotime(data_get(
$value
,'tm_submission_at'))) }}</th>
<th style="
width
:
12
%
" class="
text
-
center
">
<button class="
center
aligned
ui
blue
icon
button
">View Project</button>
</th>
</tr>
</thead>
</table>
</div>
<?php
$chargeable
=
$projects->where
('tp_project_type', 1)->where('fk_tm_id', data_get(
$value
,'id'));
$overhead
=
$projects->where
('tp_project_type', 3)->where('fk_tm_id', data_get(
$value
,'id'));
// dd(
$overhead
);
?>
<div class="
content
" style="
padding
-
top
:
0
px
;
">
<!-- chargeable -->
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
<th style="
width
:
7
%
;
" class="
text
-
center
">Project Code</th>
<th style="
width
:
13
;
">Project Name</th>
<th style="
width
:
15
;
">Project Manager</th>
<!-- <th style="
width
:
5
%
;
" class="
center
aligned
">Total Hours</th>
<th style="
width
:
5
%
;
" class="
center
aligned
">Total Days</th> -->
<th style="
width
:
20
%
">PM Remarks</th>
<th style="
width
:
20
%
">PD Remarks</th>
<th style="
width
:
13
%
" class="
text
-
center
">Status</th>
<th style="
width
:
12
%
;
" class="
text
-
center
">Action</th>
</tr>
</thead>
@if(count(
$chargeable
) == '0')
<tr>
<td class="
text
-
center
" colspan="
5
">No Project Submitted</td>
</tr>
@else
@foreach(
$chargeable
as
$key
=>
$tpcharge
)
<tr>
<td style="
width
:
7
%
;
" class="
text
-
center
">
{
{data_get($tpcharge,'project.p_project_code')}
}
</td>
<td style="
width
:
13
;
">
{
{data_get($tpcharge,'tp_project_name')}
}
</td>
<td style="
width
:
15
;
">
{
{data_get($tpcharge,'project.projectManager.fullname')}
}
</td>
<!-- <td style="
width
:
5
%
;
" class="
center
aligned
">
{
{data_get($tpcharge,'tp_hours')}
}
</td>
<td style="
width
:
5
%
;
" class="
center
aligned
">
{
{data_get($tpcharge,'tp_hours')/8}
}
</td> -->
<td style="
width
:
20
%
">
{
{data_get($tpcharge,'verifier_remark')}
}
</td>
<td style="
width
:
20
%
">
{
{data_get($tpcharge,'approver_remark')}
}
</td>
<td style="
width
:
13
%
" class="
text
-
center
">
@if(data_get(
$tpcharge
,'tp_timesheet_sts') == 1) Draft
@elseif(data_get(
$tpcharge
,'tp_timesheet_sts') == 2) Submitted
@elseif(data_get(
$tpcharge
,'tp_timesheet_sts') == 3) Verified by PM
@elseif(data_get(
$tpcharge
,'tp_timesheet_sts') == 4) Approved by PD
@elseif(data_get(
$tpcharge
,'tp_timesheet_sts') == 5) Rejected by PD
@elseif(data_get(
$tpcharge
,'tp_timesheet_sts') == 6) Rejected by PM
@endif
</td>
<td style="
width
:
12
%
;
" class="
text
-
center
">
@if(data_get(
$tpcharge
,'tp_timesheet_sts') == 5|| data_get(
$tpcharge
,'tp_timesheet_sts') == 6)
<button class="
center
aligned
ui
red
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
rejected
', ['
tpid
' => data_get($tpcharge,'
id
')]) }}'
;
">Resubmit</button>
@elseif(data_get(
$tpcharge
,'tp_timesheet_sts') == 2) Waiting for Verification
@elseif(data_get(
$tpcharge
,'tp_timesheet_sts') == 3) Waiting for Approval
@else
<!-- <button class="
center
aligned
ui
red
icon
button
disabled
">Resubmit</button> -->
@endif
</td>
</tr>
@endforeach
@endif
</table>
<!-- overhead -->
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
@if( data_get(
$staffinfo
,'penyokong') == '0' )
<th style="
width
:
20
%
;
">Overhead</th>
<th style="
width
:
20
%
;
">Approver</th>
<th style="
width
:
35
%
;
">Bod Remarks</th>
@else
<th style="
width
:
17
%
;
">Overhead</th>
<th style="
width
:
15
%
;
">Verifier</th>
<th style="
width
:
20
%
;
">Verifier Remarks</th>
<th style="
width
:
20
%
;
">Approver Remarks</th>
@endif
<!-- <th style="
width
:
5
%
;
" class="
center
aligned
">Total Hours</th>
<th style="
width
:
5
%
;
" class="
center
aligned
">Total Days</th> -->
<th style="
width
:
13
%
;
" class="
text
-
center
">Status</th>
<th style="
width
:
12
%
;
" class="
text
-
center
">Action</th>
</tr>
</thead>
@if(count(
$overhead
) == 0)
<tr>
<td class="
text
-
center
" colspan="
5
">No Overhead Submitted</td>
</tr>
@else
@foreach(
$overhead
as
$key
=>
$tpoverhead
)
<tr>
@if( data_get(
$staffinfo
,'penyokong') == '0' )
<td style="
width
:
20
%
;
">
{
{data_get($tpoverhead,'tp_project_name')}
}
</td>
<td style="
width
:
20
%
;
" class="
single
line
">
{
{data_get($tpoverhead,'bod.fullname')}
}
</td>
<td style="
width
:
35
%
;
">
{
{data_get($tpoverhead,'approver_remark')}
}
</td>
<td style="
width
:
13
%
;
" class="
text
-
center
">
@if(data_get(
$tpoverhead
,'tp_timesheet_sts') == 1) Draft
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 2) Submitted
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 3) Auto-verified
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 4) Approved by BOD
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 5) Rejected by BOD
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 6) Rejected by HOD
@endif
</td>
@else
<td style="
width
:
15
%
;
">
{
{data_get($tpoverhead,'tp_project_name')}
}
</td>
<td style="
width
:
15
%
;
" class="
single
line
">
{
{data_get($tpoverhead,'hod.fullname')}
}
</td>
<td style="
width
:
20
%
;
">
{
{data_get($tpoverhead,'verifier_remark')}
}
</td>
<td style="
width
:
20
%
;
">
{
{data_get($tpoverhead,'approver_remark')}
}
</td>
<td style="
width
:
13
%
;
" class="
text
-
center
">
@if(data_get(
$tpoverhead
,'tp_timesheet_sts') == 1) Draft
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 2) Submitted
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 3) Verified by HOD
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 4) Approved by BOD
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 5) Rejected by BOD
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 6) Rejected by HOD
@endif
</td>
@endif
<!-- <td style="
width
:
5
%
;
" class="
center
aligned
">
{
{data_get($tpoverhead,'tp_hours')}
}
</td>
<td style="
width
:
5
%
;
" class="
center
aligned
">
{
{data_get($tpoverhead,'tp_hours')/8}
}
</td> -->
<td style="
width
:
12
%
;
" class="
text
-
center
">
@if(data_get(
$tpoverhead
,'tp_timesheet_sts') == 5 || data_get(
$tpoverhead
,'tp_timesheet_sts') == 6)
<button class="
center
aligned
ui
red
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
rejected
', ['
tpid
' => data_get($tpoverhead,'
id
')]) }}'
;
">Resubmit</button>
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 2) Waiting for Verification
@elseif(data_get(
$tpoverhead
,'tp_timesheet_sts') == 3) Waiting for Approval
@else
<!-- <button class="
center
aligned
ui
red
icon
button
disabled
">Resubmit</button> -->
@endif
</td>
</tr>
@endforeach
@endif
</table>
</div>
</div>
<br>
@endforeach
<!-- <br> -->
</div>
<!-- Staff Timesheet Section End -->
<?php
<?php
$pms
=
$others
= null;
$pms
=
$others
= null;
...
@@ -15,86 +220,137 @@
...
@@ -15,86 +220,137 @@
}
}
?>
?>
<div
class=
"ui segment"
>
<div class="
ui
segment
">
<div
class=
"ui purple left ribbon label"
>
<div class="
ui
purple
left
ribbon
label
">
PMS
PMS
</div>
</div>
<br>
<br>
<br>
<br>
<div
class=
"ui styled fluid accordion"
>
<div class="
ui
styled
fluid
accordion
">
<?php
<?php
$page
=
1
;
$page
= 1;
$project
=
$checksts
=
0
;
$project
=
$checksts
= 0;
$pmss
=
$profile
->
where
(
'dept'
,
4
);
$pmss
=
$profile->where
('dept', 4);
?>
?>
@if(
$pms
)
@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($pms)
@if(
$project
==
$checksts
)
@foreach($pmss as $key => $staff)
<table class="
ui
unstackable
celled
table
">
<?php
<thead>
$project
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
));
<tr>
$checksts
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
->
where
(
'tp_timesheet_sts'
,
3
));
<th class="
text
-
center
">All timesheet has been verified</th>
?>
</tr>
@endforeach
</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
)
<table
class=
"ui unstackable celled table"
>
@else
<thead>
<div class="
title
">
<tr>
<table class="
ui
unstackable
celled
table
">
<th
class=
"text-center"
>
All timesheet has been verified
</th>
<thead>
</tr>
<tr>
</thead>
<th style="
width
:
40
%
;
"><i class="
dropdown
icon
"></i>{{ data_get(
$staff
,'fullname') }}</th>
</table>
<th style="
width
:
20
%
" class="
text
-
center
">
@endif
@if(data_get(
$staff
,'phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("
F
", mktime(0, 0, 0, data_get(
$staff
,'month'), 10)) }} - {{ data_get(
$staff
,'year') }}
</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">
<?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: {{ date("
d
/
m
/
Y
", strtotime(data_get(
$staff
,'submission'))) }}</th>
<th style="
width
:
12
%
" class="
text
-
center
">
<button class="
center
aligned
ui
blue
icon
button
">View Details</button>
</th>
</tr>
</thead>
</table>
</div>
@foreach($pmss as $key => $staff)
<div class="
content
" style="
padding
-
top
:
0
px
;
">
<?php
$project
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
));
<table class="
ui
unstackable
celled
table
">
$checksts
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
->
where
(
'tp_timesheet_sts'
,
3
));
<thead>
?>
<tr>
<th style="
width
:
10
%
;
">Project Code</th>
@if($project == $checksts)
<th style="
width
:
15
;
">Project Name</th>
@else
<th style="
width
:
10
%
;
" class="
center
aligned
">Total Hours</th>
<div
class=
"title"
>
<th style="
width
:
10
%
;
" class="
center
aligned
">Total Days</th>
<table
class=
"ui unstackable celled table"
>
<th style="
width
:
30
%
">Remarks</th>
<thead>
<th style="
width
:
13
%
" class="
text
-
center
">Status</th>
<tr>
<th style="
width
:
12
%
;
" class="
text
-
center
">Action</th>
<th
style=
"width: 40%;"
><i
class=
"dropdown icon"
></i>
{{ data_get($staff,'fullname') }}
</th>
</tr>
<th
style=
"width: 20%"
class=
"text-center"
>
</thead>
@if(data_get($staff,'phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, data_get($staff,'month'), 10)) }} - {{ data_get($staff,'year') }}
@foreach(
$details
as
$key
=>
$detail
)
</th>
@if(data_get(
$detail
,'fk_tm_id') == data_get(
$staff
, 'tmid'))
<th
style=
"width: 15%;"
class=
"center aligned"
>
<tr>
<?php
<td style="
width
:
10
%
;
">{{data_get(
$detail
, 'project.p_project_code')}}</td>
// dd($pmss);
<td style="
width
:
15
;
">{{data_get(
$detail
, 'project.p_project_description')}}</td>
$status
=
$staff
->
status
;
<td style="
width
:
10
%
;
" class="
center
aligned
">{{data_get(
$detail
, 'tp_hours')}}</td>
$verified
=
count
(
data_get
(
$pmss
[
$key
],
'countchargeable'
)
->
where
(
'tp_timesheet_sts'
,
3
));
<td style="
width
:
10
%
;
" class="
center
aligned
">
$allproject
=
count
(
data_get
(
$pmss
[
$key
],
'countchargeable'
));
{{ number_format(data_get(
$detail
, 'tp_hours')/8, 1, '.', '') }}
?>
</td>
@if($status == 1 || $status == null) In Preparation
<td style="
width
:
30
%
">{{data_get(
$detail
, 'verifier_remark')}}</td>
@elseif($verified == $allproject)
<i
class=
"green check icon"
></i>
Verified by PM
<td style="
width
:
13
%
" class="
text
-
center
">
@elseif($status == 2)
<i
class=
"red attention icon"
></i>
Submitted
@if(data_get(
$detail
, 'tp_timesheet_sts') == 1 || data_get(
$detail
, 'tp_timesheet_sts') == null) In Preparation
@elseif($status == 4)
<i
class=
"green check icon"
></i>
Verified by PD
@elseif(data_get(
$detail
, 'tp_timesheet_sts') == 2) <i class="
red
attention
icon
"></i> Submitted
@elseif($status == 5)
<i
class=
"red attention icon"
></i>
Dissaproved by PD
@elseif(data_get(
$detail
, 'tp_timesheet_sts') == 3) <i class="
green
check
icon
"></i> Verified by PM
@elseif($status == 6)
<i
class=
"red attention icon"
></i>
Rejected by PM
@elseif(data_get(
$detail
, 'tp_timesheet_sts') == 4) <i class="
green
check
icon
"></i>Verified by PD
@elseif($status == 7)
<i
class=
"red attention icon"
></i>
Rejected by HR
@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
</th>
</td>
<th
style=
"width: 13%"
class=
"text-center"
>
Submitted on: {{ date("d/m/Y", strtotime(data_get($staff,'submission'))) }}
</th>
<td style="
width
:
12
%
;
" class="
text
-
center
single
line
">
<th
style=
"width: 12%"
class=
"text-center"
>
@if(data_get(
$detail
, 'tp_timesheet_sts') == 2)
<button
class=
"center aligned ui blue icon button"
>
View Details
</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,'
phase
'), '
month
' => data_get($staff,'
month
'), '
year
' => data_get($staff,'
year
'), '
page
' => $page]) }}'
;
">Verify | Reject</button>
</th>
@else
</tr>
<!-- <button class="
center
aligned
ui
green
icon
button
disabled
">Verify | Reject</button> -->
</thead>
<a class="
center
aligned
ui
blue
icon
button
" href="
{{
route
(
'timesheet::dashboard.timesheetViewer'
,
[
'user'
=>
data_get
(
$staff
,
'staff_id'
)
,
'phase'
=>
data_get
(
$staff
,
'phase'
),
'month'
=>
data_get
(
$staff
,
'month'
),
'year'
=>
data_get
(
$staff
,
'year'
)])
}}
" target='_blank'>View</a>
</table>
@endif
</div>
<div
class=
"content"
style=
"padding-top: 0px;"
>
</td>
</tr>
@endif
@endforeach
</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: 10%;"
>
Project Code
</th>
<th style="
width
:
25
%
;
">Overhead</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>
...
@@ -102,32 +358,32 @@
...
@@ -102,32 +358,32 @@
<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)
@if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid'))
@foreach(
$overheads
as
$key
=>
$tp
)
@if(data_get(
$staff
, 'tmid') == data_get(
$tp
, 'fk_tm_id'))
<tr>
<tr>
<td
style=
"width: 10%;"
>
{{data_get($detail, 'project.p_project_code')}}
</td>
<td style="
width
:
25
;
">{{data_get(
$tp
, 'tp_project_name')}}</td>
<td
style=
"width: 15;"
>
{{data_get($detail, 'project.p_project_description')}}
</td>
<td style="
width
:
10
%
;
" class="
center
aligned
">{{data_get(
$tp
, 'tp_hours')}}</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($detail
, 'tp_hours')/8, 1, '.', '') }}
{{ number_format(data_get(
$tp
, 'tp_hours')/8, 1, '.', '') }}
</td>
</td>
<td
style=
"width: 30%"
>
{{data_get($
detail
, 'verifier_remark')}}
</td>
<td style="
width
:
30
%
">{{data_get(
$
tp
, 'verifier_remark')}}</td>
<td style="
width
:
13
%
" class="
text
-
center
">
<td style="
width
:
13
%
" class="
text
-
center
">
@if(data_get($
detail, 'tp_timesheet_sts') == 1 || data_get($detail
, 'tp_timesheet_sts') == null) In Preparation
@if(data_get(
$
tp
, 'tp_timesheet_sts') == 1 || data_get(
$tp
, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get($
detail
, 'tp_timesheet_sts') == 2)
<i
class=
"red attention icon"
></i>
Submitted
@elseif(data_get(
$
tp
, '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(
$
tp
, 'tp_timesheet_sts') == 3) <i class="
green
check
icon
"></i> Verified by HOD/HOU
@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') == 4) <i class="
green
check
icon
"></i>Verified 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') == 5) <i class="
red
attention
icon
"></i>Dissaproved by BO
D
@elseif(data_get($
detail, 'tp_timesheet_sts') == 6)
<i
class=
"red attention icon"
></i>
Rejected by PM
@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') == 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
single
line
">
<td style="
width
:
12
%
;
" class="
text
-
center
single
line
">
@if(data_get($
detail
, '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.projectaction', ['tpid'=> data_get($detail, 'id'), 'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year'), 'page' => $page
]) }}';"
>
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
'=>data_get($tp, '
tp_phase
'), '
month
'=>data_get($tp, '
tp_month
'), '
year
'=>data_get($tp, '
tp_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> -->
<a
class=
"center aligned ui blue icon button"
href=
"{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}
"
target=
'_blank'
>
View
</a>
<a 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,'
phase
'), '
month
' => data_get($staff,'
month
'), '
year
' => data_get($staff,'
year
')]) }}'
;
" target='_blank'>View</a>
@endif
@endif
</td>
</td>
...
@@ -135,174 +391,174 @@
...
@@ -135,174 +391,174 @@
@endif
@endif
@endforeach
@endforeach
</table>
</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
">{{ date("
d
-
m
-
Y
", strtotime(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>
<?php
<div class="
ui
segment
">
$overhead
=
$overheads
->
where
(
'staffid'
,
$staff
->
staff_id
);
<div class="
ui
blue
left
ribbon
label
">
$checkoverhead
=
$overheads
->
where
(
'staffid'
,
$staff
->
staff_id
)
->
first
();
Other Departments
?>
@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 single line"
>
@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> -->
<a
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,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}';"
target=
'_blank'
>
View
</a>
@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"
>
{{ date("d-m-Y", strtotime(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>
<br>
<br>
<div
class=
"ui segment"
>
<div class="
ui
styled
fluid
accordion
">
<div
class=
"ui blue left ribbon label"
>
<?php
Other Departments
$page
= 1;
$project
=
$checksts
= 0;
</div>
$notpms
=
$profile->where
('dept', '<>',4);
<br>
?>
<br>
<div
class=
"ui styled fluid accordion"
>
@if(
$others
)
<?php
@foreach(
$notpms
as
$key
=>
$staff
)
$page
=
1
;
$project
=
$checksts
=
0
;
<?php
$notpms
=
$profile
->
where
(
'dept'
,
'<>'
,
4
);
$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
@if($others)
@foreach(
$notpms
as
$key
=>
$staff
)
@foreach($notpms as $key => $staff)
<?php
<?php
$project
= count(data_get(
$staff
,'countchargeable')->where('tp_pm',
$verifier->u_staffID
));
$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));
$checksts
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
->
where
(
'tp_timesheet_sts'
,
3
));
?>
?>
@endforeach
@if(
$project
==
$checksts
)
@if(
$project
==
$checksts
)
<table
class=
"ui unstackable celled table"
>
@else
<thead>
<div class="
title
">
<tr>
<table class="
ui
unstackable
celled
table
">
<th
class=
"text-center"
>
All timesheet has been verified
</th>
<thead>
</tr>
<tr>
</thead>
<th style="
width
:
40
%
;
"><i class="
dropdown
icon
"></i>{{ data_get(
$staff
,'fullname') }}</th>
</table>
<th style="
width
:
20
%
" class="
text
-
center
">
@endif
@if(data_get(
$staff
,'phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("
F
", mktime(0, 0, 0, data_get(
$staff
,'month'), 10)) }} - {{ data_get(
$staff
,'year') }}
</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">
<?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: {{ date("
d
/
m
/
Y
", strtotime(data_get(
$staff
,'submission'))) }}</th>
<th style="
width
:
12
%
" class="
text
-
center
">
<button class="
center
aligned
ui
blue
icon
button
">View Details</button>
</th>
</tr>
</thead>
</table>
</div>
@foreach($notpms as $key => $staff)
<div class="
content
" style="
padding
-
top
:
0
px
;
">
<?php
$project
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
));
<table class="
ui
unstackable
celled
table
">
$checksts
=
count
(
data_get
(
$staff
,
'countchargeable'
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
->
where
(
'tp_timesheet_sts'
,
3
));
<thead>
?>
<tr>
<th style="
width
:
10
%
;
">Project Code</th>
@if($project == $checksts)
<th style="
width
:
15
;
">Project Name</th>
@else
<th style="
width
:
10
%
;
" class="
center
aligned
">Total Hours</th>
<div
class=
"title"
>
<th style="
width
:
10
%
;
" class="
center
aligned
">Total Days</th>
<table
class=
"ui unstackable celled table"
>
<th style="
width
:
30
%
">Remarks</th>
<thead>
<th style="
width
:
13
%
" class="
text
-
center
">Status</th>
<tr>
<th style="
width
:
12
%
;
" class="
text
-
center
">Action</th>
<th
style=
"width: 40%;"
><i
class=
"dropdown icon"
></i>
{{ data_get($staff,'fullname') }}
</th>
</tr>
<th
style=
"width: 20%"
class=
"text-center"
>
</thead>
@if(data_get($staff,'phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, data_get($staff,'month'), 10)) }} - {{ data_get($staff,'year') }}
@foreach(
$details
as
$key
=>
$detail
)
</th>
@if(data_get(
$detail
,'fk_tm_id') == data_get(
$staff
, 'tmid'))
<th
style=
"width: 15%;"
class=
"center aligned"
>
<tr>
<?php
<td style="
width
:
10
%
;
">{{data_get(
$detail
, 'project.p_project_code')}}</td>
// dd($notpms);
<td style="
width
:
15
;
">{{data_get(
$detail
, 'project.p_project_description')}}</td>
$status
=
$staff
->
status
;
<td style="
width
:
10
%
;
" class="
center
aligned
">{{data_get(
$detail
, 'tp_hours')}}</td>
$verified
=
count
(
data_get
(
$notpms
[
$key
],
'countchargeable'
)
->
where
(
'tp_timesheet_sts'
,
3
));
<td style="
width
:
10
%
;
" class="
center
aligned
">
$allproject
=
count
(
data_get
(
$notpms
[
$key
],
'countchargeable'
));
{{ number_format(data_get(
$detail
, 'tp_hours')/8, 1, '.', '') }}
?>
</td>
@if($status == 1 || $status == null) In Preparation
<td style="
width
:
30
%
">{{data_get(
$detail
, 'verifier_remark')}}</td>
@elseif($verified == $allproject)
<i
class=
"green check icon"
></i>
Verified by PM
<td style="
width
:
13
%
" class="
text
-
center
">
@elseif($status == 2)
<i
class=
"red attention icon"
></i>
Submitted
@if(data_get(
$detail
, 'tp_timesheet_sts') == 1 || data_get(
$detail
, 'tp_timesheet_sts') == null) In Preparation
@elseif($status == 4)
<i
class=
"green check icon"
></i>
Verified by PD
@elseif(data_get(
$detail
, 'tp_timesheet_sts') == 2) <i class="
red
attention
icon
"></i> Submitted
@elseif($status == 5)
<i
class=
"red attention icon"
></i>
Dissaproved by PD
@elseif(data_get(
$detail
, 'tp_timesheet_sts') == 3) <i class="
green
check
icon
"></i> Verified by PM
@elseif($status == 6)
<i
class=
"red attention icon"
></i>
Rejected by PM
@elseif(data_get(
$detail
, 'tp_timesheet_sts') == 4) <i class="
green
check
icon
"></i>Verified by PD
@elseif($status == 7)
<i
class=
"red attention icon"
></i>
Rejected by HR
@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
</th>
</td>
<th
style=
"width: 13%"
class=
"text-center"
>
Submitted on: {{ date("d/m/Y", strtotime(data_get($staff,'submission'))) }}
</th>
<td style="
width
:
12
%
;
" class="
text
-
center
single
line
">
<th
style=
"width: 12%"
class=
"text-center"
>
@if(data_get(
$detail
, 'tp_timesheet_sts') == 2)
<button
class=
"center aligned ui blue icon button"
>
View Details
</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>
</th>
@else
</tr>
<!-- <button class="
center
aligned
ui
green
icon
button
disabled
">Verify | Reject</button> -->
</thead>
<a class="
center
aligned
ui
blue
icon
button
" href="
{{
route
(
'timesheet::dashboard.timesheetViewer'
,
[
'user'
=>
data_get
(
$staff
,
'staff_id'
)
,
'phase'
=>
data_get
(
$staff
,
'phase'
),
'month'
=>
data_get
(
$staff
,
'month'
),
'year'
=>
data_get
(
$staff
,
'year'
)])
}}
" target='_blank'>View</a>
</table>
@endif
</div>
</td>
</tr>
@endif
@endforeach
</table>
<div
class=
"content"
style=
"padding-top: 0px;"
>
<?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: 10%;"
>
Project Code
</th>
<th style="
width
:
25
%
;
">Overhead</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>
...
@@ -310,32 +566,32 @@
...
@@ -310,32 +566,32 @@
<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)
@if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid'))
@foreach(
$overheads
as
$key
=>
$tp
)
@if(data_get(
$staff
, 'tmid') == data_get(
$tp
, 'fk_tm_id'))
<tr>
<tr>
<td
style=
"width: 10%;"
>
{{data_get($detail, 'project.p_project_code')}}
</td>
<td style="
width
:
25
;
">{{data_get(
$tp
, 'tp_project_name')}}</td>
<td
style=
"width: 15;"
>
{{data_get($detail, 'project.p_project_description')}}
</td>
<td style="
width
:
10
%
;
" class="
center
aligned
">{{data_get(
$tp
, 'tp_hours')}}</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($detail
, 'tp_hours')/8, 1, '.', '') }}
{{ number_format(data_get(
$tp
, 'tp_hours')/8, 1, '.', '') }}
</td>
</td>
<td
style=
"width: 30%"
>
{{data_get($
detail
, 'verifier_remark')}}
</td>
<td style="
width
:
30
%
">{{data_get(
$
tp
, 'verifier_remark')}}</td>
<td style="
width
:
13
%
" class="
text
-
center
">
<td style="
width
:
13
%
" class="
text
-
center
">
@if(data_get($
detail, 'tp_timesheet_sts') == 1 || data_get($detail
, 'tp_timesheet_sts') == null) In Preparation
@if(data_get(
$
tp
, 'tp_timesheet_sts') == 1 || data_get(
$tp
, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get($
detail
, 'tp_timesheet_sts') == 2)
<i
class=
"red attention icon"
></i>
Submitted
@elseif(data_get(
$
tp
, '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(
$
tp
, 'tp_timesheet_sts') == 3) <i class="
green
check
icon
"></i> Verified by HOD/HOU
@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') == 4) <i class="
green
check
icon
"></i>Verified 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') == 5) <i class="
red
attention
icon
"></i>Dissaproved by BO
D
@elseif(data_get($
detail, 'tp_timesheet_sts') == 6)
<i
class=
"red attention icon"
></i>
Rejected by PM
@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') == 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
single
line
">
<td style="
width
:
12
%
;
" class="
text
-
center
single
line
">
@if(data_get($
detail
, '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.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
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
@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> -->
<a
class=
"center aligned ui blue icon button"
href=
"{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'
phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'
year')]) }}"
target=
'_blank'
>
View
</a>
<a class="
center
aligned
ui
blue
icon
button
" 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</a>
@endif
@endif
</td>
</td>
...
@@ -343,95 +599,44 @@
...
@@ -343,95 +599,44 @@
@endif
@endif
@endforeach
@endforeach
</table>
</table>
<?php
<table class="
ui
unstackable
celled
table
">
$overhead
=
$overheads
->
where
(
'staffid'
,
$staff
->
staff_id
);
<thead>
$checkoverhead
=
$overheads
->
where
(
'staffid'
,
$staff
->
staff_id
)
->
first
();
<tr>
?>
<th style="
width
:
10
%
" class="
center
aligned
">Date</th>
<th style="
width
:
15
%
" class="
single
line
"> Overhead Description</th>
@if($checkoverhead)
<th class="
center
aligned
">Notes</th>
<table
class=
"ui unstackable celled table"
>
</tr>
<thead>
</thead>
<tr>
@foreach(
$overheads
as
$key
=>
$overhead
)
<th
style=
"width: 25%;"
>
Overhead
</th>
@if(data_get(
$staff
,'staff_id') == data_get(
$overhead
, 'staffid'))
<th
style=
"width: 10%;"
class=
"center aligned"
>
Total Hours
</th>
@foreach(data_get(
$overhead
,'notes') as
$key
=>
$value
)
<th
style=
"width: 10%;"
class=
"center aligned"
>
Total Days
</th>
@if(data_get(
$value
,'td_hours'))
<th
style=
"width: 30%"
>
Remarks
</th>
<tr>
<th
style=
"width: 13%"
class=
"text-center"
>
Status
</th>
<td style="
width
:
10
%
" class="
center
aligned
">{{ date("
d
-
m
-
Y
", strtotime(data_get(
$value
, 'td_date'))) }}</td>
<th
style=
"width: 12%;"
class=
"text-center"
>
Action
</th>
<td style="
width
:
15
%
" class="
single
line
">{{data_get(
$value
, 'td_overhead_desc')}}</td>
</tr>
<td>{{data_get(
$value
, 'td_overhead_note')}}</td>
</thead>
</tr>
@endif
@foreach($overheads as $key => $tp)
@endforeach
@if(data_get($staff, 'tmid') == data_get($tp, 'fk_tm_id'))
@endif
<tr>
@endforeach
<td
style=
"width: 25;"
>
{{data_get($tp, 'tp_project_name')}}
</td>
</table>
<td
style=
"width: 10%;"
class=
"center aligned"
>
{{data_get($tp, 'tp_hours')}}
</td>
@endif
<td
style=
"width: 10%;"
class=
"center aligned"
>
</div>
{{ number_format(data_get($tp, 'tp_hours')/8, 1, '.', '') }}
@endif
</td>
@endforeach
<td
style=
"width: 30%"
>
{{data_get($tp, 'verifier_remark')}}
</td>
@else
<td
style=
"width: 13%"
class=
"text-center"
>
<table class="
ui
unstackable
celled
table
">
@if(data_get($tp, 'tp_timesheet_sts') == 1 || data_get($tp, 'tp_timesheet_sts') == null) In Preparation
<thead>
@elseif(data_get($tp, 'tp_timesheet_sts') == 2)
<i
class=
"red attention icon"
></i>
Submitted
<tr>
@elseif(data_get($tp, 'tp_timesheet_sts') == 3)
<i
class=
"green check icon"
></i>
Verified by HOD/HOU
<th class="
text
-
center
">No pending verification</th>
@elseif(data_get($tp, 'tp_timesheet_sts') == 4)
<i
class=
"green check icon"
></i>
Verified by BOD
</tr>
@elseif(data_get($tp, 'tp_timesheet_sts') == 5)
<i
class=
"red attention icon"
></i>
Dissaproved by BOD
</thead>
@elseif(data_get($tp, 'tp_timesheet_sts') == 6)
<i
class=
"red attention icon"
></i>
Rejected by HOD/HOU
</table>
@elseif(data_get($tp, 'tp_timesheet_sts') == 7)
<i
class=
"red attention icon"
></i>
Rejected by HR
@endif
@endif
</td>
<td
style=
"width: 12%;"
class=
"text-center single line"
>
@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> -->
<a
class=
"center aligned ui blue icon button"
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
</a>
@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"
>
{{ date("d-m-Y", strtotime(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>
@endsection
@endsection
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
8f726ed6
...
@@ -160,9 +160,6 @@ class DashboardController extends Controller
...
@@ -160,9 +160,6 @@ class DashboardController extends Controller
if
(
$roleid
==
'8'
)
{
if
(
$roleid
==
'8'
)
{
$staffinfo
=
Staff_info
::
where
(
'id'
,
Auth
::
id
())
->
with
(
'pelulus'
)
->
first
();
$verifier
=
Users
::
find
(
Auth
::
id
());
$verifier
=
Users
::
find
(
Auth
::
id
());
...
@@ -186,6 +183,10 @@ class DashboardController extends Controller
...
@@ -186,6 +183,10 @@ class DashboardController extends Controller
->
get
();
->
get
();
//timesheet status
//timesheet status
$staffinfo
=
Staff_info
::
where
(
'id'
,
Auth
::
id
())
->
with
(
'pelulus'
)
->
first
();
$staffid
=
Users
::
find
(
Auth
::
id
())
$staffid
=
Users
::
find
(
Auth
::
id
())
->
u_staffID
;
->
u_staffID
;
...
@@ -235,7 +236,31 @@ class DashboardController extends Controller
...
@@ -235,7 +236,31 @@ class DashboardController extends Controller
->
get
();
->
get
();
// dd($overheads);
// dd($overheads);
return
view
(
'timesheet::dashboard.dashboardpmhod'
,
compact
(
'profile'
,
'details'
,
'verifier'
,
'overheads'
));
//timesheet status
$staffinfo
=
Staff_info
::
where
(
'id'
,
Auth
::
id
())
->
with
(
'pelulus'
)
->
first
();
$staffid
=
Users
::
find
(
Auth
::
id
())
->
u_staffID
;
$timesheet
=
Ts_master
::
where
(
'tm_staff_id'
,
$staffid
)
->
where
(
'tm_timesheet_master_sts'
,
'<>'
,
1
)
->
orderby
(
'tm_year'
)
->
orderby
(
'tm_month'
,
'DESC'
)
->
orderby
(
'tm_phase'
,
'DESC'
)
->
get
();
$projects
=
Tproject
::
where
(
'staffid'
,
$staffid
)
->
where
(
'tp_year'
,
date
(
'Y'
))
->
where
(
'tp_timesheet_sts'
,
'<>'
,
1
)
->
with
(
'project'
)
->
with
(
'overhead'
)
->
with
(
'hod'
)
->
with
(
'bod'
)
->
get
();
return
view
(
'timesheet::dashboard.dashboardpmhod'
,
compact
(
'profile'
,
'details'
,
'verifier'
,
'overheads'
,
'staffinfo'
,
'timesheet'
,
'projects'
));
}
}
if
((
$roleid
==
(
'5'
||
'6'
)))
{
if
((
$roleid
==
(
'5'
||
'6'
)))
{
...
...
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