Minor tweaks for percentages
This commit is contained in:
@@ -104,15 +104,22 @@
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::updated
|
||||
[(re-frame/inject-cofx ::inject/sub [::subs/client])]
|
||||
(fn [{:keys [db] ::subs/keys [client]} [_ _ command]]
|
||||
[
|
||||
(re-frame/inject-cofx ::inject/sub (fn [[_ _ _ client]]
|
||||
[::subs/locations-for-client (:id client)]))]
|
||||
(fn [{:keys [db] ::subs/keys [locations-for-client]} [_ _ command client]]
|
||||
(println locations-for-client)
|
||||
(when (= :create command)
|
||||
{:db
|
||||
(-> db
|
||||
(forms/stop-form ::form )
|
||||
(forms/start-form ::form {:client client
|
||||
:status :unpaid
|
||||
:date (c/now)}))})))
|
||||
:date (c/now)
|
||||
:expense-accounts
|
||||
(eaf/from-graphql []
|
||||
0.0
|
||||
locations-for-client)}))})))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::adding
|
||||
@@ -253,7 +260,8 @@
|
||||
:class "live-added")
|
||||
(if (:id data)
|
||||
:edit
|
||||
:create)])
|
||||
:create)
|
||||
(:client data)])
|
||||
:on-error [::forms/save-error ::form]}})))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
|
||||
Reference in New Issue
Block a user