add export excel and pdf district payment recaps

This commit is contained in:
arifal
2025-03-19 18:55:51 +07:00
parent 47a9fb1dfb
commit eadfddb3a4
8 changed files with 194 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Laporan Rekap Data Pembayaran</title>
<style>
body { font-family: Arial, sans-serif; }
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th, td { border: 1px solid black; padding: 8px; text-align: center; }
th { background-color: #f2f2f2; }
</style>
</head>
<body>
<h2>Laporan Rekap Data Pembayaran</h2>
<table>
<thead>
<tr>
<th>Kecamatan</th>
<th>Total</th>
</tr>
</thead>
<tbody>
@foreach($data as $item)
<tr>
<td>{{ $item->kecamatan }}</td>
<td>{{ $item->total }}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>

View File

@@ -13,6 +13,19 @@
<div class="row">
<div class="col-12">
<div class="card w-100">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="card-title mb-0">Laporan Rekap Data Pembayaran</h5>
<div class="d-flex gap-2">
<button class="btn btn-sm bg-black text-white d-flex align-items-center content-center gap-2" id="btn-export-excel" data-url="{{ route('api.district-payment-report.excel') }}">
<span>.xlsx</span>
<iconify-icon icon="mingcute:file-export-line" width="20" height="20" class="d-flex align-items-center"></iconify-icon>
</button>
<button class="btn btn-sm bg-black text-white d-flex align-items-center content-center gap-2" id="btn-export-pdf" data-url="{{ route('api.district-payment-report.pdf') }}">
<span>.pdf</span>
<iconify-icon icon="mingcute:file-export-line" width="20" height="20" class="d-flex align-items-center"></iconify-icon>
</button>
</div>
</div>
<div class="card-body">
<div id="table-report-payment-recaps"></div>
</div>