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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user