Commit 5f3d8a31 by Novan Bagus Setiawan

update kelompok filter with tahun

parent 7b6e6291
......@@ -31,6 +31,9 @@ class KelompokController extends Controller
$status = $request->get('status');
$tahun= $request->get('tahun');
if($tahun == '0')
$tahun = date('Y');
## Read value
$draw = $request->get('draw');
$start = $request->get("start");
......@@ -58,7 +61,7 @@ class KelompokController extends Controller
if($tahun != "0")
{
$statementGlobal .= " AND TO_CHAR(CREATED_AT, 'YYYY') = '".$tahun."'";
$statementGlobal .= " AND TO_CHAR(KELOMPOK.CREATED_AT, 'YYYY') = '".$tahun."'";
}
$totalRecords = Kelompok::select('count(1) as allcount')->whereRaw($statementGlobal)->count();
......
......@@ -51,7 +51,7 @@
<select class="form-select" name="reqTahun" id="reqTahun">
<option value="0">Semua</option>
@foreach ($periode as $res)
<option value="{{ $res->nama }}">{{ $res->nama }}</option>
<option value="{{ $res->nama }}" @php if($res->nama == date('Y')) echo 'selected'; @endphp>{{ $res->nama }}</option>
@endforeach
</select>
</div>
......
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