more help.

This commit is contained in:
2022-03-07 15:56:51 -08:00
parent f8d27fecaf
commit 96dd99a74c
4 changed files with 51 additions and 78 deletions

View File

@@ -13,7 +13,8 @@
:refer [data-params->query-params]]
[auto-ap.views.utils :refer [dispatch-event with-user]]
[clojure.string :as str]
[re-frame.core :as re-frame]))
[re-frame.core :as re-frame]
[auto-ap.views.pages.data-page :as data-page]))
(re-frame/reg-sub
::can-submit
@@ -23,8 +24,10 @@
(re-frame/reg-event-fx
::coded
(fn [_ [_ _]]
{:dispatch [::modal/modal-closed]}))
(fn [_ [_ _ _]]
{:dispatch-n [[::modal/modal-closed]
[:auto-ap.views.pages.transactions/params-change
@(re-frame/subscribe [::data-page/params :auto-ap.views.pages.transactions/page])]]}))
(re-frame/reg-event-fx
::code-selected
@@ -57,6 +60,7 @@
:on-success (fn [result]
[::coded
(:message result)
checked-params
])}})))
(re-frame/reg-event-db
@@ -128,8 +132,5 @@
:on-click (dispatch-event [::code-selected checked] )}
:close-event [::status/completed ::code-selected]}]
:db (-> db
(forms/start-form ::form {:accounts [{:id (str "new-" (random-uuid))
:amount-mode "%"
:amount-percentage 100
:location nil}]
(forms/start-form ::form {:accounts []
:client @(re-frame/subscribe [::subs/client (:client-id params)])}))})))