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
a1399ef8
Commit
a1399ef8
authored
Jun 22, 2022
by
fezrul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing ajax
parent
b263f010
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
2 deletions
+58
-2
packages/portal/timesheet/resources/views/ajax/senaraistaff.blade.php
+14
-0
packages/portal/timesheet/resources/views/dashboard/penambahanProjectTeam.blade.php
+23
-2
packages/portal/timesheet/routes/web.php
+4
-0
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+17
-0
No files found.
packages/portal/timesheet/resources/views/ajax/senaraistaff.blade.php
0 → 100644
View file @
a1399ef8
<label>
Staff Name
</label>
<div
class=
"ui fluid multiple search selection"
>
<input
type=
"hidden"
name=
"staffId"
>
<i
class=
"dropdown icon"
></i>
<div
class=
"default text"
>
Staff Name
</div>
<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
packages/portal/timesheet/resources/views/dashboard/penambahanProjectTeam.blade.php
View file @
a1399ef8
...
...
@@ -19,7 +19,7 @@
@endforeach
</select>
</div>
<div class="
field
">
<div class="
field
"
id="
divstaff
" nama="
divstaff
"
>
<label>Staff Name</label>
<div class="
ui
fluid
multiple
search
selection
dropdown
">
<input type="
hidden
" name="
staffId
">
...
...
@@ -52,13 +52,34 @@
@push('script')
<script>
function myDepartment() {
alert('{{
$project->p_project_description
}}');
}
</script>
<script>
function selectDepartment(i) {
alert(i);
// alert(i);
$.ajax({
url: "
{{
URL
::
to
(
'ajax/stafflist'
)}}
"+"
/
"+i,
type: "
get
",
beforeSend: function ()
{
// $("
#exampleModalCenter").modal('show');
},
success
:
function
(
html
)
{
// document.getElementById('nhtml2').style.display = 'none';
// $("#exampleModalCenter").modal('hide');
$
(
'#divstaff'
)
.
html
(
html
);
// window.location.replace("{{ URL::to('ad/index')}}");
}
});
}
</
script
>
...
...
packages/portal/timesheet/routes/web.php
View file @
a1399ef8
...
...
@@ -49,6 +49,10 @@ Route::group(
Route
::
get
(
'pengurusan'
,[
'uses'
=>
'DashboardController@pengurusan'
,
'as'
=>
'dashboard.pengurusan'
]);
Route
::
get
(
'perkhidmatan'
,[
'uses'
=>
'DashboardController@perkhidmatan'
,
'as'
=>
'dashboard.perkhidmatan'
]);
//php_sqlsrv_80_ts_x86.dll
Route
::
get
(
'ajax/stafflist/{dept}'
,[
'uses'
=>
'DashboardController@loadstaff'
,
'as'
=>
'dashboard.loadstaff'
]);
}
);
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
a1399ef8
...
...
@@ -84,6 +84,9 @@ class DashboardController extends Controller
// nanti project code query dari table project:
if
(
count
(
$project
)
>
0
)
{
foreach
(
$project
as
$key
=>
$value
)
{
$projectlist
[]
=
[
...
...
@@ -96,6 +99,13 @@ class DashboardController extends Controller
];
}
}
else
{
$projectlist
=
null
;
}
// dd($projectlist);
return
view
(
'timesheet::dashboard.senaraiProject'
,
compact
(
'projectlist'
));
}
...
...
@@ -856,6 +866,13 @@ class DashboardController extends Controller
{
return
view
(
'timesheet::dashboard.timesheetViewer'
);
}
public
function
loadstaff
(
$dept
)
{
$staffs
=
Staff_info
::
where
(
'fk_lkp_department'
,
$dept
)
->
get
();
return
view
(
'timesheet::ajax.senaraistaff'
,
compact
(
'staffs'
));
}
}
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