Commit 6883c484 by Novan Bagus Setiawan

perbaiki daftar proposal dengan function parameter

parent 9599d4fb
......@@ -72,7 +72,8 @@ class DaftarSeleksiController extends Controller
// Total records
$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")
{
......@@ -93,18 +94,23 @@ class DaftarSeleksiController extends Controller
$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')
->whereRaw($statementGlobal.$statement)->count();
$totalRecords = collect(DB::select("select 1 as allcount from vw_daftar_proposal('".$noidentitas."') where ".$statementGlobal))->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
$records = DaftarProposal::orderBy($columnName,$columnSortOrder)
->whereRaw($statementGlobal.$statement)
->select('daftar_proposal.*')
// $records = DaftarProposal::orderBy($columnName,$columnSortOrder)
// ->whereRaw($statementGlobal.$statement)
// ->select('daftar_proposal.*')
// ->skip($start)
// ->take($rowperpage)
// ->get();
$records = collect(DB::select("select * from vw_daftar_proposal('".$noidentitas."') WHERE ".$statementGlobal.$statement." ORDER BY ".$columnName." ".$columnSortOrder))
->skip($start)
->take($rowperpage)
->get();
->take($rowperpage);
$data_arr = array();
$hitung = 1;
......
......@@ -180,8 +180,6 @@
})
.done(function(response){
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')
{
$("#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