Commit 6883c484 by Novan Bagus Setiawan

perbaiki daftar proposal dengan function parameter

parent 9599d4fb
...@@ -72,7 +72,8 @@ class DaftarSeleksiController extends Controller ...@@ -72,7 +72,8 @@ class DaftarSeleksiController extends Controller
// Total records // Total records
$statement = " AND (UPPER(JUDUL) LIKE '%".$searchValue."%') "; $statement = " AND (UPPER(JUDUL) LIKE '%".$searchValue."%') ";
$statementGlobal = " 1=1 AND (NIDN_REVIEWER_ID_1 = '".$noidentitas."' OR NIDN_REVIEWER_ID_2 = '".$noidentitas."')"; // $statementGlobal = " 1=1 AND (NIDN_REVIEWER_ID_1 = '".$noidentitas."' OR NIDN_REVIEWER_ID_2 = '".$noidentitas."')";
$statementGlobal = " 1=1 ";
if($administrasi != "0") if($administrasi != "0")
{ {
...@@ -93,18 +94,23 @@ class DaftarSeleksiController extends Controller ...@@ -93,18 +94,23 @@ class DaftarSeleksiController extends Controller
$statementGlobal .= " AND PERIODE = '".$tahun."'"; $statementGlobal .= " AND PERIODE = '".$tahun."'";
} }
$totalRecords = DaftarProposal::select('count(1) as allcount')->whereRaw($statementGlobal)->count(); // $totalRecords = DaftarProposal::select('count(1) as allcount')->whereRaw($statementGlobal)->count();
$totalRecordswithFilter = DaftarProposal::select('count(1) as allcount') $totalRecords = collect(DB::select("select 1 as allcount from vw_daftar_proposal('".$noidentitas."') where ".$statementGlobal))->count();
->whereRaw($statementGlobal.$statement)->count();
// $totalRecordswithFilter = DaftarProposal::select('count(1) as allcount')->whereRaw($statementGlobal.$statement)->count();
$totalRecordswithFilter = collect(DB::select("select 1 as allcount from vw_daftar_proposal('".$noidentitas."') WHERE ".$statementGlobal.$statement))->count();
// Fetch records // Fetch records
$records = DaftarProposal::orderBy($columnName,$columnSortOrder) // $records = DaftarProposal::orderBy($columnName,$columnSortOrder)
->whereRaw($statementGlobal.$statement) // ->whereRaw($statementGlobal.$statement)
->select('daftar_proposal.*') // ->select('daftar_proposal.*')
->skip($start) // ->skip($start)
->take($rowperpage) // ->take($rowperpage)
->get(); // ->get();
$records = collect(DB::select("select * from vw_daftar_proposal('".$noidentitas."') WHERE ".$statementGlobal.$statement." ORDER BY ".$columnName." ".$columnSortOrder))
->skip($start)
->take($rowperpage);
$data_arr = array(); $data_arr = array();
$hitung = 1; $hitung = 1;
......
...@@ -180,8 +180,6 @@ ...@@ -180,8 +180,6 @@
}) })
.done(function(response){ .done(function(response){
swal.fire('Updated!', response.message, response.status).then(function(){ swal.fire('Updated!', response.message, response.status).then(function(){
// $("#row_"+rowId+" td:nth-last-child(2)").find('.upload').remove();
// $("#tr-" + reqUrut +" td:nth-child(3)").empty();
if(reqStatus == '1') if(reqStatus == '1')
{ {
$("#row_"+rowId+" td:nth-last-child(2)").empty() $("#row_"+rowId+" td:nth-last-child(2)").empty()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment