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,7 @@
|
||||
(def secret-key (-> env :plaid :secret-key))
|
||||
|
||||
(defn get-link-token [client-code]
|
||||
(-> (client/post (str base-url "/link/token/create")
|
||||
(-> (client/post (str base-url "/link/token/create")
|
||||
{:as :json
|
||||
:headers {"Content-Type" "application/json"}
|
||||
:body (json/write-str {"client_id" client-id
|
||||
@@ -40,10 +40,8 @@
|
||||
:body
|
||||
:link_token))
|
||||
|
||||
|
||||
|
||||
(defn exchange-public-token [public-token _]
|
||||
(-> (client/post (str base-url "/item/public_token/exchange")
|
||||
(-> (client/post (str base-url "/item/public_token/exchange")
|
||||
{:as :json
|
||||
:headers {"Content-Type" "application/json"}
|
||||
:body (json/write-str {"client_id" client-id
|
||||
@@ -87,10 +85,8 @@
|
||||
(.getMessage (:throwable &throw-context)))
|
||||
json))))))
|
||||
|
||||
|
||||
|
||||
(defn get-balance [access-token ]
|
||||
(-> (client/post (str base-url "/accounts/balance/get")
|
||||
(defn get-balance [access-token]
|
||||
(-> (client/post (str base-url "/accounts/balance/get")
|
||||
{:as :json
|
||||
:headers {"Content-Type" "application/json"}
|
||||
:body (json/write-str {"access_token" access-token
|
||||
@@ -104,7 +100,6 @@
|
||||
:end (str end)
|
||||
:acct (str account-id))
|
||||
|
||||
|
||||
(try+
|
||||
(-> (client/post (str base-url "/transactions/get")
|
||||
{:as :json
|
||||
@@ -140,6 +135,4 @@
|
||||
|
||||
(clojure.pprint/pprint
|
||||
(get-transactions "access-production-c0e322fa-f33d-4806-bc42-5fc883fb1ba4" "VZ8Y1azZMdhoYo9MQABrfpgz4jm4kPtakyxN5" #clj-time/date-time "2024-03-15" #clj-time/date-time "2024-03-30"))
|
||||
(clojure.pprint/pprint (get-accounts "access-production-c0e322fa-f33d-4806-bc42-5fc883fb1ba4"))
|
||||
|
||||
)
|
||||
(clojure.pprint/pprint (get-accounts "access-production-c0e322fa-f33d-4806-bc42-5fc883fb1ba4")))
|
||||
Reference in New Issue
Block a user