locations.

This commit is contained in:
Bryce Covert
2019-04-14 22:08:36 -07:00
parent c44a36c815
commit b05b2244a0
13 changed files with 170 additions and 67 deletions

View File

@@ -50,12 +50,18 @@
[]
clients))))
;; Bank accounts only, not including cash
(re-frame/reg-sub
::real-bank-accounts
::real-bank-accounts
:<- [::client]
(fn [client]
(->> client :bank-accounts (filter #(= (:type %) :check)) (sort-by :sort-order))))
(re-frame/reg-sub
::locations-for-client
(fn [db [_ client]]
(:locations (get (:clients db) (or client (:client db))))))
(re-frame/reg-sub
::clients-by-id