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
30b6ab99
Commit
30b6ab99
authored
Sep 29, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard pm hod approval
parent
02b986e0
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
721 additions
and
37 deletions
+721
-37
packages/portal/timesheet/resources/views/dashboard/dashboardbod.blade.php
+245
-0
packages/portal/timesheet/resources/views/dashboard/dashboardhod.blade.php
+171
-0
packages/portal/timesheet/resources/views/dashboard/dashboardpm.blade.php
+105
-0
packages/portal/timesheet/resources/views/dashboard/dashboardpmhod.blade.php
+105
-0
packages/portal/timesheet/resources/views/dashboard/projectVerify.blade.php
+9
-2
packages/portal/timesheet/resources/views/dashboard/timesheetReview.blade.php
+4
-7
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
+0
-1
packages/portal/timesheet/routes/web.php
+1
-0
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+81
-27
No files found.
packages/portal/timesheet/resources/views/dashboard/dashboardbod.blade.php
0 → 100644
View file @
30b6ab99
@
extends
(
'ui::layouts.app'
)
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<div class="
ui
blue
left
ribbon
label
">
Timesheet Approval
</div>
<br>
<br>
<div class="
ui
styled
fluid
accordion
">
@foreach(
$profiles
as
$key
=>
$staff
)
<?php
$td
=
$checktd->where
('tm_staff_id',
$staff->staffid
);
$detail
=
$details->where
('staffid',
$staff->staffid
);
$checkchargeable
=
$detail->where
('tp_project_type',1)->first();
$checkoverhead
=
$detail->where
('tp_project_type',3)->first();
// dd(
$detail
);
// dump(count(
$detail->where
('tp_timesheet_sts',4)));
// dump(count(
$detail
));
// dump(count(
$checkoverhead
));
// dd('tengok');
?>
@if(count(
$detail->where
('tp_timesheet_sts',4)) == count(
$detail
))
@else
<div class="
title
">
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
<th style="
width
:
60
%
;
"><i class="
dropdown
icon
"></i>{{ data_get(
$staff
,'fullname') }}</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">
@if(
$staff->status
== 1 ||
$staff->status
== null) In Preparation
@elseif(
$staff->status
== 3) <i class="
green
check
icon
"></i>Verified by HOD/HOU/PM
@elseif(
$staff->status
== 4) <i class="
green
check
icon
"></i>Verified by BOD
@elseif(
$staff->status
== 5) <i class="
red
attention
icon
"></i>Dissaproved by BOD
@endif
</th>
<th style="
width
:
15
%
" class="
text
-
center
">Verified at:
{
{data_get($staff,'verified')}
}
</th>
<th style="
width
:
10
%
" 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,'
phase
'), '
month
' => data_get($staff,'
month
'), '
year
' => data_get($staff,'
year
')]) }}'
;
" target='_blank'>View</button>
</th>
</tr>
</thead>
</table>
</div>
<div class="
content
" style="
padding
-
top
:
0
px
;
">
@if(
$checkchargeable
)
<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
:
15
%
;
">PM Remarks</th>
<th style="
width
:
15
%
;
">PD Remarks</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">Status</th>
<th style="
width
:
10
%
;
" class="
center
aligned
">Action</th>
</tr>
</thead>
@if(
$detail->where
('tp_project_type', 1))
@foreach(
$detail->where
('tp_project_type', 1) as
$key
=>
$chargeable
)
<tr>
<td style="
width
:
10
%
;
">{{ data_get(
$chargeable
, 'project.p_project_code') }}</td>
<td style="
width
:
15
%
;
">{{ data_get(
$chargeable
, 'tp_project_name') }}</td>
<td style="
width
:
10
%
;
" class="
center
aligned
">{{ data_get(
$chargeable
, 'tp_hours') }}</td>
<td style="
width
:
10
%
;
" class="
center
aligned
">{{ number_format(data_get(
$chargeable
, 'tp_hours')/8, 1, '.', '') }}</td>
<td style="
width
:
15
%
;
">{{data_get(
$chargeable
, 'verifier_remark')}}</td>
<td style="
width
:
15
%
;
">{{data_get(
$chargeable
, 'approver_remark')}}</td>
<td style="
width
:
15
%
;
" class="
center
aligned
">
@if(data_get(
$chargeable
, 'tp_timesheet_sts') == 1 || data_get(
$chargeable
, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get(
$chargeable
, 'tp_timesheet_sts') == 2) <i class="
red
attention
icon
"></i> Submitted
@elseif(data_get(
$chargeable
, 'tp_timesheet_sts') == 3) <i class="
red
attention
icon
"></i> Verified by PM
@elseif(data_get(
$chargeable
, 'tp_timesheet_sts') == 4) <i class="
green
check
icon
"></i>Verified by PD
@elseif(data_get(
$chargeable
, 'tp_timesheet_sts') == 5) <i class="
red
attention
icon
"></i>Dissaproved by PD
@elseif(data_get(
$chargeable
, 'tp_timesheet_sts') == 6) <i class="
red
attention
icon
"></i>Rejected by PM
@elseif(data_get(
$chargeable
, 'tp_timesheet_sts') == 7) <i class="
red
attention
icon
"></i>Rejected by HR
@endif
</td>
<td style="
width
:
10
%
;
" class="
text
-
center
single
line
">
@if(data_get(
$chargeable
, 'tp_timesheet_sts') == 3)
<button class="
center
aligned
ui
green
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
dashboard
.
approvalaction
', ['
tpid
'=>data_get($chargeable, '
id
'), '
phase
'=>data_get($chargeable, '
tp_phase
'), '
month
'=>data_get($chargeable, '
tp_month
'), '
year
'=>data_get($chargeable, '
tp_year
') ]) }}'
;
">Approval</button>
@else
<button class="
center
aligned
ui
green
icon
button
disabled
">Approval</button>
@endif
</td>
</tr>
@endforeach
@endif
</table>
@endif
@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
:
15
%
;
">HOD Remarks</th>
<th style="
width
:
15
%
;
">BOD Remarks</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">Status</th>
<th style="
width
:
10
%
;
" class="
center
aligned
">Action</th>
</tr>
</thead>
@if(
$detail->where
('tp_project_type', 3))
@foreach(
$detail->where
('tp_project_type', 3) as
$key
=>
$overhead
)
<tr>
<td style="
width
:
25
%
;
">{{ data_get(
$overhead
, 'tp_project_name') }}</td>
<td style="
width
:
10
%
;
" class="
center
aligned
">{{ data_get(
$overhead
, 'tp_hours') }}</td>
<td style="
width
:
10
%
;
" class="
center
aligned
">{{ number_format(data_get(
$overhead
, 'tp_hours')/8, 1, '.', '') }}</td>
<td style="
width
:
15
%
;
">{{data_get(
$overhead
, 'verifier_remark')}}</td>
<td style="
width
:
15
%
;
">{{data_get(
$overhead
, 'approver_remark')}}</td>
<td style="
width
:
15
%
;
" class="
center
aligned
">
@if(data_get(
$overhead
, 'tp_timesheet_sts') == 1 || data_get(
$overhead
, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get(
$overhead
, 'tp_timesheet_sts') == 2) <i class="
red
attention
icon
"></i> Submitted
@elseif(data_get(
$overhead
, 'tp_timesheet_sts') == 3) <i class="
red
attention
icon
"></i> Verified by HOD
@elseif(data_get(
$overhead
, 'tp_timesheet_sts') == 4) <i class="
green
check
icon
"></i>Verified by BOD
@elseif(data_get(
$overhead
, 'tp_timesheet_sts') == 5) <i class="
red
attention
icon
"></i>Dissaproved by BOD
@elseif(data_get(
$overhead
, 'tp_timesheet_sts') == 6) <i class="
red
attention
icon
"></i>Rejected by HOD
@elseif(data_get(
$overhead
, 'tp_timesheet_sts') == 7) <i class="
red
attention
icon
"></i>Rejected by HR
@endif
</td>
<td style="
width
:
10
%
;
" class="
text
-
center
single
line
">
@if(data_get(
$overhead
, 'tp_timesheet_sts') == 3)
<button class="
center
aligned
ui
green
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
dashboard
.
approvalaction
', ['
tpid
'=>data_get($overhead, '
id
'), '
phase
'=>data_get($overhead, '
tp_phase
'), '
month
'=>data_get($overhead, '
tp_month
'), '
year
'=>data_get($overhead, '
tp_year
') ]) }}'
;
">Approval</button>
@else
<button class="
center
aligned
ui
green
icon
button
disabled
">Approval</button>
@endif
</td>
</tr>
@endforeach
@endif
</table>
@endif
@if(data_get(
$staff
,'team.pelulus') == data_get(
$approval
,'id'))
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
<th style="
width
:
10
%
" class="
center
aligned
">Date</th>
<th style="
width
:
25
%
" class="
single
line
"> Overhead Description</th>
<th class="
center
aligned
">Notes</th>
</tr>
</thead>
@if(
$td
)
@foreach(
$td
as
$key
=>
$value
)
@if(
$value->td_overhead_note
)
<tr>
<td style="
width
:
10
%
" class="
center
aligned
">{{data_get(
$value
, 'td_date')}}</td>
<td style="
width
:
25
%
" class="
single
line
">{{data_get(
$value
, 'td_overhead_desc')}}</td>
<td>{{data_get(
$value
, 'td_overhead_note')}}</td>
</tr>
@endif
@endforeach
@endif
</table>
@endif
@if(data_get(
$staff
,'attachment'))
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
<th colspan="
2
" class="
center
aligned
">Notes Attachment</th>
</tr>
</thead>
<tbody>
<tr>
<td style="
width
:
4
%
;
"></td>
<td>
<a href="
{{
asset
(
data_get
(
$value
,
'attachment.path'
))}}
" target="
_blank
">
<button class="
ui
active
button
">
<i class="
download
icon
"></i>
Download
</button>
</a>
</td>
</tr>
</tbody>
</table>
@endif
@if(data_get(
$staff
,'hodremarks'))
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
<th class="
center
aligned
">Date</th>
<th class="
center
aligned
">Verifier</th>
<th class="
center
aligned
">Remarks by Verifier</th>
</tr>
</thead>
<tbody>
<tr>
<td style="
width
:
15
%
;
">{{ data_get(
$staff
,'verified_at') }}</td>
<td style="
width
:
25
%
;
">{{ data_get(
$staff
,'hodname') }}</td>
<td style="
width
:
60
%
;
">{{ data_get(
$staff
,'hodremarks') }}</td>
</tr>
</tbody>
</table>
@endif
@if(data_get(
$staff
,'bodremarks'))
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
<th class="
center
aligned
">Date</th>
<th class="
center
aligned
">Approver</th>
<th class="
center
aligned
">Remarks by Approver</th>
</tr>
</thead>
<tbody>
<tr>
<td style="
width
:
15
%
;
" class="
center
aligned
">{{ data_get(
$staff
,'approved_at') }}</td>
<td style="
width
:
25
%
;
" class="
center
aligned
">{{ data_get(
$staff
,'bodname') }}</td>
<td style="
width
:
60
%
;
" class="
center
aligned
">{{ data_get(
$staff
,'bodremarks') }}</td>
</tr>
</tbody>
</table>
@endif
</div>
@endif
@endforeach
</div>
</div>
@endsection
@push('script')
<script>
$('.ui.accordion').accordion();
</script>
@endpush
\ No newline at end of file
packages/portal/timesheet/resources/views/dashboard/dashboardhod.blade.php
0 → 100644
View file @
30b6ab99
@
extends
(
'ui::layouts.app'
)
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<div class="
ui
blue
left
ribbon
label
">
Welcome,
{
{data_get($verifier,'name')}
}
</div>
<br>
<br>
<div class="
ui
styled
fluid
accordion
">
@foreach(
$profile
as
$key
=>
$staff
)
@if(data_get(
$staff
,'status') == 2)
<div class="
title
">
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
<th style="
width
:
60
%
;
"><i class="
dropdown
icon
"></i>{{ data_get(
$staff
,'fullname') }}</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">
<?php
$over
= 0;
// dd(
$details
);
foreach (
$details
as
$key
=>
$value
) {
if(data_get(
$value
,'staffid') == data_get(
$staff
,'staff_id') && data_get(
$value
,'tp_timesheet_sts') == 3)
$over
+= 1;
}
?>
@if(
$staff->status
== 7) <i class="
red
attention
icon
"></i>Rejected by HR
@elseif(
$staff->status
== 6) <i class="
red
attention
icon
"></i>Rejected by HOD/HOU
@elseif(
$staff->status
== 5) <i class="
red
attention
icon
"></i>Dissaproved by BOD
@elseif(
$staff->status
== 4) <i class="
green
check
icon
"></i>Verified by BOD
@elseif(
$over
== count(data_get(
$staff
,'overheads'))) <i class="
green
check
icon
"></i> Verified by HOD/HOU
@elseif(
$over
!= count(data_get(
$staff
,'overheads')) ||
$staff->status
== 2) <i class="
red
attention
icon
"></i> Submitted
@elseif(
$staff->status
== 1 ||
$staff->status
== null) In Preparation
@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,'
tm_phase
'), '
month
' => data_get($staff,'
tm_month
'), '
year
' => data_get($staff,'
tm_year
') ]) }}'
;
" target='_blank'>View</button>
</th>
</tr>
</thead>
</table>
</div>
<?php
$detail
=
$details->where
('staffid',
$staff->staff_id
);
$ts
=
$checkts->where
('tm_staff_id',
$staff->staff_id
);
?>
<div class="
content
" style="
padding
-
top
:
0
px
;
">
<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(
$details
as
$key
=>
$tp
)
@if(data_get(
$staff
, 'staff_id') == data_get(
$tp
, 'staffid'))
<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
">{{data_get(
$tp
, 'tp_hours')/8}}</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(
$details
as
$key
=>
$detail
)
@if(data_get(
$staff
,'staff_id') == data_get(
$detail
, 'staffid'))
@foreach(data_get(
$detail
,'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>
@foreach (
$ts
as
$key
=>
$value
)
@if(data_get(
$value
,'attachement'))
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
<th colspan="
2
" class="
center
aligned
">Notes Attachment</th>
</tr>
</thead>
<tbody>
<tr>
<td style="
width
:
4
%
;
"></td>
<td>
<a href="
{{
asset
(
data_get
(
$value
,
'attachement.path'
))}}
" target="
_blank
">
<button class="
ui
active
button
">
<i class="
download
icon
"></i>
Download
</button>
</a>
</td>
</tr>
</tbody>
</table>
@endif
@endforeach
@if(data_get(
$staff
,'hodremarks'))
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
<th colspan="
2
" class="
center
aligned
">Remarks</th>
</tr>
</thead>
<tbody>
<tr>
<td style="
width
:
4
%
;
"></td>
<td>{{ data_get(
$staff
,'hodremarks') }}</td>
</tr>
</tbody>
</table>
@endif
</div>
@endif
@endforeach
</div>
</div>
@endsection
@push('script')
<script>
$('.ui.accordion').accordion();
</script>
@endpush
\ No newline at end of file
packages/portal/timesheet/resources/views/dashboard/dashboardpm.blade.php
0 → 100644
View file @
30b6ab99
@
extends
(
'ui::layouts.app'
)
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<div class="
ui
blue
left
ribbon
label
">
Project Manager Dashboard
</div>
<br>
<br>
<div class="
ui
styled
fluid
accordion
">
@foreach(
$profile
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
">
<thead>
<tr>
<th style="
width
:
60
%
;
"><i class="
dropdown
icon
"></i>{{ data_get(
$staff
,'fullname') }}</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">
<?php
// dd(
$profile
);
$status
=
$staff->status
;
$verified
= count(data_get(
$profile[$key]
, 'countchargeable')->where('tp_timesheet_sts', 3));
$allproject
= count(data_get(
$profile[$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
:
0
px
;
">
<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
,'staffid') == data_get(
$staff
, 'staff_id'))
<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
">{{data_get(
$detail
, 'tp_hours')/8}}</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
')]) }}'
;
">Verify | Reject</button>
@else
<button class="
center
aligned
ui
green
icon
button
disabled
">Verify | Reject</button>
@endif
</td>
</tr>
@endif
@endforeach
</table>
</div>
@endif
@endforeach
</div>
</div>
@endsection
@push('script')
<script>
$('.ui.accordion').accordion();
</script>
@endpush
\ No newline at end of file
packages/portal/timesheet/resources/views/dashboard/dashboardpmhod.blade.php
0 → 100644
View file @
30b6ab99
@
extends
(
'ui::layouts.app'
)
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<div class="
ui
blue
left
ribbon
label
">
Project Manager Dashboard
</div>
<br>
<br>
<div class="
ui
styled
fluid
accordion
">
@foreach(
$profile
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
">
<thead>
<tr>
<th style="
width
:
60
%
;
"><i class="
dropdown
icon
"></i>{{ data_get(
$staff
,'fullname') }}</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">
<?php
// dd(
$profile
);
$status
=
$staff->status
;
$verified
= count(data_get(
$profile[$key]
, 'countchargeable')->where('tp_timesheet_sts', 3));
$allproject
= count(data_get(
$profile[$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
:
0
px
;
">
<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
,'staffid') == data_get(
$staff
, 'staff_id'))
<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
">{{data_get(
$detail
, 'tp_hours')/8}}</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
')]) }}'
;
">Verify | Reject</button>
@else
<button class="
center
aligned
ui
green
icon
button
disabled
">Verify | Reject</button>
@endif
</td>
</tr>
@endif
@endforeach
</table>
</div>
@endif
@endforeach
</div>
</div>
@endsection
@push('script')
<script>
$('.ui.accordion').accordion();
</script>
@endpush
\ No newline at end of file
packages/portal/timesheet/resources/views/dashboard/projectVerify.blade.php
View file @
30b6ab99
...
...
@@ -12,6 +12,13 @@
<div class="
ui
styled
fluid
accordion
">
@foreach(
$profile
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
">
<thead>
...
...
@@ -42,7 +49,6 @@
</thead>
</table>
</div>
<div class="
content
" style="
padding
-
top
:
0
px
;
">
<table class="
ui
unstackable
celled
table
">
<thead>
...
...
@@ -56,7 +62,7 @@
<th style="
width
:
12
%
;
" class="
text
-
center
">Action</th>
</tr>
</thead>
@foreach(
$details
as
$key
=>
$detail
)
@foreach(
$details
as
$key
=>
$detail
)q
@if(data_get(
$detail
,'staffid') == data_get(
$staff
, 'staff_id'))
<tr>
<td style="
width
:
10
%
;
">{{data_get(
$detail
, 'project.p_project_code')}}</td>
...
...
@@ -86,6 +92,7 @@
@endforeach
</table>
</div>
@endif
@endforeach
</div>
</div>
...
...
packages/portal/timesheet/resources/views/dashboard/timesheetReview.blade.php
View file @
30b6ab99
...
...
@@ -7,10 +7,9 @@
</div>
<br>
<br>
<div class="
ui
styled
fluid
accordion
">
@foreach(
$profile
as
$key
=>
$staff
)
@if(data_get(
$staff
,'status') == 2)
<div class="
title
">
<table class="
ui
unstackable
celled
table
">
<thead>
...
...
@@ -89,9 +88,7 @@
</td>
</tr>
@endif
@endforeach
</table>
<table class="
ui
unstackable
celled
table
">
...
...
@@ -105,11 +102,13 @@
@foreach(
$details
as
$key
=>
$detail
)
@if(data_get(
$staff
,'staff_id') == data_get(
$detail
, 'staffid'))
@foreach(data_get(
$detail
,'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
...
...
@@ -117,7 +116,6 @@
@foreach (
$ts
as
$key
=>
$value
)
@if(data_get(
$value
,'attachement'))
<table class="
ui
unstackable
celled
table
">
<thead>
<tr>
...
...
@@ -129,7 +127,6 @@
<td style="
width
:
4
%
;
"></td>
<td>
<a href="
{{
asset
(
data_get
(
$value
,
'attachement.path'
))}}
" target="
_blank
">
<button class="
ui
active
button
">
<i class="
download
icon
"></i>
Download
...
...
@@ -139,7 +136,6 @@
</tr>
</tbody>
</table>
@endif
@endforeach
...
...
@@ -160,6 +156,7 @@
</table>
@endif
</div>
@endif
@endforeach
</div>
</div>
...
...
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
View file @
30b6ab99
...
...
@@ -589,7 +589,6 @@
</table>
</div>
</div>
<br>
@if(
$curruser->id
==
$user->penyokong
)
...
...
packages/portal/timesheet/routes/web.php
View file @
30b6ab99
...
...
@@ -17,6 +17,7 @@ Route::group(
//dashboard
Route
::
get
(
'home'
,[
'uses'
=>
'DashboardController@index'
,
'as'
=>
'dashboard.index'
]);
Route
::
get
(
'vwviewer'
,[
'uses'
=>
'DashboardController@vwviewer'
,
'as'
=>
'dashboard.vwviewer'
]);
//timesheet
Route
::
get
(
'timesheetApproval'
,[
'uses'
=>
'DashboardController@timesheetApproval'
,
'as'
=>
'dashboard.timesheetApproval'
]);
Route
::
get
(
'timesheetReport'
,[
'uses'
=>
'DashboardController@timesheetReport'
,
'as'
=>
'dashboard.timesheetReport'
]);
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
30b6ab99
...
...
@@ -55,7 +55,82 @@ class DashboardController extends Controller
return
view
(
'timesheet::dashboard.admin'
);
}
if
((
$roleid
==
(
'2'
||
'5'
||
'6'
||
'7'
||
'8'
)))
{
if
(
$roleid
==
'2'
)
{
$verifier
=
Users
::
find
(
Auth
::
id
());
$profile
=
VwReviewProfile
::
where
(
'hod_id'
,
$verifier
->
id
)
->
where
(
'status'
,
2
)
->
with
(
'overheads'
)
->
get
();
$details
=
Tproject
::
where
(
'tp_project_type'
,
3
)
->
where
(
'tp_timesheet_sts'
,
2
)
->
where
(
'tp_pm'
,
$verifier
->
id
)
->
with
(
'notes'
)
->
get
();
$checkts
=
Ts_master
::
where
(
'tm_timesheet_master_sts'
,
2
)
->
with
(
'attachement'
)
->
get
();
return
view
(
'timesheet::dashboard.dashboardhod'
,
compact
(
'profile'
,
'details'
,
'checkts'
,
'verifier'
));
}
if
(
$roleid
==
'7'
)
{
$approval
=
Users
::
find
(
Auth
::
id
());
$profiles
=
VwApprovalProfiles
::
where
(
'pdid'
,
$approval
->
id
)
->
where
(
'status'
,
3
)
->
orderby
(
'tmid'
)
->
with
(
'attachment'
)
->
with
(
'team'
)
->
with
(
'tproject'
)
->
get
();
$tmid
=
[];
foreach
(
$profiles
as
$key
=>
$value
)
{
$tmid
[]
=
$value
->
tmid
;
}
$details
=
Tproject
::
whereIn
(
'fk_tm_id'
,
$tmid
)
->
where
(
'tp_pd'
,
$approval
->
id
)
->
with
(
'project'
)
->
get
();
$checktd
=
Ts_detail
::
whereIn
(
'fk_tm_id'
,
$tmid
)
->
where
(
'td_hours'
,
"<>"
,
0
)
->
get
();
return
view
(
'timesheet::dashboard.dashboardbod'
,
compact
(
'approval'
,
'profiles'
,
'details'
,
'checktd'
));
}
if
(
$roleid
==
'8'
)
{
$verifier
=
Users
::
find
(
Auth
::
id
());
$profile
=
VwChargeableVerification
::
select
(
'tmid'
,
'staff_id'
,
'year'
,
'month'
,
'phase'
,
'status'
,
'submission'
,
'fullname'
,
'roleid'
,
'pmstaffid'
)
->
where
(
'pmstaffid'
,
$verifier
->
u_staffID
)
->
where
(
'status'
,
2
)
->
distinct
(
'staff_id'
)
->
orderby
(
'roleid'
)
->
with
(
'countchargeable'
)
->
get
();
// dd($profile);
$details
=
Tproject
::
where
(
'tp_timesheet_sts'
,
2
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
->
with
(
'project'
)
->
with
(
'pm'
)
->
get
();
return
view
(
'timesheet::dashboard.dashboardpm'
,
compact
(
'profile'
,
'details'
,
'verifier'
));
}
if
((
$roleid
==
(
'5'
||
'6'
||
'9'
)))
{
$staffid
=
Users
::
find
(
Auth
::
id
())
->
u_staffID
;
...
...
@@ -214,35 +289,14 @@ class DashboardController extends Controller
$tmid
[]
=
$value
->
tmid
;
}
// $checkts = Ts_master::whereIn('id', $tmid)
// ->with('attachement')
// ->get();
// dd($checkts);
// where('tm_timesheet_master_sts', '>' ,2)
// ->where('tm_year', $curryear)
// ->where('tm_month', $request->month)
// ->where('tm_phase', $request->phase)
// ->with('attachement')
// ->get();
// dd($checkts);
$details
=
Tproject
::
whereIn
(
'fk_tm_id'
,
$tmid
)
->
where
(
'tp_pd'
,
$approval
->
id
)
->
with
(
'project'
)
->
get
();
// dd($details);
// $details = VwReviewDetails::where('year', $curryear)
// ->where('month', $request->month)
// ->where('phase', $request->phase)
// ->where('approval', $approval->id)
// ->get();
$checktd
=
Ts_detail
::
whereIn
(
'fk_tm_id'
,
$tmid
)
->
where
(
'td_hours'
,
"<>"
,
0
)
->
get
();
// dd($checktd);
// dd($checktd);
return
view
(
'timesheet::dashboard.timesheetApproval'
,
compact
(
'approval'
,
'profiles'
,
'details'
,
'checktd'
,
'year'
,
'month'
,
'phase'
));
}
...
...
@@ -282,26 +336,28 @@ class DashboardController extends Controller
->
where
(
'year'
,
$curryear
)
->
where
(
'month'
,
$month
)
->
where
(
'phase'
,
$phase
)
->
where
(
'status'
,
2
)
->
distinct
(
'staff_id'
)
->
orderby
(
'roleid'
)
->
with
(
'countchargeable'
)
->
get
();
// dd($profile);
$details
=
Tproject
::
where
(
'tp_year'
,
$curryear
)
->
where
(
'tp_month'
,
$month
)
->
where
(
'tp_phase'
,
$phase
)
->
where
(
'tp_timesheet_sts'
,
2
)
->
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
->
with
(
'project'
)
->
with
(
'pm'
)
->
get
();
// dd($details);
return
view
(
'timesheet::dashboard.projectVerify'
,
compact
(
'profile'
,
'details'
,
'year'
,
'month'
,
'phase'
));
return
view
(
'timesheet::dashboard.projectVerify'
,
compact
(
'profile'
,
'details'
,
'year'
,
'month'
,
'phase'
,
'verifier'
));
}
public
function
timesheetReview
(
Request
$request
)
{
// dd($request->phase);
$curryear
=
date
(
'Y'
);
if
(
$request
->
year
)
{
...
...
@@ -326,7 +382,6 @@ class DashboardController extends Controller
$verifier
=
Users
::
find
(
Auth
::
id
());
// dump($verifier->id);
$profile
=
VwReviewProfile
::
where
(
'hod_id'
,
$verifier
->
id
)
->
where
(
'tm_year'
,
$curryear
)
->
where
(
'tm_month'
,
$month
)
...
...
@@ -344,7 +399,7 @@ class DashboardController extends Controller
->
get
();
// dd($details);
$checkts
=
Ts_master
::
where
(
'tm_timesheet_master_sts'
,
'
>'
,
1
)
$checkts
=
Ts_master
::
where
(
'tm_timesheet_master_sts'
,
'
='
,
2
)
->
where
(
'tm_year'
,
$curryear
)
->
where
(
'tm_month'
,
$request
->
month
)
->
where
(
'tm_phase'
,
$request
->
phase
)
...
...
@@ -650,7 +705,6 @@ class DashboardController extends Controller
public
function
timesheetViewer
(
Request
$request
)
{
$curruser
=
$user
=
Staff_info
::
where
(
'fk_users'
,
Auth
::
id
())
->
first
();
...
...
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