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
00fc052b
Commit
00fc052b
authored
Dec 23, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log Pia #180 -> submit overhead only. bod reject, staff resubmit, hod tak dapat timesheet.
parent
6410e2ff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
5 deletions
+32
-5
packages/portal/timesheet/src/Http/Controllers/FormController.php
+32
-5
No files found.
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
00fc052b
...
@@ -2197,9 +2197,9 @@ class FormController extends Controller
...
@@ -2197,9 +2197,9 @@ class FormController extends Controller
public
function
resubmit
(
Request
$request
)
public
function
resubmit
(
Request
$request
)
{
{
$roleid
=
auth
()
->
user
()
->
roles
[
'0'
]
->
id
;
dd
(
'resubmit'
)
;
// dd($request)
;
$roleid
=
auth
()
->
user
()
->
roles
[
'0'
]
->
id
;
$profile
=
Tproject
::
where
(
'id'
,
$request
->
tpid
)
$profile
=
Tproject
::
where
(
'id'
,
$request
->
tpid
)
->
first
();
->
first
();
...
@@ -2212,7 +2212,6 @@ class FormController extends Controller
...
@@ -2212,7 +2212,6 @@ class FormController extends Controller
$check
=
Ts_master
::
where
(
'id'
,
$profile
->
fk_tm_id
)
$check
=
Ts_master
::
where
(
'id'
,
$profile
->
fk_tm_id
)
->
first
();
->
first
();
// dd($check);
if
(
$check
)
if
(
$check
)
{
{
...
@@ -2416,7 +2415,7 @@ class FormController extends Controller
...
@@ -2416,7 +2415,7 @@ class FormController extends Controller
public
function
resubmitoverhead
(
Request
$request
)
public
function
resubmitoverhead
(
Request
$request
)
{
{
//
dd($request);
dd
(
$request
);
// dd(gettype($request->hour[1][3]));
// dd(gettype($request->hour[1][3]));
...
@@ -2687,7 +2686,7 @@ class FormController extends Controller
...
@@ -2687,7 +2686,7 @@ class FormController extends Controller
->
whereNotNull
(
'td_hours'
)
->
whereNotNull
(
'td_hours'
)
->
where
(
'td_project_type'
,
3
)
->
where
(
'td_project_type'
,
3
)
->
get
();
->
get
();
// dd($checknotes);
foreach
(
$checknotes
as
$key
=>
$value
)
foreach
(
$checknotes
as
$key
=>
$value
)
{
{
...
@@ -2697,6 +2696,13 @@ class FormController extends Controller
...
@@ -2697,6 +2696,13 @@ class FormController extends Controller
}
}
}
}
// dd($tmaster->id);
$overheadonly
=
Tproject
::
where
(
'fk_tm_id'
,
$tmaster
->
id
)
->
where
(
'tp_project_type'
,
1
)
->
first
();
if
(
$overheadonly
)
{
Tproject
::
where
(
'fk_tm_id'
,
$request
->
fk_tm_id
)
Tproject
::
where
(
'fk_tm_id'
,
$request
->
fk_tm_id
)
->
where
(
'tp_project_type'
,
3
)
->
where
(
'tp_project_type'
,
3
)
->
update
([
->
update
([
...
@@ -2710,6 +2716,27 @@ class FormController extends Controller
...
@@ -2710,6 +2716,27 @@ class FormController extends Controller
'td_timesheet_sts'
=>
2
,
'td_timesheet_sts'
=>
2
,
'updated_by'
=>
$userId
'updated_by'
=>
$userId
]);
]);
}
else
{
Tproject
::
where
(
'fk_tm_id'
,
$request
->
fk_tm_id
)
->
where
(
'tp_project_type'
,
3
)
->
update
([
'tp_timesheet_sts'
=>
2
,
'updated_by'
=>
$userId
]);
Ts_detail
::
where
(
'fk_tm_id'
,
$request
->
fk_tm_id
)
->
where
(
'td_project_type'
,
3
)
->
update
([
'td_timesheet_sts'
=>
2
,
'updated_by'
=>
$userId
]);
Ts_master
::
where
(
'id'
,
$request
->
fk_tm_id
)
->
update
([
'tm_timesheet_master_sts'
=>
2
]);
}
if
(
$roleid
==
'8'
)
if
(
$roleid
==
'8'
)
{
{
...
...
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