Add vendor pre-population for bulk code and individual edit forms

- Add vendor-changed HTMX handlers for both bulk code and individual edit
- Pre-populate default account at 100% when vendor is selected and no accounts exist
- Fix render-accounts-section to render from step-params correctly
- Change bulk code vendor-changed from hx-get to hx-post to include form data
- Add routes for vendor-changed endpoints
- Update e2e tests to cover vendor pre-population
- Run lein cljfmt fix across codebase
This commit is contained in:
2026-05-21 14:45:19 -07:00
parent 8bd0cee1b1
commit ba87805d4c
210 changed files with 8694 additions and 9627 deletions

View File

@@ -1,9 +1,9 @@
(ns auto-ap.utils
#?@
(:clj
[(:require [com.unbounce.dogstatsd.core :as statsd]
[com.brunobonacci.mulog :as mu]
[auto-ap.logging :as alog])]))
(:clj
[(:require [com.unbounce.dogstatsd.core :as statsd]
[com.brunobonacci.mulog :as mu]
[auto-ap.logging :as alog])]))
#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]}
(defn by
@@ -35,7 +35,7 @@
#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]}
(defn dollars= [amt1 amt2]
(dollars-0? (- amt1 amt2) ))
(dollars-0? (- amt1 amt2)))
#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]}
(defn deep-merge [v & vs]
@@ -55,18 +55,17 @@
(let [in-progress? (atom false)]
(fn []
(when (= false @in-progress?)
(try
(try
(reset! in-progress? true)
(f)
(finally
(reset! in-progress? false)))))))
#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]}
(defn heartbeat [f id]
(fn []
#?(:clj (mu/with-context {:source id}
(try
(try
(alog/info ::starting-process :id id)
(f)
(alog/info ::ending-process :id id)