update
This commit is contained in:
No files matched your search
@@ -861,15 +861,13 @@ class ReportController extends Controller
|
|||||||
$query->whereMonth('daftar', $bulan);
|
$query->whereMonth('daftar', $bulan);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1. Ambil Data Pasien (Limit 50 per halaman agar RAM aman)
|
// Glass report perlu menampilkan seluruh hasil filter agar jumlah baris konsisten.
|
||||||
$orderbydate = $query->paginate(50);
|
$orderbydate = $query->orderBy('daftar', 'ASC')->orderBy('id', 'ASC')->get();
|
||||||
$orderbydate->appends(['bulan' => $bulan, 'tahun' => $tahun]);
|
|
||||||
|
|
||||||
// 2. Ambil Data Antibiotik HANYA untuk 50 pasien tersebut
|
$pageIds = $orderbydate->pluck('id')->toArray();
|
||||||
$pageIds = $orderbydate->pluck('id')->toArray();
|
$antibiotikLookup = $this->mapAntibiotikData($pageIds);
|
||||||
$antibiotikLookup = $this->mapAntibiotikData($pageIds);
|
$glassLookups = $this->getGlassReportLookups($orderbydate);
|
||||||
$glassLookups = $this->getGlassReportLookups($orderbydate->getCollection());
|
$glassTables = $this->splitGlassReportRows($orderbydate, $glassLookups);
|
||||||
$glassTables = $this->splitGlassReportRows($orderbydate->getCollection(), $glassLookups);
|
|
||||||
$glassHeaders = $this->getGlassReportHeaders();
|
$glassHeaders = $this->getGlassReportHeaders();
|
||||||
|
|
||||||
return view('admin.glassreport', [
|
return view('admin.glassreport', [
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
<table class="table table-bordered table-sm" id="tabel{{ $tableKey }}">
|
<table class="table table-bordered table-sm" id="tabel{{ $tableKey }}">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@foreach (($glassHeaders[$tableKey] ?? []) as $header)
|
@foreach (($glassHeaders[$tableKey] ?? []) as $header)
|
||||||
<th>{{ $header }}</th>`
|
<th>{{ $header }}</th>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
Reference in New Issue
Block a user