2024-08-21 21:18:51 +00:00
|
|
|
{{ template "base" . }}
|
|
|
|
{{ define "title" }}
|
2024-08-21 21:27:33 +00:00
|
|
|
All Sales
|
2024-08-21 21:18:51 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ define "content" }}
|
2024-08-21 19:49:08 +00:00
|
|
|
<h2 class="mt-5">All Sales</h2>
|
|
|
|
<hr>
|
2024-08-21 21:18:51 +00:00
|
|
|
<table id="sales-table" class="table table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Transaction</th>
|
|
|
|
<th>Customer</th>
|
|
|
|
<th>Product</th>
|
|
|
|
<th>Amount</th>
|
2024-08-22 12:33:36 +00:00
|
|
|
<th>Status</th>
|
2024-08-21 21:18:51 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2024-08-23 08:04:06 +00:00
|
|
|
<nav>
|
|
|
|
<ul id="paginator" class="pagination">
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2024-08-21 21:18:51 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ define "js" }}
|
|
|
|
<script type="module">
|
2024-08-23 08:51:20 +00:00
|
|
|
import {pageSize} from "/static/js/common.js"
|
|
|
|
import {showTable, currentPage} from "/static/js/all-sales.js"
|
|
|
|
|
|
|
|
let curPage = currentPage;
|
|
|
|
if (localStorage.getItem("cur-page") !== null) {
|
|
|
|
curPage = localStorage.getItem("cur-page");
|
|
|
|
localStorage.removeItem("cur-page");
|
|
|
|
}
|
|
|
|
showTable({{.API}}, pageSize, curPage);
|
2024-08-21 21:18:51 +00:00
|
|
|
</script>
|
|
|
|
{{ end }}
|