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

This commit is contained in:
imperosol
2026-09-20 23:07:09 +02:00
parent 994130550a
commit aedfbf948e
3 changed files with 6 additions and 6 deletions
@@ -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();