Added bank accounts being credit card accounts

This commit is contained in:
Bryce Covert
2019-04-17 19:30:01 -07:00
parent 4fe52cad5a
commit 3ecfde69d0
11 changed files with 96 additions and 23 deletions

View File

@@ -193,10 +193,13 @@
[:div.card {:style {:margin-bottom "1em"}}
[:header.card-header
[:p.card-header-title {:style {:text-overflow "ellipsis"}}
[:span.icon
(if ({:check ":check"} type)
[:span.icon-check-payment-sign]
[:span.icon-accounting-bill])]
[:span.icon.inline
(cond
(#{:check ":check"} type) [:span.icon-check-payment-sign]
(#{:credit ":credit"} type) [:span.icon-credit-card-1]
:else [:span.icon-accounting-bill])]
code ": " name]
[:p {:style {:padding "0.75em 0.25em"}}
[:a.button.is-outlined {:on-click (dispatch-event [::toggle-visible sort-order])} [:span.icon (if visible
@@ -297,6 +300,40 @@
:subscription new-client}]]]]
[:div.field
[:label.label "Yodlee Account"]
[:div.control
[bind-field
[:input.input {:placeholder "Yodlee Account #"
:type "text"
:field [:bank-accounts sort-order :yodlee-account-id]
:event change-event
:subscription new-client}]]]]])
(when (#{:credit ":credit"} type )
[:div
[:label.label "Account"]
[horizontal-field
nil
[:div.control
[:p.help "Bank Name"]
[bind-field
[:input.input {:placeholder "Bank of America"
:type "text"
:field [:bank-accounts sort-order :bank-name]
:event change-event
:subscription new-client}]]]]
[horizontal-field
nil
[:div.control
[:p.help "Account #"]
[bind-field
[:input.input {:placeholder "123456789"
:type "text"
:field [:bank-accounts sort-order :number]
:event change-event
:subscription new-client}]]]]
[:div.field
[:p.help "Yodlee Account"]
[:div.control
[bind-field
[:input.input {:placeholder "Yodlee Account #"
@@ -380,9 +417,11 @@
[bank-account-card new-client bank-account (= 0 (:sort-order bank-account)) (= (:sort-order bank-account) (dec (count (:bank-accounts new-client))))])
[:div.columns
[:div.column.is-half
[:div.column.is-third
[:a.button.is-primary.is-outlined.is-fullwidth {:on-click (dispatch-event [::add-new-bank-account :credit])} "Add Credit Account"]]
[:div.column.is-third
[:a.button.is-primary.is-outlined.is-fullwidth {:on-click (dispatch-event [::add-new-bank-account :check])} "Add Checking Account"]]
[:div.column.is-half
[:div.column.is-third
[:a.button.is-primary.is-outlined.is-fullwidth {:on-click (dispatch-event [::add-new-bank-account :cash])} "Add Cash Account"]]]
#_[:h2.subtitle "Add bank account"]