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
ec18097c
Commit
ec18097c
authored
Jul 25, 2022
by
hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
calculate hours and print timesheet review
parent
89c1ae9a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
39 deletions
+91
-39
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
+0
-0
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+38
-38
resources/views/vendor/ui/layouts/base.blade.php
+53
-1
No files found.
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
View file @
ec18097c
This diff is collapsed.
Click to expand it.
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
ec18097c
...
@@ -96,9 +96,13 @@ class DashboardController extends Controller
...
@@ -96,9 +96,13 @@ class DashboardController extends Controller
$hod
=
Staff_info
::
find
(
$user
->
penyokong
)
$hod
=
Staff_info
::
find
(
$user
->
penyokong
)
->
fullname
;
->
fullname
;
$month
=
date
(
'n'
);
// $month = date('n');
$year
=
date
(
'Y'
);
// $year = date('Y');
$day
=
date
(
'j'
);
// $day = date('j');
$month
=
7
;
$year
=
2022
;
$day
=
2
;
if
(
$day
<
16
)
{
if
(
$day
<
16
)
{
$phase
=
1
;
$phase
=
1
;
...
@@ -116,7 +120,6 @@ class DashboardController extends Controller
...
@@ -116,7 +120,6 @@ class DashboardController extends Controller
{
{
$phase
=
$request
->
phase
;
$phase
=
$request
->
phase
;
}
}
if
(
isset
(
$request
->
month
))
if
(
isset
(
$request
->
month
))
{
{
$month
=
$request
->
month
;
$month
=
$request
->
month
;
...
@@ -139,9 +142,8 @@ class DashboardController extends Controller
...
@@ -139,9 +142,8 @@ class DashboardController extends Controller
->
where
(
'pt_project_type'
,
$nonchargeable
)
->
where
(
'pt_project_type'
,
$nonchargeable
)
->
get
();
->
get
();
$overheadproject
=
Overhead
::
where
(
'o_overhead_sts'
,
1
)
// $overheadproject = Overhead::where('o_overhead_sts',1)
->
get
();
// ->get();
$chargeablelist
=
[];
$chargeablelist
=
[];
...
@@ -171,17 +173,6 @@ class DashboardController extends Controller
...
@@ -171,17 +173,6 @@ class DashboardController extends Controller
}
}
foreach
(
$overheadproject
as
$key
=>
$value
)
{
$overheadlist
[]
=
[
'pid'
=>
$value
->
id
,
'pname'
=>
$value
->
o_overhead_desc
,
];
}
$check
=
Ts_master
::
where
(
'tm_staff_id'
,
$user
->
staff_id
)
$check
=
Ts_master
::
where
(
'tm_staff_id'
,
$user
->
staff_id
)
->
where
(
'tm_year'
,
$year
)
->
where
(
'tm_year'
,
$year
)
->
where
(
'tm_month'
,
$month
)
->
where
(
'tm_month'
,
$month
)
...
@@ -201,27 +192,36 @@ class DashboardController extends Controller
...
@@ -201,27 +192,36 @@ class DashboardController extends Controller
// ->where('td_hours', '!=', 0)
// ->where('td_hours', '!=', 0)
->
get
();
->
get
();
// $filledoverhead = Ts_detail::where('fk_tm_id',$check->id)
// ->where('td_project_type', $overhead)
// // ->where('td_hours', '!=', 0)
// ->get();
// foreach ($filledoverhead as $key => $value) {
// $temp[$key] =
// if($overheadlist[$key] != $overheadlist[$key+1]) {
// $overheadlist[] = [
// 'pid' => $value->fk_o_id,
// 'pname' => $value->td_overhead_desc,
// ];
// }
// }
// dd($overheadlist);
$overheadhour
=
Ts_detail
::
where
(
'fk_tm_id'
,
$check
->
id
)
$overheadhour
=
Ts_detail
::
where
(
'fk_tm_id'
,
$check
->
id
)
->
where
(
'td_project_type'
,
$overhead
)
->
where
(
'td_project_type'
,
$overhead
)
// ->where('td_hours', '!=', 0)
->
where
(
'td_hours'
,
'!='
,
0
)
->
get
();
->
get
();
$tempOverhead
=
[];
$tempOverheadid
=
[];
$tempOverhead
[
0
]
=
$overheadhour
[
0
]
->
td_overhead_desc
;
$tempOverheadid
[
0
]
=
$overheadhour
[
0
]
->
fk_o_id
;
$j
=
0
;
for
(
$i
=
0
;
$i
<
count
(
$overheadhour
);
$i
++
){
if
(
$tempOverhead
[
$j
]
==
$overheadhour
[
$i
]
->
td_overhead_desc
)
{
}
else
{
$j
++
;
$tempOverhead
[
$j
]
=
$overheadhour
[
$i
]
->
td_overhead_desc
;
$tempOverheadid
[
$j
]
=
$overheadhour
[
$i
]
->
fk_o_id
;
}
}
foreach
(
$tempOverhead
as
$key
=>
$value
)
{
$overheadlist
[]
=
[
'pid'
=>
$tempOverheadid
[
$key
],
'pname'
=>
$tempOverhead
[
$key
],
];
}
}
}
else
else
...
@@ -246,7 +246,7 @@ class DashboardController extends Controller
...
@@ -246,7 +246,7 @@ class DashboardController extends Controller
->
orderby
(
'td_date'
)
->
orderby
(
'td_date'
)
->
get
();
->
get
();
return
view
(
'timesheet::dashboard.timesheetViewer'
,
compact
(
'user'
,
'dept'
,
'hod'
,
'phase'
,
'month'
,
'year'
,
'day'
,
'strMonth'
,
'daymonth'
,
'chargeablelist'
,
'nonchargeablelist'
,
'overheadlist'
,
'chargehour'
,
'nonchargehour'
,
'totalchargehrs'
,
'totalnonchargehrs'
,
'totaloverheadhrs'
,
'overheadhour'
,
'notes'
));
return
view
(
'timesheet::dashboard.timesheetViewer'
,
compact
(
'user'
,
'dept'
,
'hod'
,
'phase'
,
'month'
,
'year'
,
'day'
,
'strMonth'
,
'daymonth'
,
'chargeablelist'
,
'nonchargeablelist'
,
'overheadlist'
,
'chargehour'
,
'nonchargehour'
,
'totalchargehrs'
,
'totalnonchargehrs'
,
'totaloverheadhrs'
,
'overheadhour'
,
'notes'
,
'check'
));
}
}
...
...
resources/views/vendor/ui/layouts/base.blade.php
View file @
ec18097c
...
@@ -19,7 +19,59 @@
...
@@ -19,7 +19,59 @@
</head>
</head>
<body
data-theme=
"{{ config('laravolt.ui.sidebar_theme') }}"
class=
"{{ $bodyClass ?? '' }}"
>
<body
data-theme=
"{{ config('laravolt.ui.sidebar_theme') }}"
class=
"on-the-fly-behavior {{ $bodyClass ?? '' }}"
id=
"body1"
>
<style
scoped
>
.print-fly
{
background-color
:
white
;
font-size
:
10px
;
}
.print-flys
{
background-color
:
white
;
width
:
auto
;
}
.on-the-fly-behavior
{
background-image
:
url('{{ asset('assets/images/bg.png')
}
}
');
background-repeat:no-repeat;
background-size: contain;
}
.langdisp
{
background-color: darkmagenta;
border-radius: 20px;
margin-right: 10px;
margin-top: 20px !important;
padding-top: 10px;
padding-bottom: 14px;
padding-right: 20px;
padding-left: 20px;"
}
@media (max-width: 1200px)
{
.on-the-fly-behavior {
background-image: url('
{
{
asset('assets/images/bg.png')
}
}'
);
background-repeat
:no-repeat
;
background-size
:
unset
;
}
.langdisp
{
background-color
:
unset
!important
;
border-radius
:
unset
!important
;
margin
:
unset
!important
;
padding
:
unset
!important
;
}
}
</style>
@yield('body')
@yield('body')
...
...
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