update-index 9b1f3a4..b8c6f5e 100644
This commit is contained in:
No files matched your search
@@ -36,6 +36,7 @@
|
||||
<div class="form-group col-md-3">
|
||||
<button type="button" class="btn btn-warning btn-block" id="btnrekap">Rekap Antibiotik</button>
|
||||
<button type="button" class="btn btn-info btn-block" id="btnrekapglassreport">Rekap Glass Report</button>
|
||||
<button type="button" class="btn btn-primary btn-block" id="btnrekapzn">Rekap Ziehl Nielsen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -208,6 +209,7 @@ $(document).ready(function () {
|
||||
{ text: 'Code', datafield: 'kd_spesimen', width: 150, cellsalign: 'left', align: 'center'},
|
||||
{ text: 'Speciment', datafield: 'nm_spesimen', width: 150, cellsalign: 'left', align: 'center'},
|
||||
{ text: 'Template', datafield: 'dlp', width: 150, cellsalign: 'left', align: 'center'},
|
||||
{ text: 'Jenis', datafield: 'diagnosa2', width: 150, cellsalign: 'left', align: 'center'},
|
||||
{ text: 'Duration', editable: false, sortable: false, filterable: false, datafield: 'durasi', width: 100, cellsalign: 'left', align: 'center'},
|
||||
],
|
||||
columngroups:
|
||||
@@ -229,6 +231,12 @@ $(document).ready(function () {
|
||||
var tahun = document.getElementById('tahun').value;
|
||||
var url = '{{url('/')}}/glassreport?bulan='+bulan+'?tahun='+tahun;
|
||||
window.location.href = url;
|
||||
});
|
||||
$('#btnrekapzn').click(function () {
|
||||
var bulan = document.getElementById('bulan').value;
|
||||
var tahun = document.getElementById('tahun').value;
|
||||
var url = '{{url('/')}}/znreport?bulan='+bulan+'?tahun='+tahun;
|
||||
window.location.href = url;
|
||||
});
|
||||
$('#btndatereport').click(function () {
|
||||
var bulan = 'pertanggal';
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
@extends('base.layout')
|
||||
@section('content')
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="card-box ribbon-box">
|
||||
<div class="ribbon ribbon-danger">Rekapitulasi Data 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="10" cellspacing="0" id="znreporttable" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Komponen</th>
|
||||
<th>Jumlah</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($results as $row)
|
||||
<tr>
|
||||
<td>{{ $row->komponen }}</td>
|
||||
<td>{{ $row->jumlah }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="2">Tidak ada data dalam rentang tanggal tersebut.</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
|
||||
@endsection
|
||||
@push('script')
|
||||
<!-- SIGNATURE PAD -->
|
||||
<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('znreporttable');
|
||||
if (table) {
|
||||
var wb = XLSX.utils.table_to_book(table, { sheet: "Report" });
|
||||
XLSX.writeFile(wb, "GlassReport_{{$bulan}}_Tahun{{$tahun}}.xlsx");
|
||||
} else {
|
||||
console.error('Tabel dengan ID "tblkeaktifankelas" tidak ditemukan.');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user