mproving layout

This commit is contained in:
Bryce Covert
2019-02-17 08:24:26 -08:00
parent ea7bb1d60f
commit fdcc3192a1
4 changed files with 22 additions and 29 deletions

View File

@@ -23,9 +23,6 @@
(fn [db [_ x]]
(-> db ::forms x)))
;; TODO PREVENT DUPLICATES!
(re-frame/reg-sub
::loading-class
(fn [db [_ x]]
@@ -121,7 +118,6 @@
::change-new
[(re-frame/path [::forms ::new-client :data])]
(fn [db [_ path value]]
(println db)
(assoc-in db path value)))
(re-frame/reg-event-db
@@ -140,10 +136,13 @@
(let [new-account (-> new-account
(update :check-number #(if (seq %) (js/parseInt %) nil))
(update :yodlee-account-id #(if (seq %) (js/parseInt %) nil)))]
(println new-account)
(-> client
(update :bank-accounts conj new-account )
(assoc :new-account {:type :check})))))
(if ((->> client (:bank-accounts)
(map :code)
set) (:code new-account))
client
(-> client
(update :bank-accounts conj new-account )
(assoc :new-account {:type :check}))))))
(re-frame/reg-event-db
::remove-new-bank-account