Adds default filtering and sorting
This commit is contained in:
@@ -13,7 +13,8 @@
|
||||
[auto-ap.views.pages.transactions.bulk-updates :as bulk]
|
||||
[auto-ap.views.pages.transactions.side-bar :as side-bar]
|
||||
[auto-ap.views.pages.transactions.table :as table]
|
||||
[auto-ap.views.utils :refer [dispatch-event with-user]]
|
||||
[auto-ap.views.utils :refer [dispatch-event with-user date->str standard]]
|
||||
[cljs-time.core :as time]
|
||||
[re-frame.core :as re-frame]
|
||||
[reagent.core :as reagent]
|
||||
[vimsical.re-frame.fx.track :as track]
|
||||
@@ -97,8 +98,10 @@
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::mounted
|
||||
(fn [{:keys []} _]
|
||||
{::track/register {:id ::params
|
||||
(fn [{:keys [db]} _]
|
||||
{:db (assoc-in db [::data-page/settled-filters ::page :date-range] {:start (date->str (time/plus (time/now) (time/months -1))
|
||||
standard)})
|
||||
::track/register {:id ::params
|
||||
:subscription [::data-page/params ::page]
|
||||
:event-fn (fn [params]
|
||||
[::params-change params])}
|
||||
|
||||
Reference in New Issue
Block a user