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
9a1fc224
Commit
9a1fc224
authored
Oct 04, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jika role PM, nampak senarai dia punya sahaja
Jika role PM/ HOD nampak semua senarai projek
parent
9f896c9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
+24
-5
No files found.
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
View file @
9a1fc224
...
...
@@ -30,11 +30,31 @@ class MaintenanceController extends Controller
{
public
function
senaraiProject
()
{
$user
=
Staff_info
::
where
(
'id'
,
Auth
::
id
())
->
first
();
// dd($user->staff_id);
$roleid
=
auth
()
->
user
()
->
roles
[
'0'
]
->
id
;
// dd($roleid);
$chargeable
=
1
;
$project
=
Project
::
where
(
'p_project_type'
,
$chargeable
)
->
with
(
'projectDirector'
)
->
with
(
'projectManager'
)
->
get
();
if
(
$roleid
==
'9'
||
$roleid
==
'2'
)
{
$project
=
Project
::
where
(
'p_project_type'
,
$chargeable
)
->
with
(
'projectDirector'
)
->
with
(
'projectManager'
)
->
get
();
}
if
(
$roleid
==
'8'
)
{
$project
=
Project
::
where
(
'p_project_type'
,
$chargeable
)
->
where
(
'p_project_task_team'
,
$user
->
staff_id
)
->
with
(
'projectDirector'
)
->
with
(
'projectManager'
)
->
get
();
}
// dd($project);
$projectlist
=
[];
// nanti project code query dari table project:
...
...
@@ -58,7 +78,6 @@ class MaintenanceController extends Controller
$projectlist
=
[];
}
$roleid
=
auth
()
->
user
()
->
roles
[
'0'
]
->
id
;
// dd($roleid);
return
view
(
'timesheet::maintenance.senaraiProject'
,
compact
(
'projectlist'
,
'roleid'
));
...
...
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