feat:transaksi laporan module
parent
7b466808be
commit
1df8b2af56
|
|
@ -0,0 +1,85 @@
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace BankSampahApp.Controllers.Transaksi
|
||||||
|
{
|
||||||
|
[Route("Transaksi/[controller]/[action]")]
|
||||||
|
public class LaporanTransaksiController : Controller
|
||||||
|
{
|
||||||
|
public IActionResult Index()
|
||||||
|
{
|
||||||
|
return View("~/Views/Transaksi/LaporanTransaksi/Index.cshtml");
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public IActionResult Table()
|
||||||
|
{
|
||||||
|
var data = new[]
|
||||||
|
{
|
||||||
|
new {
|
||||||
|
nama_file = "transaksi_bsu-bsi.pdf",
|
||||||
|
tanggal_download = "2025-01-12",
|
||||||
|
aksi = "<button class=\"btn bg-bank-sampah-primary-500 w-full rounded-full text-white btn-sm\">Download</button>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
nama_file = "transaksi_nasabah.pdf",
|
||||||
|
tanggal_download = "2025-01-11",
|
||||||
|
aksi = "<button class=\"btn bg-bank-sampah-primary-500 w-full rounded-full text-white btn-sm\">Download</button>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
nama_file = "transaksi_offtaker.pdf",
|
||||||
|
tanggal_download = "2025-01-10",
|
||||||
|
aksi = "<button class=\"btn bg-bank-sampah-primary-500 w-full rounded-full text-white btn-sm\">Download</button>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
nama_file = "transaksi_bsu-bsi.pdf",
|
||||||
|
tanggal_download = "2025-01-09",
|
||||||
|
aksi = "<button class=\"btn bg-bank-sampah-primary-500 w-full rounded-full text-white btn-sm\">Download</button>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
nama_file = "transaksi_nasabah.pdf",
|
||||||
|
tanggal_download = "2025-01-08",
|
||||||
|
aksi = "<button class=\"btn bg-bank-sampah-primary-500 w-full rounded-full text-white btn-sm\">Download</button>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
nama_file = "transaksi_offtaker.pdf",
|
||||||
|
tanggal_download = "2025-01-07",
|
||||||
|
aksi = "<button class=\"btn bg-bank-sampah-primary-500 w-full rounded-full text-white btn-sm\">Download</button>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
nama_file = "transaksi_bsu-bsi.pdf",
|
||||||
|
tanggal_download = "2025-01-06",
|
||||||
|
aksi = "<button class=\"btn bg-bank-sampah-primary-500 w-full rounded-full text-white btn-sm\">Download</button>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
nama_file = "transaksi_nasabah.pdf",
|
||||||
|
tanggal_download = "2025-01-05",
|
||||||
|
aksi = "<button class=\"btn bg-bank-sampah-primary-500 w-full rounded-full text-white btn-sm\">Download</button>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
nama_file = "transaksi_offtaker.pdf",
|
||||||
|
tanggal_download = "2025-01-04",
|
||||||
|
aksi = "<button class=\"btn bg-bank-sampah-primary-500 w-full rounded-full text-white btn-sm\">Download</button>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
nama_file = "transaksi_bsu-bsi.pdf",
|
||||||
|
tanggal_download = "2025-01-03",
|
||||||
|
aksi = "<button class=\"btn bg-bank-sampah-primary-500 w-full rounded-full text-white btn-sm\">Download</button>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
nama_file = "transaksi_nasabah.pdf",
|
||||||
|
tanggal_download = "2025-01-02",
|
||||||
|
aksi = "<button class=\"btn bg-bank-sampah-primary-500 w-full rounded-full text-white btn-sm\">Download</button>"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
var response = new
|
||||||
|
{
|
||||||
|
data = data
|
||||||
|
};
|
||||||
|
|
||||||
|
return Json(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
|
|
||||||
<!-- Transaksi -->
|
<!-- Transaksi -->
|
||||||
<li>
|
<li>
|
||||||
<details @(new[] { "Nasabah", "PenarikanTabungan", "Bsi", "TransaksiOfftaker" }.Contains(controller) ? "open" : "")>
|
<details @(new[] { "Nasabah", "PenarikanTabungan", "Bsi", "TransaksiOfftaker", "LaporanTransaksi" }.Contains(controller) ? "open" : "")>
|
||||||
<summary>
|
<summary>
|
||||||
<i class="ph ph-cash-register me-2 text-lg"></i>
|
<i class="ph ph-cash-register me-2 text-lg"></i>
|
||||||
Transaksi
|
Transaksi
|
||||||
|
|
@ -79,6 +79,7 @@
|
||||||
<li><a href="/Transaksi/PenarikanTabungan/Index" class="@(controller == "PenarikanTabungan" ? "menu-active" : "")">Penarikan Tabungan</a></li>
|
<li><a href="/Transaksi/PenarikanTabungan/Index" class="@(controller == "PenarikanTabungan" ? "menu-active" : "")">Penarikan Tabungan</a></li>
|
||||||
<li><a href="/Transaksi/Bsi/Index" class="@(controller == "Bsi" ? "menu-active" : "")">BSI</a></li>
|
<li><a href="/Transaksi/Bsi/Index" class="@(controller == "Bsi" ? "menu-active" : "")">BSI</a></li>
|
||||||
<li><a href="/Transaksi/TransaksiOfftaker/Index" class="@(controller == "TransaksiOfftaker" ? "menu-active" : "")">Offtaker</a></li>
|
<li><a href="/Transaksi/TransaksiOfftaker/Index" class="@(controller == "TransaksiOfftaker" ? "menu-active" : "")">Offtaker</a></li>
|
||||||
|
<li><a href="/Transaksi/LaporanTransaksi/Index" class="@(controller == "LaporanTransaksi" ? "menu-active" : "")">Laporan</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</details>
|
</details>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Transaksi Laporan";
|
||||||
|
}
|
||||||
|
|
||||||
|
<div class="flex flex-col gap-2 md:flex-row md:justify-between md:gap-0">
|
||||||
|
<div class="prose">
|
||||||
|
<span class="text-xl font-semibold text-black">
|
||||||
|
Transaksi Laporan
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="h-6"></div>
|
||||||
|
|
||||||
|
<div class="card bg-white">
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="grid-col-1 grid items-end gap-4 md:grid-cols-4">
|
||||||
|
<fieldset class="fieldset">
|
||||||
|
<legend class="fieldset-legend">Tanggal Awal</legend>
|
||||||
|
<input type="date" class="input w-full" />
|
||||||
|
</fieldset>
|
||||||
|
<fieldset class="fieldset">
|
||||||
|
<legend class="fieldset-legend">Tanggal Akhir</legend>
|
||||||
|
<input type="date" class="input w-full" />
|
||||||
|
</fieldset>
|
||||||
|
<fieldset class="fieldset">
|
||||||
|
<legend class="fieldset-legend">Jenis Laporan</legend>
|
||||||
|
<select class="select w-full">
|
||||||
|
<option disabled selected>Pilih Jenis Laporan</option>
|
||||||
|
<option>Transaksi Detail/Nasabah</option>
|
||||||
|
<option>Transaksi Total/Nasabah</option>
|
||||||
|
<option>Transaksi Saldo/Nasabah</option>
|
||||||
|
<option>Transaksi Detail Bsi</option>
|
||||||
|
<option>Transaksi Total Bsi</option>
|
||||||
|
<option>Transaksi Detail Offtaker</option>
|
||||||
|
<option>Transaksi Total Offtaker</option>
|
||||||
|
</select>
|
||||||
|
</fieldset>
|
||||||
|
<button class="btn bg-bank-sampah-primary-500 w-full rounded-full text-white">
|
||||||
|
Download Excel
|
||||||
|
<i class="ph ph-download ms-2"></i>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="h-6"></div>
|
||||||
|
|
||||||
|
<div class="card bg-white">
|
||||||
|
<div class="card-body p-2">
|
||||||
|
<div class="flex flex-row items-center justify-between p-4">
|
||||||
|
<h2 class="card-title">
|
||||||
|
History Download
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
<div class="w-full overflow-x-auto">
|
||||||
|
<table class="table-zebra table w-full" id="example">
|
||||||
|
<!-- head -->
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="w-[10%]">No</th>
|
||||||
|
<th class="w-[25%]">Nama File</th>
|
||||||
|
<th class="w-[50%]">Tanggal Download</th>
|
||||||
|
<th class="w-[15%]">Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@section Scripts {
|
||||||
|
<script type="text/javascript">
|
||||||
|
var table;
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
table = new DataTable('#example', {
|
||||||
|
ajax: '/Transaksi/LaporanTransaksi/Table',
|
||||||
|
scrollX: true,
|
||||||
|
autoWidth: false,
|
||||||
|
initComplete: function () {
|
||||||
|
$('div.dt-scroll-body thead').css('visibility', 'collapse');
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{ data: null, render: (d, t, r, m) => m.row + 1, orderable: false, searchable: false },
|
||||||
|
{ data: 'nama_file' },
|
||||||
|
{ data: 'tanggal_download' },
|
||||||
|
{ data: 'aksi' },
|
||||||
|
]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue