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
5ae502ad
Commit
5ae502ad
authored
Dec 22, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display overhead description for Staff dashboard, Project Manager & HOD dashboard.
parent
fba11573
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
232 additions
and
51 deletions
+232
-51
packages/portal/timesheet/resources/views/dashboard/dashboardhod.blade.php
+49
-11
packages/portal/timesheet/resources/views/dashboard/dashboardpm.blade.php
+49
-11
packages/portal/timesheet/resources/views/dashboard/dashboardpmhod.blade.php
+50
-12
packages/portal/timesheet/resources/views/dashboard/dashboardstaff.blade.php
+52
-12
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+32
-5
No files found.
packages/portal/timesheet/resources/views/dashboard/dashboardhod.blade.php
View file @
5ae502ad
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<a class="
ui
teal
left
ribbon
label
">Timesheet Status</a>
<a class="
ui
teal
left
ribbon
label
">Timesheet Status</a>
<br>
<br>
<br>
<br>
@foreach(
$timesheet
as
$key
=>
$
valu
e
)
@foreach(
$timesheet
as
$key
=>
$
tim
e
)
<div class="
ui
styled
fluid
accordion
">
<div class="
ui
styled
fluid
accordion
">
<?php
$page
= 1; ?>
<?php
$page
= 1; ?>
<div class="
title
">
<div class="
title
">
...
@@ -46,18 +46,18 @@
...
@@ -46,18 +46,18 @@
<thead>
<thead>
<tr>
<tr>
<th style="
width
:
60
%
" class="
text
-
center
">
<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(
$valu
e
,'tm_year') }}
@if(data_get(
$
time
,'tm_phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("
F
", mktime(0, 0, 0, data_get(
$time
,'tm_month'), 10)) }} - {{ data_get(
$tim
e
,'tm_year') }}
</th>
</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">
<th style="
width
:
15
%
;
" class="
center
aligned
">
@if(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 1) Draft
@if(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 1) Draft
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 2) <i class="
green
check
icon
"></i> Submitted
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 2) <i class="
green
check
icon
"></i> Submitted
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 3) <i class="
green
check
icon
"></i> Verified by HOD/HOU/PM
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 3) <i class="
green
check
icon
"></i> Verified by HOD/HOU/PM
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 4) <i class="
green
check
icon
"></i> Approved by PD
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 4) <i class="
green
check
icon
"></i> Approved by PD
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 5) <i class="
red
attention
icon
"></i> Rejected by PD
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 5) <i class="
red
attention
icon
"></i> Rejected by PD
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 6) <i class="
red
attention
icon
"></i> Rejected by HOD/HOU/PM
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 6) <i class="
red
attention
icon
"></i> Rejected by HOD/HOU/PM
@endif
@endif
</th>
</th>
<th style="
width
:
13
%
" class="
text
-
center
">Submitted on: {{ date("
d
/
m
/
Y
", strtotime(data_get(
$
valu
e
,'tm_submission_at'))) }}</th>
<th style="
width
:
13
%
" class="
text
-
center
">Submitted on: {{ date("
d
/
m
/
Y
", strtotime(data_get(
$
tim
e
,'tm_submission_at'))) }}</th>
<th style="
width
:
12
%
" class="
text
-
center
">
<th style="
width
:
12
%
" class="
text
-
center
">
<button class="
center
aligned
ui
blue
icon
button
">View Project</button>
<button class="
center
aligned
ui
blue
icon
button
">View Project</button>
</th>
</th>
...
@@ -67,8 +67,8 @@
...
@@ -67,8 +67,8 @@
</div>
</div>
<?php
<?php
$chargeable
=
$projects->where
('tp_project_type', 1)->where('fk_tm_id', data_get(
$
valu
e
,'id'));
$chargeable
=
$projects->where
('tp_project_type', 1)->where('fk_tm_id', data_get(
$
tim
e
,'id'));
$overhead
=
$projects->where
('tp_project_type', 3)->where('fk_tm_id', data_get(
$
valu
e
,'id'));
$overhead
=
$projects->where
('tp_project_type', 3)->where('fk_tm_id', data_get(
$
tim
e
,'id'));
// dd(
$overhead
);
// dd(
$overhead
);
?>
?>
...
@@ -174,6 +174,44 @@
...
@@ -174,6 +174,44 @@
@endforeach
@endforeach
@endif
@endif
</table>
</table>
<!-- Overhead Notes Start -->
<?php
$n
= null; ?>
@foreach(
$staffnotes
as
$key
=>
$detail
)
@if(data_get(
$time
,'id') == data_get(
$detail
, 'fk_tm_id'))
@foreach(data_get(
$detail
,'notes') as
$key
=>
$tm_detail
)
<?php
$n
=
$tm_detail
; ?>
@endforeach
@endif
@endforeach
@if(
$n
)
<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(
$staffnotes
as
$key
=>
$detail
)
@if(data_get(
$time
,'id') == data_get(
$detail
, 'fk_tm_id'))
@foreach(data_get(
$detail
,'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
<!-- Overhead Notes End -->
</div>
</div>
</div>
</div>
<br>
<br>
...
...
packages/portal/timesheet/resources/views/dashboard/dashboardpm.blade.php
View file @
5ae502ad
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<br>
<br>
@if(count(
$timesheet
) > 0)
@if(count(
$timesheet
) > 0)
<br>
<br>
@foreach(
$timesheet
as
$key
=>
$
valu
e
)
@foreach(
$timesheet
as
$key
=>
$
tim
e
)
<div class="
ui
styled
fluid
accordion
">
<div class="
ui
styled
fluid
accordion
">
<?php
$page
= 1; ?>
<?php
$page
= 1; ?>
<div class="
title
">
<div class="
title
">
...
@@ -49,18 +49,18 @@
...
@@ -49,18 +49,18 @@
<thead>
<thead>
<tr>
<tr>
<th style="
width
:
60
%
" class="
text
-
center
">
<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(
$valu
e
,'tm_year') }}
@if(data_get(
$
time
,'tm_phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("
F
", mktime(0, 0, 0, data_get(
$time
,'tm_month'), 10)) }} - {{ data_get(
$tim
e
,'tm_year') }}
</th>
</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">
<th style="
width
:
15
%
;
" class="
center
aligned
">
@if(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 1) Draft
@if(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 1) Draft
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 2) <i class="
green
check
icon
"></i> Submitted
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 2) <i class="
green
check
icon
"></i> Submitted
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 3) <i class="
green
check
icon
"></i> Verified by HOD/HOU/PM
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 3) <i class="
green
check
icon
"></i> Verified by HOD/HOU/PM
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 4) <i class="
green
check
icon
"></i> Approved by PD
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 4) <i class="
green
check
icon
"></i> Approved by PD
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 5) <i class="
red
attention
icon
"></i> Rejected by PD
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 5) <i class="
red
attention
icon
"></i> Rejected by PD
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 6) <i class="
red
attention
icon
"></i> Rejected by HOD/HOU/PM
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 6) <i class="
red
attention
icon
"></i> Rejected by HOD/HOU/PM
@endif
@endif
</th>
</th>
<th style="
width
:
13
%
" class="
text
-
center
">Submitted on: {{ date("
d
/
m
/
Y
", strtotime(data_get(
$
valu
e
,'tm_submission_at'))) }}</th>
<th style="
width
:
13
%
" class="
text
-
center
">Submitted on: {{ date("
d
/
m
/
Y
", strtotime(data_get(
$
tim
e
,'tm_submission_at'))) }}</th>
<th style="
width
:
12
%
" class="
text
-
center
">
<th style="
width
:
12
%
" class="
text
-
center
">
<button class="
center
aligned
ui
blue
icon
button
">View Project</button>
<button class="
center
aligned
ui
blue
icon
button
">View Project</button>
</th>
</th>
...
@@ -70,8 +70,8 @@
...
@@ -70,8 +70,8 @@
</div>
</div>
<?php
<?php
$chargeable
=
$projects->where
('tp_project_type', 1)->where('fk_tm_id', data_get(
$
valu
e
,'id'));
$chargeable
=
$projects->where
('tp_project_type', 1)->where('fk_tm_id', data_get(
$
tim
e
,'id'));
$overhead
=
$projects->where
('tp_project_type', 3)->where('fk_tm_id', data_get(
$
valu
e
,'id'));
$overhead
=
$projects->where
('tp_project_type', 3)->where('fk_tm_id', data_get(
$
tim
e
,'id'));
// dd(
$overhead
);
// dd(
$overhead
);
?>
?>
...
@@ -197,6 +197,44 @@
...
@@ -197,6 +197,44 @@
</tr>
</tr>
@endforeach
@endforeach
@endif
@endif
<!-- Overhead Notes Start -->
<?php
$n
= null; ?>
@foreach(
$staffnotes
as
$key
=>
$detail
)
@if(data_get(
$time
,'id') == data_get(
$detail
, 'fk_tm_id'))
@foreach(data_get(
$detail
,'notes') as
$key
=>
$tm_detail
)
<?php
$n
=
$tm_detail
; ?>
@endforeach
@endif
@endforeach
@if(
$n
)
<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(
$staffnotes
as
$key
=>
$detail
)
@if(data_get(
$time
,'id') == data_get(
$detail
, 'fk_tm_id'))
@foreach(data_get(
$detail
,'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
<!-- Overhead Notes End -->
</table>
</table>
</div>
</div>
</div>
</div>
...
...
packages/portal/timesheet/resources/views/dashboard/dashboardpmhod.blade.php
View file @
5ae502ad
...
@@ -40,9 +40,9 @@
...
@@ -40,9 +40,9 @@
<a class="
ui
teal
left
ribbon
label
">Timesheet Status</a>
<a class="
ui
teal
left
ribbon
label
">Timesheet Status</a>
<br>
<br>
<br>
<br>
@foreach(
$timesheet
as
$key
=>
$
valu
e
)
@foreach(
$timesheet
as
$key
=>
$
tim
e
)
<!-- <?php
<!-- <?php
// dd(
$
valu
e->tm_timesheet_master_sts
);
// dd(
$
tim
e->tm_timesheet_master_sts
);
?> -->
?> -->
<div class="
ui
styled
fluid
accordion
">
<div class="
ui
styled
fluid
accordion
">
<?php
$page
= 1; ?>
<?php
$page
= 1; ?>
...
@@ -51,18 +51,18 @@
...
@@ -51,18 +51,18 @@
<thead>
<thead>
<tr>
<tr>
<th style="
width
:
60
%
" class="
text
-
center
">
<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(
$valu
e
,'tm_year') }}
@if(data_get(
$
time
,'tm_phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("
F
", mktime(0, 0, 0, data_get(
$time
,'tm_month'), 10)) }} - {{ data_get(
$tim
e
,'tm_year') }}
</th>
</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">
<th style="
width
:
15
%
;
" class="
center
aligned
">
@if(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 1) Draft
@if(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 1) Draft
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 2) <i class="
green
check
icon
"></i> Submitted
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 2) <i class="
green
check
icon
"></i> Submitted
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 3) <i class="
green
check
icon
"></i> Verified by HOD/HOU/PM
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 3) <i class="
green
check
icon
"></i> Verified by HOD/HOU/PM
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 4) <i class="
green
check
icon
"></i> Approved by PD
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 4) <i class="
green
check
icon
"></i> Approved by PD
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 5) <i class="
red
attention
icon
"></i> Rejected by PD
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 5) <i class="
red
attention
icon
"></i> Rejected by PD
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 6) <i class="
red
attention
icon
"></i> Rejected by HOD/HOU/PM
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 6) <i class="
red
attention
icon
"></i> Rejected by HOD/HOU/PM
@endif
@endif
</th>
</th>
<th style="
width
:
13
%
" class="
text
-
center
">Submitted on: {{ date("
d
/
m
/
Y
", strtotime(data_get(
$
valu
e
,'tm_submission_at'))) }}</th>
<th style="
width
:
13
%
" class="
text
-
center
">Submitted on: {{ date("
d
/
m
/
Y
", strtotime(data_get(
$
tim
e
,'tm_submission_at'))) }}</th>
<th style="
width
:
12
%
" class="
text
-
center
">
<th style="
width
:
12
%
" class="
text
-
center
">
<button class="
center
aligned
ui
blue
icon
button
">View Project</button>
<button class="
center
aligned
ui
blue
icon
button
">View Project</button>
</th>
</th>
...
@@ -72,8 +72,8 @@
...
@@ -72,8 +72,8 @@
</div>
</div>
<?php
<?php
$chargeable
=
$projects->where
('tp_project_type', 1)->where('fk_tm_id', data_get(
$
valu
e
,'id'));
$chargeable
=
$projects->where
('tp_project_type', 1)->where('fk_tm_id', data_get(
$
tim
e
,'id'));
$overhead
=
$projects->where
('tp_project_type', 3)->where('fk_tm_id', data_get(
$
valu
e
,'id'));
$overhead
=
$projects->where
('tp_project_type', 3)->where('fk_tm_id', data_get(
$
tim
e
,'id'));
// dd(
$overhead
);
// dd(
$overhead
);
?>
?>
...
@@ -219,6 +219,44 @@
...
@@ -219,6 +219,44 @@
@endforeach
@endforeach
@endif
@endif
</table>
</table>
<!-- Overhead Notes Start -->
<?php
$n
= null; ?>
@foreach(
$staffnotes
as
$key
=>
$detail
)
@if(data_get(
$time
,'id') == data_get(
$detail
, 'fk_tm_id'))
@foreach(data_get(
$detail
,'notes') as
$key
=>
$tm_detail
)
<?php
$n
=
$tm_detail
; ?>
@endforeach
@endif
@endforeach
@if(
$n
)
<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(
$staffnotes
as
$key
=>
$detail
)
@if(data_get(
$time
,'id') == data_get(
$detail
, 'fk_tm_id'))
@foreach(data_get(
$detail
,'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
<!-- Overhead Notes End -->
</div>
</div>
</div>
</div>
<br>
<br>
...
...
packages/portal/timesheet/resources/views/dashboard/dashboardstaff.blade.php
View file @
5ae502ad
...
@@ -40,9 +40,9 @@
...
@@ -40,9 +40,9 @@
<a class="
ui
teal
left
ribbon
label
">Timesheet Status</a>
<a class="
ui
teal
left
ribbon
label
">Timesheet Status</a>
<br>
<br>
<br>
<br>
@foreach(
$timesheet
as
$key
=>
$
valu
e
)
@foreach(
$timesheet
as
$key
=>
$
tim
e
)
<!-- <?php
<!-- <?php
// dd(
$
valu
e->tm_timesheet_master_sts
);
// dd(
$
tim
e->tm_timesheet_master_sts
);
?> -->
?> -->
<div class="
ui
styled
fluid
accordion
">
<div class="
ui
styled
fluid
accordion
">
<?php
$page
= 1; ?>
<?php
$page
= 1; ?>
...
@@ -51,18 +51,18 @@
...
@@ -51,18 +51,18 @@
<thead>
<thead>
<tr>
<tr>
<th style="
width
:
60
%
" class="
text
-
center
">
<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(
$valu
e
,'tm_year') }}
@if(data_get(
$
time
,'tm_phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("
F
", mktime(0, 0, 0, data_get(
$time
,'tm_month'), 10)) }} - {{ data_get(
$tim
e
,'tm_year') }}
</th>
</th>
<th style="
width
:
15
%
;
" class="
center
aligned
">
<th style="
width
:
15
%
;
" class="
center
aligned
">
@if(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 1) Draft
@if(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 1) Draft
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 2) <i class="
green
check
icon
"></i> Submitted
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 2) <i class="
green
check
icon
"></i> Submitted
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 3) <i class="
green
check
icon
"></i> Verified by HOD/HOU/PM
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 3) <i class="
green
check
icon
"></i> Verified by HOD/HOU/PM
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 4) <i class="
green
check
icon
"></i> Approved by PD
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 4) <i class="
green
check
icon
"></i> Approved by PD
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 5) <i class="
red
attention
icon
"></i> Rejected by PD
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 5) <i class="
red
attention
icon
"></i> Rejected by PD
@elseif(data_get(
$
valu
e
,'tm_timesheet_master_sts') == 6) <i class="
red
attention
icon
"></i> Rejected by HOD/HOU/PM
@elseif(data_get(
$
tim
e
,'tm_timesheet_master_sts') == 6) <i class="
red
attention
icon
"></i> Rejected by HOD/HOU/PM
@endif
@endif
</th>
</th>
<th style="
width
:
13
%
" class="
text
-
center
">Submitted on: {{ date("
d
/
m
/
Y
", strtotime(data_get(
$
valu
e
,'tm_submission_at'))) }}</th>
<th style="
width
:
13
%
" class="
text
-
center
">Submitted on: {{ date("
d
/
m
/
Y
", strtotime(data_get(
$
tim
e
,'tm_submission_at'))) }}</th>
<th style="
width
:
12
%
" class="
text
-
center
">
<th style="
width
:
12
%
" class="
text
-
center
">
<button class="
center
aligned
ui
blue
icon
button
">View Project</button>
<button class="
center
aligned
ui
blue
icon
button
">View Project</button>
</th>
</th>
...
@@ -72,8 +72,8 @@
...
@@ -72,8 +72,8 @@
</div>
</div>
<?php
<?php
$chargeable
=
$projects->where
('tp_project_type', 1)->where('fk_tm_id', data_get(
$
valu
e
,'id'));
$chargeable
=
$projects->where
('tp_project_type', 1)->where('fk_tm_id', data_get(
$
tim
e
,'id'));
$overhead
=
$projects->where
('tp_project_type', 3)->where('fk_tm_id', data_get(
$
valu
e
,'id'));
$overhead
=
$projects->where
('tp_project_type', 3)->where('fk_tm_id', data_get(
$
tim
e
,'id'));
// dd(
$overhead
);
// dd(
$overhead
);
?>
?>
...
@@ -200,6 +200,46 @@
...
@@ -200,6 +200,46 @@
@endforeach
@endforeach
@endif
@endif
</table>
</table>
<!-- Overhead Notes Start -->
<?php
$n
= null; ?>
@foreach(
$staffnotes
as
$key
=>
$detail
)
@if(data_get(
$time
,'id') == data_get(
$detail
, 'fk_tm_id'))
@foreach(data_get(
$detail
,'notes') as
$key
=>
$tm_detail
)
<?php
$n
=
$tm_detail
; ?>
@endforeach
@endif
@endforeach
@if(
$n
)
<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(
$staffnotes
as
$key
=>
$detail
)
<?php
// dump('value : '.data_get(
$time
,'id')); dump('detail : '.data_get(
$detail
,'fk_tm_id'));
?>
@if(data_get(
$time
,'id') == data_get(
$detail
, 'fk_tm_id'))
@foreach(data_get(
$detail
,'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
<!-- Overhead Notes End -->
</div>
</div>
</div>
</div>
<br>
<br>
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
5ae502ad
...
@@ -69,6 +69,13 @@ class DashboardController extends Controller
...
@@ -69,6 +69,13 @@ class DashboardController extends Controller
->
orderby
(
'tm_phase'
,
'desc'
)
->
orderby
(
'tm_phase'
,
'desc'
)
->
get
();
->
get
();
$staffnotes
=
Tproject
::
where
(
'tp_project_type'
,
3
)
->
where
(
'tp_timesheet_sts'
,
'<>'
,
1
)
->
where
(
'staffid'
,
$verifier
->
u_staffID
)
->
where
(
'tp_year'
,
date
(
'Y'
))
->
with
(
'notes'
)
->
get
();
$details
=
Tproject
::
where
(
'tp_project_type'
,
3
)
$details
=
Tproject
::
where
(
'tp_project_type'
,
3
)
->
where
(
'tp_timesheet_sts'
,
'<>'
,
1
)
->
where
(
'tp_timesheet_sts'
,
'<>'
,
1
)
->
where
(
'tp_pm'
,
$verifier
->
id
)
->
where
(
'tp_pm'
,
$verifier
->
id
)
...
@@ -99,7 +106,7 @@ class DashboardController extends Controller
...
@@ -99,7 +106,7 @@ class DashboardController extends Controller
->
with
(
'bod'
)
->
with
(
'bod'
)
->
get
();
->
get
();
return
view
(
'timesheet::dashboard.dashboardhod'
,
compact
(
'profile'
,
'details'
,
'checkts'
,
'verifier'
,
'timesheet'
,
'projects'
));
return
view
(
'timesheet::dashboard.dashboardhod'
,
compact
(
'profile'
,
'details'
,
'checkts'
,
'verifier'
,
'timesheet'
,
'projects'
,
'staffnotes'
));
}
}
...
@@ -161,7 +168,6 @@ class DashboardController extends Controller
...
@@ -161,7 +168,6 @@ class DashboardController extends Controller
if
(
$roleid
==
'8'
)
{
if
(
$roleid
==
'8'
)
{
$verifier
=
Users
::
find
(
Auth
::
id
());
$verifier
=
Users
::
find
(
Auth
::
id
());
$profile
=
VwChargeableVerification
::
select
(
'tmid'
,
'staff_id'
,
'year'
,
'month'
,
'phase'
,
'status'
,
'submission'
,
'fullname'
,
'pmstaffid'
)
$profile
=
VwChargeableVerification
::
select
(
'tmid'
,
'staff_id'
,
'year'
,
'month'
,
'phase'
,
'status'
,
'submission'
,
'fullname'
,
'pmstaffid'
)
...
@@ -176,6 +182,12 @@ class DashboardController extends Controller
...
@@ -176,6 +182,12 @@ class DashboardController extends Controller
->
with
(
'countchargeable'
)
->
with
(
'countchargeable'
)
->
get
();
->
get
();
// dd($profile);
// dd($profile);
$staffnotes
=
Tproject
::
where
(
'tp_project_type'
,
3
)
->
where
(
'tp_timesheet_sts'
,
'<>'
,
1
)
->
where
(
'staffid'
,
$verifier
->
u_staffID
)
->
where
(
'tp_year'
,
date
(
'Y'
))
->
with
(
'notes'
)
->
get
();
$details
=
Tproject
::
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
$details
=
Tproject
::
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
// ->where('tp_timesheet_sts', 2)
// ->where('tp_timesheet_sts', 2)
...
@@ -207,7 +219,7 @@ class DashboardController extends Controller
...
@@ -207,7 +219,7 @@ class DashboardController extends Controller
->
with
(
'bod'
)
->
with
(
'bod'
)
->
get
();
->
get
();
return
view
(
'timesheet::dashboard.dashboardpm'
,
compact
(
'profile'
,
'details'
,
'verifier'
,
'timesheet'
,
'projects'
,
'staffinfo'
));
return
view
(
'timesheet::dashboard.dashboardpm'
,
compact
(
'profile'
,
'details'
,
'verifier'
,
'timesheet'
,
'projects'
,
'staffinfo'
,
'staffnotes'
));
}
}
if
(
$roleid
==
'9'
)
{
if
(
$roleid
==
'9'
)
{
...
@@ -225,6 +237,13 @@ class DashboardController extends Controller
...
@@ -225,6 +237,13 @@ class DashboardController extends Controller
// ->with('department')
// ->with('department')
->
get
();
->
get
();
// dd($profile);
// dd($profile);
$staffnotes
=
Tproject
::
where
(
'tp_project_type'
,
3
)
// ->where('tp_timesheet_sts','<>', 1)
->
where
(
'staffid'
,
$verifier
->
u_staffID
)
->
where
(
'tp_year'
,
date
(
'Y'
))
->
with
(
'notes'
)
->
get
();
// dd($staffnotes);
$details
=
Tproject
::
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
$details
=
Tproject
::
where
(
'tp_pm'
,
$verifier
->
u_staffID
)
// ->whereIn('tp_timesheet_sts', [2,6])
// ->whereIn('tp_timesheet_sts', [2,6])
...
@@ -263,7 +282,7 @@ class DashboardController extends Controller
...
@@ -263,7 +282,7 @@ class DashboardController extends Controller
->
with
(
'bod'
)
->
with
(
'bod'
)
->
get
();
->
get
();
return
view
(
'timesheet::dashboard.dashboardpmhod'
,
compact
(
'profile'
,
'details'
,
'verifier'
,
'overheads'
,
'staffinfo'
,
'timesheet'
,
'projects'
,
'roleid'
));
return
view
(
'timesheet::dashboard.dashboardpmhod'
,
compact
(
'profile'
,
'details'
,
'verifier'
,
'overheads'
,
'staffinfo'
,
'timesheet'
,
'projects'
,
'roleid'
,
'staffnotes'
));
}
}
if
((
$roleid
==
(
'5'
||
'6'
)))
{
if
((
$roleid
==
(
'5'
||
'6'
)))
{
...
@@ -295,6 +314,14 @@ class DashboardController extends Controller
...
@@ -295,6 +314,14 @@ class DashboardController extends Controller
->
get
();
->
get
();
// dd($projects);
// dd($projects);
$staffnotes
=
Tproject
::
where
(
'tp_project_type'
,
3
)
->
where
(
'tp_timesheet_sts'
,
'<>'
,
1
)
->
where
(
'staffid'
,
$staffid
)
->
where
(
'tp_year'
,
date
(
'Y'
))
->
with
(
'notes'
)
->
get
();
// dd($staffnotes);
//verifier section
//verifier section
$verifier
=
Users
::
find
(
Auth
::
id
());
$verifier
=
Users
::
find
(
Auth
::
id
());
...
@@ -323,7 +350,7 @@ class DashboardController extends Controller
...
@@ -323,7 +350,7 @@ class DashboardController extends Controller
}
}
)
->
paginate
(
15
);
)
->
paginate
(
15
);
return
view
(
'timesheet::dashboard.dashboardstaff'
,
compact
(
'user'
,
'timesheet'
,
'staffs'
,
'projects'
,
'roleid'
,
'staffinfo'
,
'profile'
,
'details'
,
'checkts'
));
return
view
(
'timesheet::dashboard.dashboardstaff'
,
compact
(
'user'
,
'timesheet'
,
'staffs'
,
'projects'
,
'roleid'
,
'staffinfo'
,
'profile'
,
'details'
,
'checkts'
,
'staffnotes'
));
}
if
(
$roleid
==
'3'
)
{
}
if
(
$roleid
==
'3'
)
{
...
...
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