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
6f84d8c8
Commit
6f84d8c8
authored
Jan 12, 2023
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display overhead description bila hod verify
parent
b2e67d6b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
120 additions
and
49 deletions
+120
-49
packages/portal/timesheet/resources/views/dashboard/dashboardpmhod.blade.php
+4
-1
packages/portal/timesheet/resources/views/dashboard/revaction.blade.php
+55
-36
packages/portal/timesheet/resources/views/dashboard/selectverificationpage.blade.php
+20
-0
packages/portal/timesheet/resources/views/dashboard/verifyallaction.blade.php
+19
-0
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+22
-12
No files found.
packages/portal/timesheet/resources/views/dashboard/dashboardpmhod.blade.php
View file @
6f84d8c8
...
...
@@ -487,7 +487,10 @@
<th class="
center
aligned
">Notes</th>
</tr>
</thead>
@foreach(
$overheads
as
$key
=>
$overhead
)
<?php
$pmsoverheads
=
$overheads->where
('fk_tm_id', data_get(
$staff
,'tmid'));
?>
@foreach(
$pmsoverheads
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'))
...
...
packages/portal/timesheet/resources/views/dashboard/revaction.blade.php
View file @
6f84d8c8
...
...
@@ -10,42 +10,42 @@
<br>
<table class="
ui
unstackable
collapsing
table
" style="
width
:
100
%
">
<tbody>
<tr>
<td rowspan="
3
">
<img src="
{{
url
(
'img/3f-logo.svg'
)
}}
" height="
126
" width="
126
" alt="
3
f
-
logo
">
</td>
<td>Name</td>
<td>:</td>
<td>{{ data_get(
$staff
,'STAFF_NAME') }}</td>
<td rowspan="
3
"></td>
<td>Department</td>
<td>:</td>
<td>{{ data_get(
$staff
,'DEPARTMENT') }}</td>
<td rowspan="
3
"></td>
</tr>
<tr>
<td>Staff No</td>
<td>:</td>
<td>{{ data_get(
$staff
,'STAFF_ID') }}</td>
<td>Reporting Manager</td>
<td>:</td>
<td>{{ data_get(
$staff
,'HOD_NAME') }}</td>
</tr>
<tr>
<td>Month</td>
<td>:</td>
<td>{{
$strMonth
}}</td>
<td>Phase</td>
<td>:</td>
<td>
@if(
$phase
== 1) 1st Half-month
@else 2nd Half-month
@endif
</td>
</tr>
</tbody>
</table>
<tbody>
<tr>
<td rowspan="
3
">
<img src="
{{
url
(
'img/3f-logo.svg'
)
}}
" height="
126
" width="
126
" alt="
3
f
-
logo
">
</td>
<td>Name</td>
<td>:</td>
<td>{{ data_get(
$staff
,'STAFF_NAME') }}</td>
<td rowspan="
3
"></td>
<td>Department</td>
<td>:</td>
<td>{{ data_get(
$staff
,'DEPARTMENT') }}</td>
<td rowspan="
3
"></td>
</tr>
<tr>
<td>Staff No</td>
<td>:</td>
<td>{{ data_get(
$staff
,'STAFF_ID') }}</td>
<td>Reporting Manager</td>
<td>:</td>
<td>{{ data_get(
$staff
,'HOD_NAME') }}</td>
</tr>
<tr>
<td>Month</td>
<td>:</td>
<td>{{
$strMonth
}}</td>
<td>Phase</td>
<td>:</td>
<td>
@if(
$phase
== 1) 1st Half-month
@else 2nd Half-month
@endif
</td>
</tr>
</tbody>
</table>
<table class="
ui
celled
structured
table
unstackable
">
<thead>
...
...
@@ -193,6 +193,25 @@
</tfoot> -->
</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(data_get(
$profile
,'notes') as
$key
=>
$value
)
@if(data_get(
$profile
,'fk_o_id') == data_get(
$value
, 'fk_o_id'))
<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
</table>
<form action="
{{
route
(
'timesheet::dashboard.verifyoverhead'
)
}}
" method="
POST
" class="
ui
form
">
{
{csrf_field()}
}
<input type="
hidden
" name="
tpid
" value="
{{
data_get
(
$profile
,
'id'
)
}}
">
...
...
packages/portal/timesheet/resources/views/dashboard/selectverificationpage.blade.php
View file @
6f84d8c8
...
...
@@ -338,6 +338,26 @@
<th style="
width
:
5
%
">@if(
$totaloverheadhrs
) {{ number_format(
$totaloverheadhrs
/8, 1, '.', '') }} @else 0 @endif</th>
</tfoot> -->
</table>
@if(count(
$notes
) > 0)
<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(
$notes
as
$key
=>
$value
)
<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>
@endforeach
</table>
@endif
@endif
<div class="
ui
segment
">
...
...
packages/portal/timesheet/resources/views/dashboard/verifyallaction.blade.php
View file @
6f84d8c8
...
...
@@ -339,6 +339,25 @@
</tfoot> -->
</table>
@endif
@if(count(
$notes
) > 0)
<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(
$notes
as
$key
=>
$value
)
<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>
@endforeach
</table>
@endif
</div>
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
6f84d8c8
...
...
@@ -633,6 +633,7 @@ class DashboardController extends Controller
$profile
=
Tproject
::
where
(
'id'
,
$request
->
tpid
)
->
with
(
'team'
)
->
with
(
'hod'
)
->
with
(
'notes'
)
->
first
();
// dd($profile);
...
...
@@ -3358,7 +3359,7 @@ class DashboardController extends Controller
$tempOverhead
[
0
]
=
""
;
$tempOverheadid
[
0
]
=
0
;
$overheadid
=
[];
if
(
isset
(
$overheadhour
[
0
]))
{
// dd('sini ke?');
...
...
@@ -3386,6 +3387,8 @@ class DashboardController extends Controller
'pid'
=>
$value
->
fk_o_id
,
'pname'
=>
$value
->
tp_project_name
,
];
$overheadid
[]
=
$value
->
fk_o_id
;
}
}
// dd($overheadlist);
...
...
@@ -3400,14 +3403,15 @@ class DashboardController extends Controller
$totaloverheadhrs
=
$check
->
tm_overhead_hrs
;
$notes
=
Ts_detail
::
where
(
'tm_year'
,
$year
)
->
where
(
'tm_month'
,
$month
)
->
where
(
'tm_phase'
,
$phase
)
->
where
(
'fk_tm_id'
,
$check
->
id
)
->
where
(
'tm_staff_id'
,
$tm
->
tm_staff_id
)
->
where
(
'td_project_type'
,
$overhead
)
->
whereNotNull
(
'td_hours'
)
->
orderby
(
'td_date'
)
->
get
();
->
where
(
'tm_month'
,
$month
)
->
where
(
'tm_phase'
,
$phase
)
->
where
(
'fk_tm_id'
,
$check
->
id
)
->
whereIn
(
'fk_o_id'
,
$overheadid
)
->
where
(
'tm_staff_id'
,
$tm
->
tm_staff_id
)
->
where
(
'td_project_type'
,
$overhead
)
->
whereNotNull
(
'td_hours'
)
->
orderby
(
'td_date'
)
->
get
();
}
else
{
...
...
@@ -3419,7 +3423,9 @@ class DashboardController extends Controller
$check
=
null
;
}
return
view
(
'timesheet::dashboard.selectverificationpage'
,
compact
(
'tm'
,
'phase'
,
'month'
,
'year'
,
'staff'
,
'strMonth'
,
'profile'
,
'strdays'
,
'overheadlist'
,
'overheadhour'
,
'totaloverheadhrs'
,
'chargeablelist'
,
'chargehour'
,
'totalchargehrs'
,
'page'
,
'pm'
,
'daymonth'
));
// dd($notes);
return
view
(
'timesheet::dashboard.selectverificationpage'
,
compact
(
'tm'
,
'phase'
,
'month'
,
'year'
,
'staff'
,
'strMonth'
,
'profile'
,
'strdays'
,
'overheadlist'
,
'overheadhour'
,
'totaloverheadhrs'
,
'chargeablelist'
,
'chargehour'
,
'totalchargehrs'
,
'page'
,
'pm'
,
'daymonth'
,
'notes'
));
}
public
function
verificationselected
(
Request
$request
)
...
...
@@ -4016,7 +4022,8 @@ class DashboardController extends Controller
$tempOverhead
[
0
]
=
""
;
$tempOverheadid
[
0
]
=
0
;
$overheadid
=
[];
if
(
isset
(
$overheadhour
[
0
]))
{
// dd('sini ke?');
...
...
@@ -4044,6 +4051,8 @@ class DashboardController extends Controller
'pid'
=>
$value
->
fk_o_id
,
'pname'
=>
$value
->
tp_project_name
,
];
$overheadid
[]
=
$value
->
fk_o_id
;
}
}
}
...
...
@@ -4060,6 +4069,7 @@ class DashboardController extends Controller
->
where
(
'tm_month'
,
$month
)
->
where
(
'tm_phase'
,
$phase
)
->
where
(
'fk_tm_id'
,
$check
->
id
)
->
whereIn
(
'fk_o_id'
,
$overheadid
)
->
where
(
'tm_staff_id'
,
$tm
->
tm_staff_id
)
->
where
(
'td_project_type'
,
$overhead
)
->
whereNotNull
(
'td_hours'
)
...
...
@@ -4076,7 +4086,7 @@ class DashboardController extends Controller
$check
=
null
;
}
return
view
(
'timesheet::dashboard.verifyallaction'
,
compact
(
'tm'
,
'user'
,
'staff'
,
'year'
,
'month'
,
'phase'
,
'strMonth'
,
'chargeablelist'
,
'daymonth'
,
'strdays'
,
'chargehour'
,
'totalchargehrs'
,
'overheadlist'
,
'overheadhour'
,
'totaloverheadhrs'
,
'page'
,
'chargeableproject'
,
'overheadproject'
,
'verifier'
));
return
view
(
'timesheet::dashboard.verifyallaction'
,
compact
(
'tm'
,
'user'
,
'staff'
,
'year'
,
'month'
,
'phase'
,
'strMonth'
,
'chargeablelist'
,
'daymonth'
,
'strdays'
,
'chargehour'
,
'totalchargehrs'
,
'overheadlist'
,
'overheadhour'
,
'totaloverheadhrs'
,
'page'
,
'chargeableproject'
,
'overheadproject'
,
'verifier'
,
'notes'
));
}
public
function
verificationall
(
Request
$request
)
...
...
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