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
ad6d9497
Commit
ad6d9497
authored
Dec 16, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes
parent
2de0f0c5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
18 deletions
+30
-18
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+15
-13
packages/portal/timesheet/src/Http/Controllers/FormController.php
+5
-4
packages/portal/timesheet/src/Model/Pteam.php
+10
-1
No files found.
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
ad6d9497
...
@@ -28,6 +28,7 @@ use File;
...
@@ -28,6 +28,7 @@ use File;
use
Redirect
;
use
Redirect
;
use
App\Mail\StatusAccept
;
use
App\Mail\StatusAccept
;
use
App\Mail\StatusReject
;
use
App\Mail\StatusReject
;
use
App\Mail\EditProject
;
use
Mail
;
use
Mail
;
use
Curl
;
use
Curl
;
use
Auth
;
use
Auth
;
...
@@ -333,7 +334,8 @@ class DashboardController extends Controller
...
@@ -333,7 +334,8 @@ class DashboardController extends Controller
}
}
}
}
public
function
vwviewer
(){
public
function
vwviewer
()
{
$data
=
VwViewer
::
orderby
(
'DEPARTMENT'
,
'DESC'
)
->
get
();
$data
=
VwViewer
::
orderby
(
'DEPARTMENT'
,
'DESC'
)
->
get
();
// dd($data[0]);
// dd($data[0]);
return
view
(
'timesheet::dashboard.vwviewer'
,
compact
(
'data'
));
return
view
(
'timesheet::dashboard.vwviewer'
,
compact
(
'data'
));
...
@@ -402,30 +404,30 @@ class DashboardController extends Controller
...
@@ -402,30 +404,30 @@ class DashboardController extends Controller
return
view
(
'timesheet::dashboard.filterApproval'
,
compact
(
'month'
,
'curryear'
,
'currmonth'
));
return
view
(
'timesheet::dashboard.filterApproval'
,
compact
(
'month'
,
'curryear'
,
'currmonth'
));
}
}
public
function
viewerselectmonthphase
(
Request
$request
){
public
function
viewerselectmonthphase
(
Request
$request
)
{
return
redirect
()
->
route
(
'timesheet::dashboard.timesheetViewer'
,
[
'phase'
=>
$request
->
phase
,
'month'
=>
$request
->
month
]);
return
redirect
()
->
route
(
'timesheet::dashboard.timesheetViewer'
,
[
'phase'
=>
$request
->
phase
,
'month'
=>
$request
->
month
]);
}
}
public
function
pmverifyselectmonthphase
(
Request
$request
){
public
function
pmverifyselectmonthphase
(
Request
$request
)
{
return
redirect
()
->
route
(
'timesheet::dashboard.projectVerify'
,
[
'phase'
=>
$request
->
phase
,
'month'
=>
$request
->
month
]);
return
redirect
()
->
route
(
'timesheet::dashboard.projectVerify'
,
[
'phase'
=>
$request
->
phase
,
'month'
=>
$request
->
month
]);
}
}
public
function
reviewselectmonthphase
(
Request
$request
)
{
public
function
reviewselectmonthphase
(
Request
$request
)
{
return
redirect
()
->
route
(
'timesheet::dashboard.timesheetReview'
,
[
'phase'
=>
$request
->
phase
,
'month'
=>
$request
->
month
]);
return
redirect
()
->
route
(
'timesheet::dashboard.timesheetReview'
,
[
'phase'
=>
$request
->
phase
,
'month'
=>
$request
->
month
]);
}
}
public
function
approvalselectmonthphase
(
Request
$request
)
{
public
function
approvalselectmonthphase
(
Request
$request
)
{
return
redirect
()
->
route
(
'timesheet::dashboard.timesheetApproval'
,
[
'phase'
=>
$request
->
phase
,
'month'
=>
$request
->
month
]);
return
redirect
()
->
route
(
'timesheet::dashboard.timesheetApproval'
,
[
'phase'
=>
$request
->
phase
,
'month'
=>
$request
->
month
]);
}
}
public
function
timesheetApproval
(
Request
$request
)
public
function
timesheetApproval
(
Request
$request
)
{
{
// dd($request);
$curryear
=
date
(
'Y'
);
$curryear
=
date
(
'Y'
);
if
(
$request
->
year
)
{
if
(
$request
->
year
)
{
$curryear
=
$request
->
year
;
$curryear
=
$request
->
year
;
...
@@ -880,8 +882,6 @@ class DashboardController extends Controller
...
@@ -880,8 +882,6 @@ class DashboardController extends Controller
$check
=
null
;
$check
=
null
;
}
}
$pm
=
Users
::
find
(
Auth
::
id
());
$pm
=
Users
::
find
(
Auth
::
id
());
return
view
(
'timesheet::dashboard.projectaction'
,
compact
(
'profile'
,
'pm'
,
'page'
,
'staff'
,
'strMonth'
,
'year'
,
'month'
,
'phase'
,
'strdays'
,
'chargeablelist'
,
'chargehour'
,
'daymonth'
,
'totalchargehrs'
));
return
view
(
'timesheet::dashboard.projectaction'
,
compact
(
'profile'
,
'pm'
,
'page'
,
'staff'
,
'strMonth'
,
'year'
,
'month'
,
'phase'
,
'strdays'
,
'chargeablelist'
,
'chargehour'
,
'daymonth'
,
'totalchargehrs'
));
...
@@ -1435,6 +1435,7 @@ class DashboardController extends Controller
...
@@ -1435,6 +1435,7 @@ class DashboardController extends Controller
->
where
(
'tp_project_type'
,
1
)
->
where
(
'tp_project_type'
,
1
)
->
with
(
'project'
)
->
with
(
'project'
)
->
get
();
->
get
();
// dd($chargeableproject);
$chargeablelist
=
[];
$chargeablelist
=
[];
$overheadlist
=
[];
$overheadlist
=
[];
...
@@ -1445,7 +1446,7 @@ class DashboardController extends Controller
...
@@ -1445,7 +1446,7 @@ class DashboardController extends Controller
'pid'
=>
$value
->
td_project
,
'pid'
=>
$value
->
td_project
,
'pcode'
=>
data_get
(
$value
,
'project.p_project_code'
),
'pcode'
=>
data_get
(
$value
,
'project.p_project_code'
),
'pname'
=>
data_get
(
$value
,
'
tp_project_name
'
),
'pname'
=>
data_get
(
$value
,
'
project.p_project_description
'
),
];
];
...
@@ -2728,7 +2729,8 @@ class DashboardController extends Controller
...
@@ -2728,7 +2729,8 @@ class DashboardController extends Controller
return
view
(
'timesheet::dashboard.filterHrStaffsTimesheet'
,
compact
(
'month'
,
'curryear'
,
'currmonth'
,
'departments'
,
'staffs'
,
'years'
));
return
view
(
'timesheet::dashboard.filterHrStaffsTimesheet'
,
compact
(
'month'
,
'curryear'
,
'currmonth'
,
'departments'
,
'staffs'
,
'years'
));
}
}
public
function
hrstaffstimesheet
(
Request
$request
){
public
function
hrstaffstimesheet
(
Request
$request
)
{
// dd($request);
// dd($request);
$user
=
Staff_info
::
where
(
'fk_users'
,
data_get
(
$request
,
'staffId'
))
->
first
();
$user
=
Staff_info
::
where
(
'fk_users'
,
data_get
(
$request
,
'staffId'
))
->
first
();
...
...
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
ad6d9497
...
@@ -119,7 +119,7 @@ class FormController extends Controller
...
@@ -119,7 +119,7 @@ class FormController extends Controller
->
where
(
'pt_project_task_sts'
,
1
)
->
where
(
'pt_project_task_sts'
,
1
)
->
with
(
'toProject'
)
->
with
(
'toProject'
)
->
get
();
->
get
();
// dd($project);
$projectlist
=
[];
$projectlist
=
[];
foreach
(
$project
as
$key
=>
$value
)
{
foreach
(
$project
as
$key
=>
$value
)
{
...
@@ -129,8 +129,8 @@ class FormController extends Controller
...
@@ -129,8 +129,8 @@ class FormController extends Controller
$projectlist
[]
=
[
$projectlist
[]
=
[
'td_project'
=>
$value
->
fk_project_id
,
'td_project'
=>
$value
->
fk_project_id
,
'td_project_code'
=>
$value
->
toProject
->
p_project_code
,
'td_project_code'
=>
data_get
(
$value
,
'toProject.p_project_code'
)
,
'td_project_name'
=>
$value
->
toProject
->
p_project_description
,
'td_project_name'
=>
data_get
(
$value
,
'toProject.p_project_description'
)
,
];
];
}
}
...
@@ -254,6 +254,7 @@ class FormController extends Controller
...
@@ -254,6 +254,7 @@ class FormController extends Controller
foreach
(
$detail
as
$key
=>
$value
)
foreach
(
$detail
as
$key
=>
$value
)
{
{
// dd($detail);
$projectid
=
$key
;
$projectid
=
$key
;
foreach
(
$value
as
$keyday
=>
$day
)
foreach
(
$value
as
$keyday
=>
$day
)
...
@@ -314,7 +315,7 @@ class FormController extends Controller
...
@@ -314,7 +315,7 @@ class FormController extends Controller
$project
=
Project
::
where
(
'id'
,
$projectid
)
$project
=
Project
::
where
(
'id'
,
$projectid
)
->
first
();
->
first
();
$tmdetail
->
td_project_name
=
$project
->
p_project_description
;
$tmdetail
->
td_project_name
=
data_get
(
$project
,
'p_project_description'
)
;
$tmdetail
->
td_hours
=
$valuehour
;
$tmdetail
->
td_hours
=
$valuehour
;
$tmdetail
->
td_timesheet_sts
=
1
;
$tmdetail
->
td_timesheet_sts
=
1
;
$tmdetail
->
updated_by
=
$userId
;
$tmdetail
->
updated_by
=
$userId
;
...
...
packages/portal/timesheet/src/Model/Pteam.php
View file @
ad6d9497
...
@@ -16,9 +16,18 @@ class Pteam extends Model
...
@@ -16,9 +16,18 @@ class Pteam extends Model
use
SoftDeletes
;
use
SoftDeletes
;
protected
$table
=
'project_team'
;
protected
$table
=
'project_team'
;
public
function
toProjectFormList
()
{
return
$this
->
hasOne
(
'Portal\Timesheet\Model\Project'
,
'id'
,
'fk_project_id'
)
->
where
(
'p_project_sts'
,
1
)
->
where
(
'deleted_at'
,
null
);
}
public
function
toProject
()
public
function
toProject
()
{
{
return
$this
->
hasOne
(
'Portal\Timesheet\Model\Project'
,
'id'
,
'fk_project_id'
)
->
where
(
'p_project_sts'
,
1
)
->
withTrashed
();
return
$this
->
hasOne
(
'Portal\Timesheet\Model\Project'
,
'id'
,
'fk_project_id'
)
->
where
(
'p_project_sts'
,
1
)
->
withTrashed
();
}
}
public
function
toRole
()
public
function
toRole
()
...
...
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