Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
simpkm
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Farendi Giotivano R.P
simpkm
Commits
171f1655
Commit
171f1655
authored
Feb 16, 2024
by
Novan Bagus Setiawan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update searching ketua
parent
18e86753
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
app/Http/Controllers/Operator/KelompokController.php
+6
-3
No files found.
app/Http/Controllers/Operator/KelompokController.php
View file @
171f1655
...
@@ -47,7 +47,7 @@ class KelompokController extends Controller
...
@@ -47,7 +47,7 @@ class KelompokController extends Controller
$searchValue
=
strtoupper
(
$search_arr
[
'value'
]);
// Search value
$searchValue
=
strtoupper
(
$search_arr
[
'value'
]);
// Search value
// Total records
// Total records
$statementGlobal
=
" STATUS_HAPUS = '0' "
;
$statementGlobal
=
"
KELOMPOK.
STATUS_HAPUS = '0' "
;
if
(
$status
!=
"0"
)
if
(
$status
!=
"0"
)
{
{
...
@@ -62,20 +62,23 @@ class KelompokController extends Controller
...
@@ -62,20 +62,23 @@ class KelompokController extends Controller
}
}
$totalRecords
=
Kelompok
::
select
(
'count(1) as allcount'
)
->
whereRaw
(
$statementGlobal
)
->
count
();
$totalRecords
=
Kelompok
::
select
(
'count(1) as allcount'
)
->
whereRaw
(
$statementGlobal
)
->
count
();
$statement
=
" AND
(UPPER(NAMA_DOSEN) LIKE '%"
.
$searchValue
.
"%'
) "
;
$statement
=
" AND
B.STATUS_KETUA = '1' AND (UPPER(NAMA_DOSEN) LIKE '%"
.
$searchValue
.
"%' OR (UPPER(NAMA) LIKE '%"
.
$searchValue
.
"%')
) "
;
$totalRecordswithFilter
=
Kelompok
::
select
(
'count(1) as allcount'
)
$totalRecordswithFilter
=
Kelompok
::
select
(
'count(1) as allcount'
)
->
join
(
'kelompok_detil as b'
,
'kelompok.kelompok_id'
,
'='
,
'b.kelompok_id'
)
->
whereRaw
(
$statementGlobal
.
$statement
)
->
count
();
->
whereRaw
(
$statementGlobal
.
$statement
)
->
count
();
// Fetch records
// Fetch records
$records
=
Kelompok
::
orderBy
(
$columnName
,
$columnSortOrder
)
$records
=
Kelompok
::
orderBy
(
$columnName
,
$columnSortOrder
)
->
join
(
'kelompok_detil as b'
,
'kelompok.kelompok_id'
,
'='
,
'b.kelompok_id'
)
->
whereRaw
(
$statementGlobal
.
$statement
)
->
whereRaw
(
$statementGlobal
.
$statement
)
->
selectRaw
(
'
*
, ambil_ketua_kelompok(kelompok.kelompok_id) ketua'
)
->
selectRaw
(
'
kelompok.kelompok_id, kode, nama_dosen, nidn_dosen, status
, ambil_ketua_kelompok(kelompok.kelompok_id) ketua'
)
->
skip
(
$start
)
->
skip
(
$start
)
->
take
(
$rowperpage
)
->
take
(
$rowperpage
)
->
get
();
->
get
();
$data_arr
=
array
();
$data_arr
=
array
();
foreach
(
$records
as
$record
){
foreach
(
$records
as
$record
){
$kelompok_id
=
$record
->
kelompok_id
;
$kelompok_id
=
$record
->
kelompok_id
;
$kode
=
$record
->
kode
;
$kode
=
$record
->
kode
;
...
...
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