mirror of
https://github.com/ae-utbm/sith.git
synced 2026-09-21 11:44:26 +00:00
fix: htmx:after:swap was still using old syntax
This commit is contained in:
@@ -123,14 +123,14 @@ document.addEventListener("alpine:init", () => {
|
||||
|
||||
onRefillingSuccess(event: CustomEvent) {
|
||||
if (
|
||||
event.type !== "htmx:after-swap" ||
|
||||
event.detail.failed ||
|
||||
event.detail.elt.querySelector(".errorlist")
|
||||
event.type !== "htmx:after:swap" ||
|
||||
event.detail.ctx.response.status !== 200 ||
|
||||
event.detail.ctx.target.querySelector(".errorlist")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
this.customerBalance += Number.parseFloat(
|
||||
(event.detail.target.querySelector("#id_amount") as HTMLInputElement).value,
|
||||
(event.detail.ctx.target.querySelector("#id_amount") as HTMLInputElement).value,
|
||||
);
|
||||
document.getElementById("selling-accordion")?.setAttribute("open", "");
|
||||
this.codeField?.widget.focus();
|
||||
|
||||
Reference in New Issue
Block a user