refund front 1

This commit is contained in:
2024-08-22 14:05:46 +02:00
parent d271e23861
commit 7635a9826f
3 changed files with 55 additions and 6 deletions

View File

@ -15,12 +15,20 @@
</div>
<hr>
<a href='{{index .StringMap "cancel"}}' class="btn btn-info">Cancel</a>
<a href="#!" class="btn btn-warning">Refund Order</a>
<a id="refund-btn" href="#!" class="btn btn-warning">Refund Order</a>
<input type="hidden" id="pi" value="">
<input type="hidden" id="charge-amount" value="">
<input type="hidden" id="currency" value="">
{{end}}
{{define "js"}}
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script type="module">
import {showInfo} from "/static/js/sale.js"
import {showInfo, refund} from "/static/js/sale.js"
showInfo({{.API}});
document.getElementById("refund-btn").addEventListener("click", function(event) {
refund({{.API}});
});
</script>
{{end}}