mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 07:41:14 +00:00
Add a nice animation on successful refilling
This commit is contained in:
parent
f63fb59cbf
commit
379527cd58
@ -44,6 +44,11 @@ exportToHtml("loadCounter", (config: CounterConfig) => {
|
|||||||
).data.amount;
|
).data.amount;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async onRefillingSuccess() {
|
||||||
|
await this.updateBalance();
|
||||||
|
document.getElementById("selling-accordion").click();
|
||||||
|
},
|
||||||
|
|
||||||
async handleCode(event: SubmitEvent) {
|
async handleCode(event: SubmitEvent) {
|
||||||
const code = (
|
const code = (
|
||||||
$(event.target).find("#code_field").val() as string
|
$(event.target).find("#code_field").val() as string
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="click_form">
|
<div id="click_form">
|
||||||
<h5>{% trans %}Selling{% endtrans %}</h5>
|
<h5 id="selling-accordion">{% trans %}Selling{% endtrans %}</h5>
|
||||||
<div>
|
<div>
|
||||||
{% set counter_click_url = url('counter:click', counter_id=counter.id, user_id=customer.user_id) %}
|
{% set counter_click_url = url('counter:click', counter_id=counter.id, user_id=customer.user_id) %}
|
||||||
|
|
||||||
@ -103,7 +103,7 @@
|
|||||||
{% if refilling_fragment %}
|
{% if refilling_fragment %}
|
||||||
<h5>{% trans %}Refilling{% endtrans %}</h5>
|
<h5>{% trans %}Refilling{% endtrans %}</h5>
|
||||||
<div
|
<div
|
||||||
@htmx:after-request="updateBalance()"
|
@htmx:after-request="onRefillingSuccess()"
|
||||||
>
|
>
|
||||||
{{ refilling_fragment }}
|
{{ refilling_fragment }}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user