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
25bc4e7a
Commit
25bc4e7a
authored
Jun 07, 2022
by
hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes
parent
7bdba129
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+7
-4
No files found.
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
25bc4e7a
...
@@ -246,7 +246,7 @@ class DashboardController extends Controller
...
@@ -246,7 +246,7 @@ class DashboardController extends Controller
//Form Baru
//Form Baru
//check dalam db table ts-detail. Kalau dah ada details dalam td_hours -> update().
//check dalam db table ts-detail. Kalau dah ada details dalam td_hours -> update().
//Kalau
belum
-> save()
//Kalau
tak ada detail hours
-> save()
$user
=
users
::
where
(
'id'
,
Auth
::
id
())
->
first
();
$user
=
users
::
where
(
'id'
,
Auth
::
id
())
->
first
();
...
@@ -258,18 +258,21 @@ class DashboardController extends Controller
...
@@ -258,18 +258,21 @@ class DashboardController extends Controller
->
whereNotNull
(
'td_hours'
)
->
whereNotNull
(
'td_hours'
)
->
first
();
->
first
();
//update total chargeable hrs
//update total chargeable hrs
if
(
$checkTimesheetDetail
)
if
(
$checkTimesheetDetail
)
{
{
$data
=
Ts_detail
::
where
(
'id'
,
$request
->
id
)
->
first
();
$data
=
Ts_detail
::
where
(
'tm_staff_id'
,
$user
->
u_staffID
)
->
where
(
'tm_year'
,
$request
->
year
)
->
where
(
'tm_month'
,
$request
->
month
)
->
where
(
'tm_phase'
,
$request
->
phase
)
->
first
();
$data
->
td_hours
=
10
;
$data
->
td_hours
=
10
;
$data
->
update
();
$data
->
update
();
}
}
//kalau takda, save().
//kalau takda, save().
else
else
{
{
dd
(
$checkTimesheetDetail
);
//
dd($checkTimesheetDetail);
$data
=
new
Ts_detail
;
$data
=
new
Ts_detail
;
$data
->
id
=
$request
->
id
;
$data
->
id
=
$request
->
id
;
$data
->
tm_year
=
$request
->
year
;
$data
->
tm_year
=
$request
->
year
;
...
...
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