This commit is contained in:
Dwi Swandhana
2026-07-04 09:36:08 +07:00
parent 146bab0a46
commit 510e8a2352
4 changed files with 220 additions and 0 deletions

No files matched your search

@@ -72,6 +72,9 @@
<div class="form-group col-md-3">
<button type="button" class="btn btn-primary btn-block" id="btnrekapzn">Rekap Ziehl Nielsen</button>
</div>
<div class="form-group col-md-3">
<button type="button" class="btn btn-secondary btn-block" id="btnmikroskopisbtasp">Mikroskopis BTA SP</button>
</div>
<div class="form-group col-md-3">
<a href="{{url('/biorepository')}}" class="btn btn-danger btn-block">Biorepository Bakteri</a>
</div>
@@ -654,6 +657,20 @@ $(document).ready(function () {
var url = '{{url('/')}}/znreport?bulan='+bulan+'?tahun='+tahun;
window.location.href = url;
}
});
$('#btnmikroskopisbtasp').click(function () {
var bulan = document.getElementById('bulan').value;
var tahun = document.getElementById('tahun').value;
if (bulan == '' || tahun == ''){
swal({
title : 'Mohon diLengkapi',
text : 'Data Dasar Bulan dan Tahun Wajib di Isi',
type : 'error',
});
} else {
var url = '{{url('/')}}/mikroskopisbtasp?bulan='+bulan+'&tahun='+tahun;
window.location.href = url;
}
});
$('#btnrekaptat').click(function () {
var bulan = document.getElementById('bulan').value;
@@ -0,0 +1,97 @@
@extends('base.layout')
@section('content')
<style>
table {
margin-bottom: 30px;
}
</style>
<div class="wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-sm-6">
<div class="card-box ribbon-box">
<div class="ribbon ribbon-primary">Mikroskopis BTA SP Laki-Laki Bulan {{$bulan}} Tahun {{$tahun}}</div>
<p></p>
<div class="table-responsive">
<button type="button" class="btn btn-primary" id="btnexport"><i class="fa fa-print"></i> Export</button>
<table cellpadding="0" cellspacing="0" id="btasptable" class="table table-striped table-bordered">
<thead>
<tr>
<th>Nilai</th>
<th>Pagi</th>
<th>Sewaktu</th>
</tr>
</thead>
<tbody>
@foreach($nilaiList as $nilai)
<tr>
<td>{{ $nilai }}</td>
<td>{{ $rekapLaki[$nilai]['pagi'] ?? 0 }}</td>
<td>{{ $rekapLaki[$nilai]['sewaktu'] ?? 0 }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="card-footer">
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card-box ribbon-box">
<div class="ribbon ribbon-danger">Mikroskopis BTA SP Perempuan Bulan {{$bulan}} Tahun {{$tahun}}</div>
<p></p>
<div class="table-responsive">
<button type="button" class="btn btn-primary" id="btnexportperempuan"><i class="fa fa-print"></i> Export</button>
<table cellpadding="0" cellspacing="0" id="btasptableperempuan" class="table table-striped table-bordered">
<thead>
<tr>
<th>Nilai</th>
<th>Pagi</th>
<th>Sewaktu</th>
</tr>
</thead>
<tbody>
@foreach($nilaiList as $nilai)
<tr>
<td>{{ $nilai }}</td>
<td>{{ $rekapPerempuan[$nilai]['pagi'] ?? 0 }}</td>
<td>{{ $rekapPerempuan[$nilai]['sewaktu'] ?? 0 }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="card-footer">
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@push('script')
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.17.0/xlsx.full.min.js"></script>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('btnexport').addEventListener('click', function() {
var table = document.getElementById('btasptable');
if (table) {
var wb = XLSX.utils.table_to_book(table, { sheet: "Report" });
XLSX.writeFile(wb, "mikroskopisbtasplakilaki_{{$bulan}}_Tahun{{$tahun}}.xlsx");
} else {
console.error('Tabel dengan ID "btasptable" tidak ditemukan.');
}
});
document.getElementById('btnexportperempuan').addEventListener('click', function() {
var table = document.getElementById('btasptableperempuan');
if (table) {
var wb = XLSX.utils.table_to_book(table, { sheet: "Report" });
XLSX.writeFile(wb, "mikroskopisbtaspperempuan_{{$bulan}}_Tahun{{$tahun}}.xlsx");
} else {
console.error('Tabel dengan ID "btasptableperempuan" tidak ditemukan.');
}
});
});
</script>
@endpush