39 lines
		
	
	
		
			904 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			904 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
{{ template "base" . }}
 | 
						|
{{ define "title" }}
 | 
						|
All Sales
 | 
						|
{{ end }}
 | 
						|
{{ define "content" }}
 | 
						|
<h2 class="mt-5">All Sales</h2>
 | 
						|
<hr>
 | 
						|
<table id="sales-table" class="table table-striped">
 | 
						|
    <thead>
 | 
						|
        <tr>
 | 
						|
            <th>Transaction</th>
 | 
						|
            <th>Customer</th>
 | 
						|
            <th>Product</th>
 | 
						|
            <th>Amount</th>
 | 
						|
            <th>Status</th>
 | 
						|
        </tr>
 | 
						|
    </thead>
 | 
						|
    <tbody>
 | 
						|
    </tbody>
 | 
						|
</table>
 | 
						|
<nav>
 | 
						|
    <ul id="paginator" class="pagination">
 | 
						|
    </ul>
 | 
						|
</nav>
 | 
						|
{{ end }}
 | 
						|
{{ define "js" }}
 | 
						|
<script type="module">
 | 
						|
    import {pageSize} from "/static/js/common.js"
 | 
						|
    import {showTable, currentPage} from "/static/js/all-sales.js"
 | 
						|
 | 
						|
    let curPage = currentPage;
 | 
						|
    if (sessionStorage.getItem("cur-page") !== null) {
 | 
						|
        curPage = sessionStorage.getItem("cur-page");
 | 
						|
        sessionStorage.removeItem("cur-page");
 | 
						|
    }
 | 
						|
    showTable({{.API}}, pageSize, curPage);
 | 
						|
</script>
 | 
						|
{{ end }}
 |