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