intuit bank account selectable, bank name and account changeable.
This commit is contained in:
@@ -98,8 +98,9 @@
|
||||
:bank-account/routing
|
||||
:bank-account/check-number
|
||||
:bank-account/use-date-instead-of-post-date?
|
||||
{:bank-account/yodlee-account [:db/id :yodlee-account/name] }
|
||||
{:bank-account/plaid-account [:db/id :plaid-account/name] }
|
||||
{:bank-account/yodlee-account [:db/id :yodlee-account/name]}
|
||||
{:bank-account/plaid-account [:db/id :plaid-account/name]}
|
||||
{:bank-account/intuit-bank-account [:db/id :intuit-bank-account/name]}
|
||||
|
||||
[:bank-account/start-date :xform clj-time.coerce/from-date]
|
||||
{[:bank-account/type :xform iol-ion.query/ident] [:db/ident]}
|
||||
@@ -253,9 +254,12 @@
|
||||
[:bank-account/type [:maybe (ref->enum-schema "bank-account-type")]]
|
||||
[:bank-account/numeric-code {:optional true} [:maybe :int]]
|
||||
[:bank-account/check-number {:optional true} [:maybe :int]]
|
||||
[:bank-account/bank-name {:optional true} [:maybe :string]]
|
||||
[:bank-account/number {:optional true} [:maybe :string]]
|
||||
[:bank-account/sort-order {:default 0} [:maybe :int]]
|
||||
[:bank-account/yodlee-account {:optional true} [:maybe entity-id]]
|
||||
[:bank-account/plaid-account {:optional true} [:maybe entity-id]]
|
||||
[:bank-account/intuit-bank-account {:optional true} [:maybe entity-id]]
|
||||
[:bank-account/include-in-reports {:default false}
|
||||
[:boolean {:decode/string {:enter #(if (= % "on") true
|
||||
|
||||
@@ -285,8 +289,8 @@
|
||||
(vals m)
|
||||
m))} :string]]
|
||||
[:client/groups {:optional true :default []} [:maybe [:vector {:decode/arbitrary (fn [m] (if (map? m)
|
||||
(vals m)
|
||||
m))} :string]]]
|
||||
(vals m)
|
||||
m))} :string]]]
|
||||
[:client/emails {:optional true} [:maybe (many-entity {}
|
||||
[:db/id [:or entity-id temp-id]]
|
||||
[:email-contact/description :string]
|
||||
@@ -321,9 +325,12 @@
|
||||
[:bank-account/type [:maybe (ref->enum-schema "bank-account-type")]]
|
||||
[:bank-account/numeric-code {:optional true} [:maybe :int]]
|
||||
[:bank-account/sort-order {:default 0} [:maybe :int]]
|
||||
[:bank-account/bank-name {:optional true} [:maybe :string]]
|
||||
[:bank-account/number {:optional true} [:maybe :string]]
|
||||
[:bank-account/check-number {:optional true} [:maybe :int]]
|
||||
[:bank-account/yodlee-account {:optional true} [:maybe entity-id]]
|
||||
[:bank-account/plaid-account {:optional true} [:maybe entity-id]]
|
||||
[:bank-account/intuit-bank-account {:optional true} [:maybe entity-id]]
|
||||
[:bank-account/include-in-reports {:default false}
|
||||
[:boolean {:decode/string {:enter #(if (= % "on") true
|
||||
|
||||
@@ -846,6 +853,27 @@
|
||||
(com/checkbox {:name (fc/field-name)
|
||||
:checked (fc/field-value)}
|
||||
"(Yodlee only) use date instead of post date"))))
|
||||
|
||||
(defn- intuit-account-select [client-id]
|
||||
(list
|
||||
(fc/with-field :bank-account/intuit-bank-account
|
||||
(com/validated-field {:errors (fc/field-errors)
|
||||
:label "Intuit account"
|
||||
:class "w-[20em]"}
|
||||
(com/select {:name (fc/field-name)
|
||||
:allow-blank? true
|
||||
:error? (fc/error?)
|
||||
:class "w-full"
|
||||
:value (fc/field-value)
|
||||
:options
|
||||
(sort-by second (dc/q '[:find ?ia ?inn
|
||||
:in $
|
||||
:where [?ia :intuit-bank-account/name ?inn] ]
|
||||
(dc/db conn)))})))
|
||||
(fc/with-field :bank-account/use-date-instead-of-post-date?
|
||||
(com/checkbox {:name (fc/field-name)
|
||||
:checked (fc/field-value)}
|
||||
"(Yodlee only) use date instead of post date"))))
|
||||
(defmethod bank-account-form
|
||||
:bank-account-type/credit [bank-account]
|
||||
[:div
|
||||
@@ -936,7 +964,8 @@
|
||||
|
||||
[:h2.text-lg "Integration details"]
|
||||
(plaid-account-select (:db/id (:snapshot fc/*form-data*)))
|
||||
(yodlee-account-select (:db/id (:snapshot fc/*form-data*)))])
|
||||
(yodlee-account-select (:db/id (:snapshot fc/*form-data*)))
|
||||
(intuit-account-select (:db/id (:snapshot fc/*form-data*)))])
|
||||
|
||||
(defmethod bank-account-form
|
||||
:bank-account-type/check [bank-account]
|
||||
@@ -1055,7 +1084,8 @@
|
||||
:value (fc/field-value)})))
|
||||
[:h2.text-lg "Integration details"]
|
||||
(plaid-account-select (:db/id (:snapshot fc/*form-data*)))
|
||||
(yodlee-account-select (:db/id (:snapshot fc/*form-data*)))])
|
||||
(yodlee-account-select (:db/id (:snapshot fc/*form-data*)))
|
||||
(intuit-account-select (:db/id (:snapshot fc/*form-data*)))])
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user