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
3f04fe32
Commit
3f04fe32
authored
Jun 22, 2022
by
hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in penambahan project team multiple select
parent
7c9a3909
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
51 additions
and
34 deletions
+51
-34
packages/portal/timesheet/resources/views/ajax/senaraistaff.blade.php
+10
-13
packages/portal/timesheet/resources/views/dashboard/editPeranan.blade.php
+1
-1
packages/portal/timesheet/resources/views/dashboard/editProjectTeam.blade.php
+1
-1
packages/portal/timesheet/resources/views/dashboard/penambahanOverhead.blade.php
+1
-1
packages/portal/timesheet/resources/views/dashboard/penambahanPeranan.blade.php
+1
-1
packages/portal/timesheet/resources/views/dashboard/penambahanProject.blade.php
+1
-1
packages/portal/timesheet/resources/views/dashboard/penambahanProjectTeam.blade.php
+17
-5
packages/portal/timesheet/resources/views/dashboard/senaraiProjectTeam.blade.php
+1
-1
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+12
-10
packages/portal/timesheet/src/Model/Pteam.php
+6
-0
No files found.
packages/portal/timesheet/resources/views/ajax/senaraistaff.blade.php
View file @
3f04fe32
<label>
Staff Name
</label>
<div
class=
"ui fluid multiple search selection"
>
<input
type=
"hidden"
name=
"staffId"
>
<i
class=
"dropdown icon"
></i>
<div
class=
"menu"
id=
"selectBox"
>
@foreach($staffs as $key => $staff)
<div
class=
"item"
data-value=
"{{$staff->id}}"
data-text=
"{{$staff->fullname}}"
>
{{$staff->fullname}}
</div>
@endforeach
</div>
</div>
\ No newline at end of file
@
foreach
(
$staffs
as
$key
=>
$staff
)
<
div
class
="
item
" data-value="
{{
$staff
->
id
}}
" data-text="
{{
$staff
->
fullname
}}
">
{
{$staff->fullname}
}
</div>
@endforeach
<!-- @foreach(
$staffs
as
$key
=>
$role
)
<option value="
{{
$staff
->
id
}}
">
{
{$staff->fullname}
}
</option>
@endoreach -->
\ No newline at end of file
packages/portal/timesheet/resources/views/dashboard/editPeranan.blade.php
View file @
3f04fe32
...
...
@@ -16,7 +16,7 @@
<select name="
status
" class="
ui
fluid
dropdown
">
<option value="">
{
{$status}
}
</option>
<option value="
1
">Active</option>
<option value="
2
">Inactive</option>
<option value="
0
">Inactive</option>
</select>
</div>
<button class="
ui
button
" type="
submit
">Update</button>
...
...
packages/portal/timesheet/resources/views/dashboard/editProjectTeam.blade.php
View file @
3f04fe32
...
...
@@ -28,7 +28,7 @@
<select name="
status
" class="
ui
fluid
dropdown
">
<option value="">Project Status</option>
<option value="
1
">Active</option>
<option value="
2
">Inactive</option>
<option value="
0
">Inactive</option>
</select>
</div>
<button class="
ui
blue
button
" type="
submit
">Update</button>
...
...
packages/portal/timesheet/resources/views/dashboard/penambahanOverhead.blade.php
View file @
3f04fe32
...
...
@@ -15,7 +15,7 @@
<select name="
status
" class="
ui
fluid
dropdown
">
<option value="">Overhead Status</option>
<option value="
1
">Active</option>
<option value="
2
">Inactive</option>
<option value="
0
">Inactive</option>
</select>
</div>
<button class="
ui
button
" type="
submit
">Submit</button>
...
...
packages/portal/timesheet/resources/views/dashboard/penambahanPeranan.blade.php
View file @
3f04fe32
...
...
@@ -15,7 +15,7 @@
<select name="
status
" class="
ui
fluid
dropdown
">
<option value="">Role Status</option>
<option value="
1
">Active</option>
<option value="
2
">Inactive</option>
<option value="
0
">Inactive</option>
</select>
</div>
<button class="
ui
button
" type="
submit
">Submit</button>
...
...
packages/portal/timesheet/resources/views/dashboard/penambahanProject.blade.php
View file @
3f04fe32
...
...
@@ -27,7 +27,7 @@
<select name="
status
" class="
ui
fluid
dropdown
">
<option value="">Project Status</option>
<option value="
1
">Active</option>
<option value="
2
">Inactive</option>
<option value="
0
">Inactive</option>
</select>
</div>
<button class="
ui
button
" type="
submit
">Submit</button>
...
...
packages/portal/timesheet/resources/views/dashboard/penambahanProjectTeam.blade.php
View file @
3f04fe32
...
...
@@ -6,6 +6,9 @@
<br><br>
<form class="
ui
form
" action="
{{
route
(
'timesheet::dashboard.addprojectteam'
)}}
" method="
POST
">
{
{csrf_field()}
}
<input type="
hidden
" name="
pid
" value="
{{
$pid
}}
">
<input type="
hidden
" name="
pcode
" value="
{{
$project
->
p_project_code
}}
">
<input type="
hidden
" name="
pname
" value="
{{
$project
->
p_project_description
}}
">
<div class="
field
">
<label>Project Code</label>
<input onselect="
myDepartment
()
" type="
text
" name="
projectcode
" placeholder="
Project
Code
" value="
{{
$project
->
p_project_code
}}
|
{{
$project
->
p_project_description
}}
" readonly="
readonly
">
...
...
@@ -18,14 +21,14 @@
<option value="
{{
$department
->
id
}}
">
{
{$department->code}
}
|
{
{$department->description}
}
</option>
@endforeach
</select>
</div>
<div class="
field
"
id="
divstaff
" nama="
divstaff
"
>
</div>
<div class="
field
">
<label>Staff Name</label>
<div class="
ui
fluid
multiple
search
selection
dropdown
">
<input type="
hidden
" name="
staffId
">
<i class="
dropdown
icon
"></i>
<div class="
default
text
">Staff Name</div>
<div class="
menu
" id="
selectBox
">
<div class="
menu
" id="
divstaff
" name="
divstaff
">
@foreach(
$staffs
as
$key
=>
$staff
)
<div class="
item
" data-value="
{{
$staff
->
id
}}
" data-text="
{{
$staff
->
fullname
}}
">
{
{$staff->fullname}
}
...
...
@@ -35,11 +38,20 @@
</div>
</div>
<div class="
field
">
<label>Role</label>
<select name="
role
" class="
ui
fluid
dropdown
">
<option value="">Role</option>
@foreach(
$roles
as
$key
=>
$role
)
<option value="
{{
$role
->
id
}}
">
{
{$role->role}
}
</option>
@endforeach
</select>
</div>
<div class="
field
">
<label>Project Status</label>
<select name="
status
" class="
ui
fluid
dropdown
">
<option value="">Project Status</option>
<option value="">Project
Team
Status</option>
<option value="
1
">Active</option>
<option value="
2
">Inactive</option>
<option value="
0
">Inactive</option>
</select>
</div>
<button class="
ui
blue
button
" type="
submit
">Save</button>
...
...
packages/portal/timesheet/resources/views/dashboard/senaraiProjectTeam.blade.php
View file @
3f04fe32
...
...
@@ -26,7 +26,7 @@
<td>
{
{$project['projectcode']}
}
</td>
<td>
{
{$project['projectname']}
}
</td>
<td>
{
{$project['projectteam']}
}
</td>
<td>
{
{
$project['role']
}
}
</td>
<td>{{
data_get(
$project
, 'role')
}}</td>
<td>
{
{$project['status']}
}
</td>
<td><a href="
{{
route
(
'timesheet::dashboard.editprojectteam'
,
[
'id'
=>
$project
[
'id'
]])}}
">Edit</a></td>
</tr>
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
3f04fe32
...
...
@@ -143,14 +143,14 @@ class DashboardController extends Controller
// nanti project code query dari table project:
foreach
(
$project
as
$key
=>
$value
)
{
// dd($value->toRole->role);
$projectlist
[]
=
[
'id'
=>
$value
->
id
,
'projectcode'
=>
$value
->
toProject
->
p_project_code
,
'projectname'
=>
$value
->
pt_project_description
,
'projectteam'
=>
$value
->
pt_team
,
'role'
=>
'Developer'
,
'role'
=>
$value
->
toRole
->
role
,
'status'
=>
$value
->
pt_project_task_sts
,
'pid'
=>
$value
->
fk_project_id
,
];
...
...
@@ -175,7 +175,11 @@ class DashboardController extends Controller
// dd($value->id);
}
return
view
(
'timesheet::dashboard.penambahanProjectTeam'
,
compact
(
'project'
,
'departments'
,
'staffs'
,
'pid'
));
$roles
=
Role
::
where
(
'status'
,
1
)
->
get
();
// dd($roles->role);
return
view
(
'timesheet::dashboard.penambahanProjectTeam'
,
compact
(
'project'
,
'departments'
,
'staffs'
,
'pid'
,
'roles'
));
}
public
function
addprojectteam
(
Request
$request
)
...
...
@@ -183,9 +187,6 @@ class DashboardController extends Controller
$userId
=
users
::
find
(
Auth
::
id
())
->
u_staffID
;
$project
=
Project
::
where
(
'p_project_code'
,
'='
,
$request
->
projectcode
)
->
first
();
$expstaff
=
explode
(
','
,
$request
->
staffId
);
foreach
(
$expstaff
as
$key
=>
$value
)
...
...
@@ -193,12 +194,15 @@ class DashboardController extends Controller
$staff
=
Staff_info
::
where
(
'staff_id'
,
$value
)
->
first
();
dd
(
$request
);
$pt
=
new
Pteam
;
$pt
->
fk_project_id
=
$
project
->
id
;
$pt
->
pt_project_description
=
$
project
->
p_project_description
;
$pt
->
fk_project_id
=
$
request
->
p
id
;
$pt
->
pt_project_description
=
$
request
->
pname
;
$pt
->
pt_team
=
$staff
->
fullname
;
$pt
->
pt_staff_id
=
$value
;
$pt
->
pt_project_task_sts
=
$request
->
status
;
$pt
->
role_id
=
$request
->
role
;
$pt
->
updated_by
=
$userId
;
$pt
->
save
();
...
...
@@ -276,8 +280,6 @@ class DashboardController extends Controller
public
function
addrole
(
Request
$request
)
{
find
(
$id
)
->
column_name
;
$userId
=
users
::
find
(
Auth
::
id
())
->
u_staffID
;
...
...
packages/portal/timesheet/src/Model/Pteam.php
View file @
3f04fe32
...
...
@@ -17,6 +17,12 @@ class Pteam extends Model
return
$this
->
hasOne
(
'Portal\Timesheet\Model\Project'
,
'id'
,
'fk_project_id'
);
}
public
function
toRole
()
{
// dd('1');
return
$this
->
hasOne
(
'Portal\Timesheet\Model\Role'
,
'id'
,
'role_id'
);
}
/**
* undocumented function
*
...
...
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