udemy-go-web-2/cmd/web/templates/sale.page.gohtml

27 lines
727 B
Plaintext

{{template "base" .}}
{{define "title"}}
{{index .StringMap "title"}}
{{end}}
{{define "content"}}
<h2 class="mt-5">Sale</h2>
<hr>
<div>
<strong>Order No:</strong> <span id="order-no"></span><br>
<strong>Customer:</strong> <span id="customer"></span><br>
<strong>Product:</strong> <span id="product"></span><br>
<strong>Quantity:</strong> <span id="quantity"></span><br>
<strong>Total Sale:</strong> <span id="amount"></span><br>
</div>
<hr>
<a href='{{index .StringMap "cancel"}}' class="btn btn-info">Cancel</a>
<a href="#!" class="btn btn-warning">Refund Order</a>
{{end}}
{{define "js"}}
<script type="module">
import {showInfo} from "/static/js/sale.js"
showInfo({{.API}});
</script>
{{end}}