update
This commit is contained in:
@@ -861,13 +861,15 @@ class ReportController extends Controller
|
||||
$query->whereMonth('daftar', $bulan);
|
||||
}
|
||||
|
||||
// Glass report perlu menampilkan seluruh hasil filter agar jumlah baris konsisten.
|
||||
$orderbydate = $query->orderBy('daftar', 'ASC')->orderBy('id', 'ASC')->get();
|
||||
// Preview dibuat paginated agar aman saat filter setahun.
|
||||
$orderbydate = $query->orderBy('daftar', 'ASC')->orderBy('id', 'ASC')->paginate(50);
|
||||
$orderbydate->appends(['bulan' => $bulan, 'tahun' => $tahun]);
|
||||
|
||||
$pageIds = $orderbydate->pluck('id')->toArray();
|
||||
$antibiotikLookup = $this->mapAntibiotikData($pageIds);
|
||||
$glassLookups = $this->getGlassReportLookups($orderbydate);
|
||||
$glassTables = $this->splitGlassReportRows($orderbydate, $glassLookups);
|
||||
$glassRows = $orderbydate->getCollection();
|
||||
$glassLookups = $this->getGlassReportLookups($glassRows);
|
||||
$glassTables = $this->splitGlassReportRows($glassRows, $glassLookups);
|
||||
$glassHeaders = $this->getGlassReportHeaders();
|
||||
|
||||
return view('admin.glassreport', [
|
||||
|
||||
@@ -13,10 +13,12 @@
|
||||
<i class="fa fa-file-excel-o"></i> Download Full Excel (CSV)
|
||||
</a>
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
Preview Glass Report ditampilkan per halaman 50 pemeriksaan agar aman di memori. Untuk data lengkap gunakan tombol download CSV.
|
||||
</div>
|
||||
@foreach (['A', 'B', 'C'] as $tableKey)
|
||||
<div class="table-responsive" style="margin-bottom: 24px;">
|
||||
<h4>TABEL {{ $tableKey }}</h4>
|
||||
<button type="button" class="btn btn-primary" id="btnexporttabel{{ $tableKey }}"><i class="fa fa-print"></i> Export</button>
|
||||
<table class="table table-bordered table-sm" id="tabel{{ $tableKey }}">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -41,6 +43,11 @@
|
||||
</table>
|
||||
</div>
|
||||
@endforeach
|
||||
@if(method_exists($orderbydate, 'links'))
|
||||
<div class="mt-3">
|
||||
{{ $orderbydate->links() }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user