Makes it easy to tell which thing you selected

This commit is contained in:
2024-11-20 11:40:02 -08:00
parent c39b3d936e
commit e8b753a0bd
3 changed files with 23 additions and 16 deletions

View File

@@ -888,21 +888,26 @@
(fc/with-field :bank-account/plaid-account
(com/validated-field {:errors (fc/field-errors)
:label "Plaid account"
:class "w-[20em]"}
(com/select {:name (fc/field-name)
:allow-blank? true
:error? (fc/error?)
:class "w-full"
:value (fc/field-value)
:options
(when client-id
(dc/q '[:find ?pa ?pn
:in $ ?client
:where [?pi :plaid-item/client ?client]
[?pi :plaid-item/accounts ?pa]
[?pa :plaid-account/name ?pn]]
(dc/db conn)
client-id))}))))
:class "w-[20em]"
:x-data (hx/json {:plaidAccount (fc/field-value)})}
[:div.flex.gap-2.items-center
(com/select {:name (fc/field-name)
:allow-blank? true
:error? (fc/error?)
:class "w-full"
:value (fc/field-value)
:x-model "plaidAccount"
:options
(when client-id
(dc/q '[:find ?pa ?pn
:in $ ?client
:where [?pi :plaid-item/client ?client]
[?pi :plaid-item/accounts ?pa]
[?pa :plaid-account/name ?pn]]
(dc/db conn)
client-id))})
[:svg {":data-jdenticon-value" "plaidAccount" :width "24" :height "24"
:x-init "$watch('plaidAccount', () => jdenticon())"}]])))
(defn- yodlee-account-select [client-id]
(list