Minor tweaks for percentages

This commit is contained in:
Bryce Covert
2023-01-01 15:24:05 -08:00
parent 0f062e0236
commit 7223ef8c0d
2 changed files with 29 additions and 39 deletions

View File

@@ -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