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
2364e3e9
Commit
2364e3e9
authored
Sep 29, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto verify hod timesheet
parent
a2f87f27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+15
-2
No files found.
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
2364e3e9
...
@@ -893,6 +893,9 @@ class DashboardController extends Controller
...
@@ -893,6 +893,9 @@ class DashboardController extends Controller
public
function
tsubmit
(
Request
$request
)
public
function
tsubmit
(
Request
$request
)
{
{
$roleid
=
auth
()
->
user
()
->
roles
[
'0'
]
->
id
;
$user
=
Staff_info
::
where
(
'fk_users'
,
Auth
::
id
())
->
first
();
// dd($user->pelulus);
$checknotes
=
Ts_detail
::
where
(
'fk_tm_id'
,
$request
->
tid
)
$checknotes
=
Ts_detail
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
whereNotNull
(
'td_hours'
)
->
whereNotNull
(
'td_hours'
)
...
@@ -908,8 +911,7 @@ class DashboardController extends Controller
...
@@ -908,8 +911,7 @@ class DashboardController extends Controller
}
}
$today
=
Carbon
::
today
()
->
toDateString
();
$today
=
Carbon
::
today
()
->
toDateString
();
$submit
=
2
;
Ts_master
::
where
(
'id'
,
$request
->
tid
)
Ts_master
::
where
(
'id'
,
$request
->
tid
)
->
update
(
->
update
(
...
@@ -927,6 +929,17 @@ class DashboardController extends Controller
...
@@ -927,6 +929,17 @@ class DashboardController extends Controller
Tproject
::
where
(
'fk_tm_id'
,
$request
->
tid
)
Tproject
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
update
([
'tp_timesheet_sts'
=>
2
]);
->
update
([
'tp_timesheet_sts'
=>
2
]);
if
(
$roleid
==
(
'2'
||
'9'
||
'8'
)
||
data_get
(
$user
->
pelulus
)
==
'0'
)
{
Ts_master
::
where
(
'id'
,
$request
->
tid
)
->
update
([
'tm_timesheet_master_sts'
=>
3
]);
Ts_detail
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
update
([
'td_timesheet_sts'
=>
3
]);
Tproject
::
where
(
'fk_tm_id'
,
$request
->
tid
)
->
update
([
'tp_timesheet_sts'
=>
3
]
);
}
return
redirect
()
->
route
(
'timesheet::dashboard.index'
)
->
withSuccess
(
'Timesheet has been submitted!'
);
return
redirect
()
->
route
(
'timesheet::dashboard.index'
)
->
withSuccess
(
'Timesheet has been submitted!'
);
}
}
...
...
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