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