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
b39c2e4e
Commit
b39c2e4e
authored
Sep 21, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Screen add project- field project manager : tak boleh pilih nama .. auto select PM yg login
parent
2a61a9e9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
11 deletions
+26
-11
packages/portal/timesheet/resources/views/maintenance/penambahanProject.blade.php
+4
-2
packages/portal/timesheet/resources/views/maintenance/senaraiProject.blade.php
+4
-0
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+1
-0
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
+13
-5
packages/portal/timesheet/src/ServiceProvider.php
+4
-4
No files found.
packages/portal/timesheet/resources/views/maintenance/penambahanProject.blade.php
View file @
b39c2e4e
...
...
@@ -30,12 +30,14 @@
<div class="
eight
wide
field
">
<label>Project Manager</label>
<select name="
projectmanager
" class="
ui
fluid
dropdown
">
<input type="
hidden
" name="
projectmanager
" value="
{{
data_get
(
$pm
,
'staff_id'
)}}
">
<input type="
text
" value="
{{
data_get
(
$pm
,
'fullname'
)}}
" readonly="
readonly
">
<!-- <select name="
projectmanager
" class="
ui
fluid
dropdown
">
<option value="">Project Manager</option>
@foreach(
$pm
as
$key
=>
$value
)
<option value="
{{
data_get
(
$value
,
'staff_id'
)}}
">
{
{data_get($value,'fullname')}
}
</option>
@endforeach
</select>
</select>
-->
</div>
</div>
...
...
packages/portal/timesheet/resources/views/maintenance/senaraiProject.blade.php
View file @
b39c2e4e
...
...
@@ -4,7 +4,11 @@
<
div
class
="
ui
segment
">
<a class="
ui
blue
left
ribbon
label
">List of Project</a>
@if(
$roleid
== 8 ||
$roleid
== 9)
<a href="
{{
route
(
'timesheet::maintenance.penambahanProject'
)}}
" class="
ui
right
floated
small
primary
labeled
icon
button
"><i class="
plus
icon
"></i>Add New Project</a>
@endif
<br>
<table class="
ui
celled
structured
table
unstackable
">
<thead>
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
b39c2e4e
...
...
@@ -44,6 +44,7 @@ class DashboardController extends Controller
$now
=
Carbon
::
now
();
$roleid
=
auth
()
->
user
()
->
roles
[
'0'
]
->
id
;
// dd($roleid);
// dd($roleid);
...
...
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
View file @
b39c2e4e
...
...
@@ -58,15 +58,21 @@ class MaintenanceController extends Controller
$projectlist
=
[];
}
return
view
(
'timesheet::maintenance.senaraiProject'
,
compact
(
'projectlist'
));
$roleid
=
auth
()
->
user
()
->
roles
[
'0'
]
->
id
;
// dd($roleid);
return
view
(
'timesheet::maintenance.senaraiProject'
,
compact
(
'projectlist'
,
'roleid'
));
}
public
function
penambahanProject
()
{
$pms
=
4
;
$pm
=
Staff_info
::
where
(
'flag_pm'
,
1
)
->
where
(
'status'
,
1
)
->
get
();
$pm
=
Staff_info
::
where
(
'id'
,
Auth
::
id
())
->
first
();
// dd($pm);
// $pms = 4;
// $pm = Staff_info::where('flag_pm', 1)
// ->where('status', 1)
// ->get();
$pd
=
Staff_info
::
whereIn
(
'id'
,
[
45
,
46
,
47
])
->
get
();
...
...
@@ -76,6 +82,8 @@ class MaintenanceController extends Controller
public
function
addnewproject
(
Request
$request
)
{
// dd($request);
$chargeable
=
1
;
$userId
=
users
::
find
(
Auth
::
id
())
...
...
packages/portal/timesheet/src/ServiceProvider.php
View file @
b39c2e4e
...
...
@@ -132,10 +132,10 @@ class ServiceProvider extends BaseServiceProvider
->
data
(
'icon'
,
'users icon'
)
->
active
(
'pengurusan/*'
)
->
data
(
'permission'
,
Permission
::
pengurusan
);
$pengurusanProject
->
add
(
__
(
'Add New Project'
),
route
(
'timesheet::maintenance.penambahanProject'
))
->
data
(
'icon'
,
'users icon'
)
->
active
(
'pengurusan/*'
)
->
data
(
'permission'
,
Permission
::
pengurusan
);
//
$pengurusanProject->add(__('Add New Project'), route('timesheet::maintenance.penambahanProject'))
//
->data('icon', 'users icon')
//
->active('pengurusan/*')
//
->data('permission', Permission::pengurusan);
$pengurusanProject
->
add
(
__
(
'List of Overhead'
),
route
(
'timesheet::maintenance.senaraiOverhead'
))
->
data
(
'icon'
,
'users icon'
)
->
active
(
'pengurusan/*'
)
...
...
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