This commit is contained in:
Dwi Swandhana
2026-04-20 15:37:11 +07:00
parent e3086919b7
commit 7ca1e3a96e
2 changed files with 44 additions and 37 deletions
@@ -69,9 +69,12 @@
<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', '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 }}" style="margin-bottom: 10px;">
<i class="fa fa-print"></i> Export
</button>
<table class="table table-bordered table-sm" id="tabel{{ $tableKey }}">
<thead>
<tr>
@@ -171,15 +174,6 @@
console.error('Tabel dengan ID "tabelA" tidak ditemukan.');
}
});
document.getElementById('btnexporttabelB').addEventListener('click', function() {
var table = document.getElementById('tabelB');
if (table) {
var wb = XLSX.utils.table_to_book(table, { sheet: "Jamur" });
XLSX.writeFile(wb, "TABEL_B_{{$bulan}}_Tahun{{$tahun}}.xlsx");
} else {
console.error('Tabel dengan ID "tabelB" tidak ditemukan.');
}
});
document.getElementById('btnexporttabelC').addEventListener('click', function() {
var table = document.getElementById('tabelC');
if (table) {