ledger page is working pretty good.
This commit is contained in:
@@ -45,19 +45,26 @@
|
||||
(fn [db [_ which]]
|
||||
(get-in db [::table-params which])))
|
||||
|
||||
(re-frame/reg-sub
|
||||
::additional-params
|
||||
(fn [db [_ which]]
|
||||
(get-in db [::additional-params which])))
|
||||
|
||||
(re-frame/reg-sub
|
||||
::params
|
||||
(fn [[_ id]]
|
||||
[(re-frame/subscribe [::subs/client])
|
||||
(re-frame/subscribe [::settled-filters id])
|
||||
(re-frame/subscribe [::table-params id])])
|
||||
(fn [[client filters table-params query-params]]
|
||||
(re-frame/subscribe [::table-params id])
|
||||
(re-frame/subscribe [::additional-params id])])
|
||||
(fn [[client filters table-params additional-params]]
|
||||
(let [query-params (auto-ap.views.utils/query-params)]
|
||||
(cond-> {}
|
||||
client (assoc :client-id (:id client))
|
||||
(seq query-params) (merge query-params)
|
||||
(seq filters) (merge filters)
|
||||
(seq table-params) (merge table-params)))))
|
||||
(seq table-params) (merge table-params)
|
||||
(seq additional-params) (merge additional-params)))))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::received
|
||||
@@ -109,6 +116,12 @@
|
||||
(fn [{:keys [db]} [_ which params :as z]]
|
||||
{:db (update-in db [::table-params which] merge params)}))
|
||||
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::additional-params-changed
|
||||
(fn [{:keys [db]} [_ which params :as z]]
|
||||
{:db (update-in db [::additional-params which] merge params)}))
|
||||
|
||||
(re-frame/reg-sub
|
||||
::specific-filters
|
||||
(fn [db [_ id]]
|
||||
|
||||
Reference in New Issue
Block a user