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

@@ -13,7 +13,6 @@
[iol-ion.query :refer [entid]]
[slingshot.slingshot :refer [throw+]]))
(defn snake->kebab [s]
(str/replace s #"_" "-"))
@@ -107,8 +106,6 @@
(#{"manager" "user" "power-user" "read-only"} (:user/role id))
(:user/clients id [])))
(defn result->page [results result-count key args]
{key (map ->graphql results)
:total result-count
@@ -197,7 +194,6 @@
(= :client/code (first x)))
[(entid (dc/db conn) x)]
(sequential? x)
(mapcat coerce-client-ids x)
@@ -218,14 +214,14 @@
e)))))
(defn exception->4xx [f]
(try
(try
(f)
(catch Throwable e
(throw+ (ex-info (.getMessage e) {:type :form-validation
:form-validation-errors [(.getMessage e)]}))
(throw+ (ex-info (.getMessage e) {:type :form-validation
:form-validation-errors [(.getMessage e)]}))
#_(throw (ex-info (.getMessage e)
{:type :notification}
e)))))
{:type :notification}
e)))))
(defn notify-if-locked [client-id date]
(try