fix: htmx:after:swap was still using old syntax

This commit is contained in:
imperosol committed 2026-09-20 23:07:09 +02:00
1 parent 994130550a
commit aedfbf948e
3 files changed
+6 -6

No files matched your search

@@ -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();